Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I've forgotten/lost the root password

Administration

I've forgotten/lost the root password

by  harris79  Posted    (Edited  )
Load the Solaris cdrom (This does not have to be the same Solaris version as the machine.)

Take the machine down to the PROM level -
# init 0 (or halt)

When it comes down to the OK prompt -
OK boot cdrom -s

When it is back up -
# mount /dev/dsk/c0t0d0s0 /a (your root device/partition)
# fsck /dev/dsk/c0t0d0s0 (optional, if you can't mount disk)
# cd /a/etc
# TERM=vt100;export TERM
# vi shadow and remove second field on root line

The root line should like -
root::12345:::::: (it must start root:: the other values are not important)

wq! (or x!)
init 6 (or reboot)

When the machine comes back up -
passwd (set a new root password)

Steve
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top