How to reset Solaris root's password, if you have forgotten the original one
Follow these steps to reset a forgotten root password:
You will need to have the Solaris Installation disk haddy.
- Press the STOP key and the letter A key together. This will bring the SUN computer to the OK prompt.
- Put the solaris software cdrom into the cdrom drive.
- Type "boot cdrom -s" at the OK prompt to go to the single user mode
- Once the pound sign (#) is vissiable, you must run the command "fsck -y" on the partion with the /etc/shadow file in it.
- Type "fsck -y /dev/rdsk/c0t3d0s0" or use what ever target number is harddrive (t0 or t1).
- Next you must mount the slice to the cdrom. Type mount /dev/dsk/c0t3d0s0 /a
- Type the following commands at the pound sign (#).
- TERM=sun
- export TERM
- chmod 600 /a/etc/shadow
- vi /a/etc/shadow
- Once in the vi edit mode, you must change the following first line to make it look the following second line:
- root:09PsdfrJut:9259:::::::
- root::::::::
- Wirte and quit vi by using hitting the "esc" key and then ":wq!"
- Unmout the drive by typing the following commands:
- cd /
- umount /a
- fsck /dev/rdsk/c0t3d0s0
- init 6
- After the system reboots, you can login to root without a password.
- To establish a new root password, use the passwd command from a terminal window.




