Computing.Net > Forums > Solaris > forgot the root password in solaris

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

forgot the root password in solaris

Reply to Message Icon

Name: karthick
Date: March 25, 2003 at 04:43:23 Pacific
OS: solaris
CPU/Ram: sun ent 250
Comment:

Hi

I forgot the root password in solaris 2.6.

Pls suggest me.


Regards
K.Karthick



Sponsored Link
Ads by Google

Response Number 1
Name: Mark
Date: March 25, 2003 at 05:53:39 Pacific
Reply:

First of all, you will need the Solaris Media (CD) and a CD-ROM drive attached to the machine. If you do not know what version of solaris you are running, login into the server as a normal user and type: uname -a
which should return something like the following:
SunOS yourmachinename 5.8 Generic_103640-08 sun4u sparc SUNW,Ultra-1
This means your server is running Solaris 8 (also call SunOS 5.8)

Next we need to find out where the root partition is mounted, login into the server as a normal user and type: df -k /

Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 241543 195738 21651 91% /

In this case, the root partition is mounted on /dev/dsk/c0t0d0s0. Write this down somewhere.

Insert the correct Solaris media in the CD-ROM drive

To shutdown the server, type: Stop-A

At the ok prompt, type: boot cdrom -s

Wait for the system to finish rebooting. You will be brought to the root shell in single-user mode.

From the command prompt, type the following to mount the root file system: mount [root-device] /mnt
where the root-device is the device name you wrote down above, for example: mount /dev/dsk/c0t0d0s0 /mnt

Edit the file /mnt/etc/shadow, when you open the file, the first line in the shadow file should look like this: root:0iIrCerpgZebQ:9783::::::
The second field (between the first and second colon) contains the encrypted root password. Remove it. In this case, the file should look like: root::9783::::::
After making your change, save the file

Reboot the system sync;sync;sync;reboot
You should now be able to login into the system without a password for root. The first thing you should do is set a new password for the root user and write it down.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: forgot the root password in solaris

forgot root password on ultra 5 www.computing.net/answers/solaris/forgot-root-password-on-ultra-5-/2359.html

forgot root password in sun solaris 5.8 www.computing.net/answers/solaris/forgot-root-password-in-sun-solaris-58/5120.html

Root Password www.computing.net/answers/solaris/root-password/878.html