To reset the root password, you will need to boot to alternate media, mount the root filesystem, and clear the encrypted password from /etc/shadow
- Drop to the open boot prom
- Boot to single user mode from cd-rom or network:
- Perform the fsck - You need to know the controller, target, drive, and slice of the root filesystem:
- Mount the root filesystem on /mnt
- Set the terminal type to something vi will understand
- Remove the ecrypted password string from /mnt/etc/shadow, deleting everything between the first two colons as shown below:
- Save the file, and unmount the root filesystem
- If the root filesystem is mirrored, repeat the procedure for both halves of the mirror - otherwise, reboot and set a new password for the root user
ok} boot cdrom -s
# fsck -y /dev/rdsk/c0t0d0s0
# mount /dev/dsk/c0t0d0s0 /mnt
# TERM=vt100 # export TERM
# vi /mnt/etc/shadow root:GAXgz3AFB8m2M:6445:::::: ^^^^^^^^^^^^^
# umount /mnt