Solaris Troubleshooting – Root Password Recovery for any Solaris Version (with CD/DVD).

The most common problem that can be seen in many environment is to recover root password.

Below is the General procedure which is being used from decades in Solaris 6, 7, 8, 9 ,10.

Note: I will also present one more advanced procedure for only Solaris 10 where you dont required even CD/DVD to recover Root Password. :-)  I will present that procedure in my next post.

1.) Bring the server at OK prompt.

2.) Boot your server with the help of CD/DVD in single user mode.

OK> boot cdrom -s

3.) Once your server will boot up, mount your rootdisk at /a

# mount /dev/dsk/c0t0d0s0 /a

4.) Take a copy of /a/etc/passwd & /a/etc/shadow file.

# cp -p /a/etc/passwd /a/etc/passwd-orig
# cp -p /a/etc/shadow /a/etc/shadow-orig

5.) Now stick to ground rule and remove the encrypted password entry for root from /a/etc/shadow file.

Before Modifications:

#grep root /etc/shadow

After Modifications:

#grep root /etc/shadow

6.) Reboot your system, this time you are allowed to login into the server without password. Now first recommended thing would be to set you password for root and make the life for SA’s simple for near future..:-)

Yogesh Raheja

Yogesh working as a Consultant in Unix Engineering by profession. And he has multiple years experience in Solaris, Linux , AIX and Veritas Administration. He has been certified for SCSA9, SCSA10, SCNA10, VXVM, VCS, ITILv3. He is very much passionate about sharing his knowledge with others. Specialties: Expertize in Unix/Solaris Server, Linux (RHEL), AIX, Veritas Volume Manager, ZFS, Liveupgrades, Storage Migrations, Cluster deployment (VCS and HACMP) and administration and upgrade on Banking, Telecom, IT Infrastructure, and Hosting Services.

What is in your mind, about this post ? Leave a Reply

  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us