Monday Feb 11, 2013

Recovering Passwords in Solaris 11

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
  • Convert
    username:iEwei23SamPleHashonf0981:15746::::::17216
    to
    username::15746::::::17216
    
  • Allow empty passwords at login
  • $ vi /a/etc/default/login
    Switch this line
    PASSREQ=YES
    to
    PASSREQ=NO
    
  • 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.
About

Hiya, my name is Paul Johnson and I'm a software engineer working on the ZFS storage appliance .

Search

Categories
Archives
« February 2013 »
SunMonTueWedThuFriSat
     
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
22
23
24
25
26
27
28
  
       
Today