Lost Solaris password?

If you forget your root password follow this procedure to erase the current password and specify a new one.

Let’s start by inserting the Solaris installation CD-ROM and then shutting down 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::98765::::::

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.

One Response to “Lost Solaris password?”

  1. anonymous says:

    KarKoma
    Is it possible to to reset the password and the user name
    have a blade 100 its loaded with Solaris 8 (I have solaris 7 disks) Do not have any idea of the user name or the password.
    Many thanks

    Martin

Leave a Reply

You must be logged in to post a comment.