Sunday, September 14, 2008

How to recover root password of Sun Server ?

















Step−by−Step Procedure



If the system is not halted, then halt the system by pressing Stop−A. This will bring you to the OK prompt.

Place the installation CD−ROM in the CD−ROM drive. Boot the system to single user mode using the CD−ROM drive.

Type : boot cdrom −s ======> If you are booting from -ROM
Type : boot net -s ======> If you are booting from Network Jump Start Server.

( For u need to server configure. That procedure is not included here)


It may take awhile, but you will automatically be logged in as root in single user mode running the OS from the CD−ROM.

1. If you had to force halt the system, by pressing Stop−A for instance, then the partitions on the hard disk will not be marked as being shutdown cleanly. If this happens, run fsck on the root partition. It is used to check and repair the file system. In this case it won't ask for the root password as it is in single
user mode. Type: fsck −y /dev/dsk/c0t3d0s0

2. Now c0t3d0s0 is just the root partition in this example. Verify your boot disk.

4. Remove root's password using your editor and edit /a/etc/shadow. Find root's entry in the file and make the second field null. Colons are the field delimeters. So your entry, after changes, should look something like:

root::10565::::::

Various fields will be used if certain parameters have been set for the OS.

5. Boot to single user mode using the hard disk.

Type: reboot −− −s

Note: That is, reboot space hyphen hyphen space hyphen s.

6.You can log in as root without a password and set root's password using the passwd command.

7. Exit single user mode and let the system continue booting to multi−user mode.

No comments: