Friday, July 18, 2008

Solaris10 password recovery

  1. boot Solaris machine using boot able CD-ROM or DVD
  2. select single user option (no 6)
  3. when startup is completed you can reach / partition via "/a" directory. if that not created use following command to mount it:
    mount /dev/dsk/c0t0d0s0 /a
  4. open /a/etc/shadow file using vi or other text editors. we want to edit contents of this file so first we change access permissions using this command:
    chmod 777 /a/etc/shadow
  5. remove the encrypted password for root entry and save the changes and exit text editor
  6. reboot the system
if you don't want anybody to be able to erase root password you should enable prom password protection using eeprom command.