About once a year, I'll find a way to lock myself out of a Solaris system. Here's how to get out of this scenario. You'll need a Solaris 11 Live CD or Live USB stick.
  • Boot up from the Live CD/USB
  • Select the 'Text Console' option from the GRUB menu
  • Login to the solaris console using the username/password of jack/jack
  • Switch to root
$ sudo su
password jack
  • Mount the solaris boot environment in a temporary directory
# beadm mount solaris /a
  • Edit the shadow file
# vi /a/etc/shadow
  • Find your username and remove the password hash
  • Allow empty passwords at login
$ vi /a/etc/default/login
Switch this line
  • Update the boot archive
# bootadm update-archive -R /a
  • Reboot and remove the Live CD/USB from system
# reboot
If prompted for a password, hit return since this has now been blanked.

posted by paulie
7:31 PST - February 11, 2013