I discussed here about resetting the password on Sun Solaris Operating system in SPARC platform. While the procedure is almost the same wherein you boot with the CD into single user mode and mount the root partition, here we discuss the procedure to reset the password for the root user on the x86 platform.
It is recommeded that the security for the physical access to the server is restricted so as to ensure that there is no unauthorized access and anyone who follows this routine is an authorized personnel.
Boot the server with a Sun Solaris Operating System CD (I’m using a Solaris 10 CD but doesn’t matter really) or a network boot with a JumpStart server. Change the Boot order accordingly in your x86 system and start the server and launch a single user mode (No Password).
In Solaris 10, you have the default Fail Safe boot option in the Boot Loader. With this you do not need a CD or JumpStart server as selecting it will launch the Single-User shell. I haven’t used the early Solaris versions on an x86 system so if anyone knows it is availabe then please post your comments.
When you boot from the CD, select the option for the Sigle-user mode (Option 6 on Solaris 10 CD)
This will look for the currently installed Solaris OS on your system and prompts a Yes/No question to mount the Root filesystem as a Read/Write file system onto /a.
Select yes to mount the root file system (/dev/dsk/c0t0d0s0 here) on /a. If you select No, no harm as you still can mount it manually using:
solaris# mount /dev/dsk/c0t0d0s0 /a
NOTE: /a is a temporary mount point that is available when you boot from CD or a JumpStart server
Now, with the root file system mounted on /a. All you need to do is to edit the shadow file and remove the encrypted password for root.
solaris# vi /a/etc/shadow
Now, exit the mounted filesysten, unmount the root filesystem and reboot the system to single-user mode booting of the disk.
solaris# cd /
solaris# umount /a
solaris# init s
This should boot of the disk and take you to the single-user mode. Press enter at the prompt to enter a password for root.
This should allow you to login to the system. Once in, set the password and change to multi-user mode.
NOTE: Single-User mode is only to ensure that the root user without password is not exposed to others if started in multi-user mode before being set with a new password.
solaris# passwd root
solaris# reboot
This should do. You should now be able to logon as root with the new password.
I’ve did all instruction but faced some problem
I cannot mount /a
solaris# mount /dev/dsk/c0t0d0s0 /a
error shown
path doesn’t exist
anyone know how to solve this problem?
please help me.
solaris# mount /dev/dsk/c0d0s0 /a
CAN we do it without CD ROM?
Can someone provide a hint on how to exit the Solaris 9 Installation when booting of the CD so I can get to a command prompt. Also, in the case where the CD does not have the driver for the internal disk array controller, at what stage can I add the driver so the disk can be mounted?
Thanks
hallo solaris expert i have a problem in my sun server 10 i forget username and passwd to login what can i do? is any solution without using cdrom? i fearful when u try to use cdrom there is a posiblities to format srss 3.1 sun ray or? anyone can help me for that
regards
benjamin
sun expert to be
255713196931
benjamarkena@yahoo.com
Hi there,
I have solaris 10 installed on my computer, I just cant get into fail safemode, do I have to press something as in Windows you have to press F8?….thanks in advance for your response.
Yes solaris 10 failsafe worked fine without a password.
first of all check the pwd
and come out the root directory
next type this cmd #umountall
Thanks a lot the same worked for me. below are the stpes performed by me.
there can be a scenerio in solaris that u brought the
system into ok prompt and write boot -s (it asks for a password
or ctrl d to bypass) giving bypass will cause the system to boot
properly and ask for a root password and the other part is where
u will be asked root password to enter into single usermode.
what i did now is, i brought the syste again into single
usermode and gave boot cdrom thinking that it will bring the
system into single usermode. but it came on installation page.
the lesson lerant is :-
on ok Prompt
ok boot cdrom -s (is the option)
this will bring u to single usermode without asking any
password.
now we have to mount the cdrom path on any temporary directory.
as /a
#
solaris# mount /dev/dsk/c0t0d0s0 /a
NOTE: /a is a temporary mount point that is available when you
boot from CD or a JumpStart server
Now, with the root file system mounted on /a. All you need to do
is to edit the shadow file and remove the encrypted password for
root.
# vi shadow
I don’t know what kind of terminal you are on – all I have is
‘unknown’.
[Using open mode]
“shadow” [Read only] 29 lines, 756 characters
root::15365::::::
:q!
#
#
# vi shadow
I don’t know what kind of terminal you are on – all I have is
‘unknown’.
[Using open mode]
“shadow” [Read only] 29 lines, 756 characters
root::15365::::::
:wq!
“shadow” 29 lines, 743 characters
#
#
# cd /
#
#
# umount /a
#
# init s
#
#
#
# reboot
syncing file systems… done
rebooting…
SC Alert: Host System has Reset
SC Alert: Failed to send email alert for recent event.
SC Alert: Failed to send email alert for recent event.
\
SC Alert: Failed to send email alert for recent event.
Sun Fire T200, No Keyboard
#
# reboot
syncing file systems… done
rebooting…
SC Alert: Host System has Reset
SC Alert: Failed to send email alert for recent event.
SC Alert: Failed to send email alert for recent event.
\
SC Alert: Failed to send email alert for recent event.
Sun Fire T200, No Keyboard
Copyright (c) 1998, 2010, Oracle and/or its affiliates. All
rights reserved.
OpenBoot 4.30.4.b, 8064 MB memory available, Serial #71821164.
Ethernet address 0:14:4f:47:e7:6c, Host ID: 8447e76c.
Boot device: disk File and args:
SunOS Release 5.10 Version Generic_137137-09 64-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: NDA-HCLT-SUNTEST
May 14 04:56:38 svc.startd[8]: svc:/system/pkgserv:default:
Method “/usr/bin/pkgadm sync” failed with exit status 1.
May 14 04:56:38 svc.startd[8]: svc:/system/pkgserv:default:
Method “/usr/bin/pkgadm sync” failed with exit status 1.
May 14 04:56:39 svc.startd[8]: svc:/system/pkgserv:default:
Method “/usr/bin/pkgadm sync” failed with exit status 1.
May 14 04:56:39 svc.startd[8]: system/pkgserv:default failed:
transitioned to maintenance (see ‘svcs -xv’ for details)
May 14 04:56:39 svc.startd[8]:
svc:/network/ipsec/policy:default: Method “/usr/sbin/ipsecconf
-q -a /etc/inet/ipsecinit.conf” failed with exit status 1.
May 14 04:56:39 svc.startd[8]:
svc:/network/ipsec/policy:default: Method “/usr/sbin/ipsecconf
-q -a /etc/inet/ipsecinit.conf” failed with exit status 1.
May 14 04:56:40 svc.startd[8]:
svc:/network/ipsec/policy:default: Method “/usr/sbin/ipsecconf
-q -a /etc/inet/ipsecinit.conf” failed with exit status 1.
May 14 04:56:40 svc.startd[8]: network/ipsec/policy:default
failed: transitioned to maintenance (see ‘svcs -xv’ for details)
Booting in cluster mode
NOTICE: CMM: Node NDA-HCLT-SUNTEST (nodeid = 1) with votecount =
1 added.
NOTICE: CMM: Node NDA-HCLT-SUNTEST: attempting to join cluster.
NOTICE: CMM: Cluster has reached quorum.
NOTICE: CMM: Node NDA-HCLT-SUNTEST (nodeid = 1) is up; new
incarnation number = 1336951608.
NOTICE: CMM: Cluster members: NDA-HCLT-SUNTEST.
NOTICE: CMM: node reconfiguration #1 completed.
NOTICE: CMM: Node NDA-HCLT-SUNTEST: joined cluster.
ip: joining multicasts failed (18) on clprivnet0 – will use link
layer broadcasts for multicast
/dev/rdsk/c0t0d0s7 is clean
Reading ZFS config: done.
obtaining access to all attached disks
NDA-HCLT-SUNTEST console login: root
Last login: Wed Feb 29 21:53:19 on console
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
# syslogd: line 24: WARNING: loghost could not be resolved
#
#
#
#
# passwd
passwd: Changing password for root
New Password:
Re-enter new Password:
passwd: password successfully changed for root
#
#
#reboot
#
now the system will ask the password after boot, enter ur password and go on.
# who -r
. run-level 3 Feb 19 12:47 3 0 S
#
Pingback: what is the use of " /a "
I am very new to this and just got a SUN V240 fro Ebay to start getting my head around SUN servers. I do not know any of the passwords and neither does the seller. Is there a way I can reset the password when I do not know any of the passwords?
Thanks,
Sam
I am lost password to login to Solaris serial connect. Can any body suggeset me how to re-cover the password or if any procedure i need to follow.
It would be great help if any solution to recover password.