Solaris root password recovery

from http://www.softpanorama.org/Solaris/Security/solaris_root_password_recovery.shtml

1. Put the installation CD into the CDROM drive and turn the machine on
2. while booting, press the Stop and A key simultaneously; the Stop key
is at the top left on Sun Keyboards, or Send a CTRL-BREAK (CTRL-C) to the system if connecting thru the console; serial port.
3. Either way, you should get {ok} prompt
4. type boot cdrom s and hit return without the quotes.
5. The machine will be booting in a single user mode off of the cdrom
6. When you get the hash prompt #, type cd /tmp and hit Enter
7. Issue the command mkdir /mnt without the quotes and hit Enter. If any
errors, use the p option; e.g., mkdir p /tmp/mnt.
8. Issue the command mount /dev/dsk/c0t0d0s0 /tmp/mnt and hit Enter. This will mount the old root / partition which is allows to modify the shadow file.
9. If any errors with mount, run the command fsck /dev/rdsk/c0t0d0s0 y
without the quotes which should fix the disk problems. Mount using step 8
command.
10. Issue the command cd /tmp/mnt/etc and hit enter
11. Now you should be able to see the shadow file which you can edit or copy from the old version; you saved a copy right?
12. If you don t have the old password, just make the 2nd field blank
13. If you need to change the shell, edit password file.
14. Run fsck on other partitions as well such as /dev/rdsk/c0t0d0s7, etc.
15. halt and restart the machine, e.g., init 6, or shutdown g 0 y, or reboot, etc.
You should be able to login as before or just hit the enter for password.

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com 標誌

您的留言將使用 WordPress.com 帳號。 登出 /  變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 /  變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 /  變更 )

連結到 %s

%d 位部落客按了讚: