forgot password

hello friends,
I am currently using solaris 10.
I have lost the root password.
Can you please give me a step by step procedure on how to set the password again.

(1) On many systems, the operator console does not require a logon. The console can only be connected to a specific port on the back of the computer, thus the thought that it would be secure.
So, if you have an operator console (or can connect a dumb terminal to the connection), you may be able to connect without a password. Once connected, you should be able to reset the root password.
(2) Reboot in single-user mode. Some systems allow a step-down to a run-level. Normally only one computer location can do this. You want to reboot to level 1 = single user. Again, because of the mode, there should not be any password prompting because of the underlying thought of physical security of the computer connection.

Perhaps one of these two can help you on your way?

@nsharath
If your solaris server does not have grub password then, you can edit the grub menu and then drop in to single user mode without root password, then use passwd command to reset your root password. This works in unix, so should work in solaris also.:b:

Also if you can connect to the mngmnt console behind the server using a laptop(tftp) like how u connect to a switch or router, you can reset root password from there also I suppose...Please google on that...:b:

boot the system using a dvd to single user.
mount your root / filesystem to /a or /mnt.
cd /mnt/etc
edit the shadow file by removing the encrypted passwd between the colons :: (empty passwd)
save the shadow file
unmount /a or /mnt
reboot the system and login as root, change the passwd immediately

@incredible
So I believe its a blank password after you login....so just enter root and then <enter>...right?

Yes bro, you're right!

thanks a lot friend.
But still...Do you have the screenshots of this procedure......

else

Can you tell me a step by step procedure about how to get into a single user mode after entering the Sun solaris CD.
I am new to this OS......so friends please bear with my little knowledge....

awaiting your reply:o

at the ok prompt type "boot cdrom"

...to single user mode:

boot cdrom -s

o yea... haha :smiley:

:smiley: Just avoids having to exit from the installation program.

Start by inserting the Solaris installation CD-ROM and then halt the system. Press...
Stop-A

This will bring you the OK prompt. Now type:
boot cdrom -s

and after a few minutes you will automatically be logged in as root in single user mode. It is possible that you get messages from your system claiming that some partitions were not cleanly unmounted. If this is the case check the partition as follows (assuming that your root partition is mounted on /dev/dsk/c0t0d0s0):

 fsck -y /dev/dsk/c0t0d0s0

Now mount your root partition...
mount /dev/dsk/c0t0d0s0 /a
and edit /a/etc/shadow. Find root's entry in this file and remove the second field (encrypted root password) so it looks like...

 root::84624::::::

After making your change, save the file and reboot the system.
reboot
You are now able to log into the system without a password for root. So now use the passwd command to set root's password.