How to recover root password (root disk is encapsulated and mirrored)
Hi Team,
I have forgotten root password.
I need to know the procedure to recover root password.
My server has Veritas volume manager and root disk is encapsulated and mirrored.
Note: I can't use the below procedure because server goes in panic mode as root disk is encapsulated and mirrored.
Sun Sparc System
----
1. Break signal from ILOM to bring system in OK system.
2. insert solaris DVD
3. boot cdrom -s (Single user mode)
4. Identify boot disk
eeprom boot-device
format <find c#t#d# format of boot disk>
example disk@0,0:a --a--slice 0
now run fsck on root disk.
fsck /dev/rdsk/c1t0d0s0
5.mount /dev/rdsk/c1t0d0s0 /a
6. TERM=vt100; export TERM
7. echo $TERM
8. vi /a/etc/shadow
9. remove root password by removing the data between 1st and 2nd collon for root username.
10. cd /
umount /a
11. reboot
12. root password is blank so just press ENTER to login.
13. more /etc/shadow
14. passwd (to change root passward).
15. logout and login with new passward.
Please provide the well tested and standard procedure for my environment.
Thanks in advance.
Regards,
SK Mangal
As Mike mentioned, when you boot from CD it shouldn't start volume manager processes.
However, you will have issues when you go to reboot from disk after changing the password, as the shadow file will not be in sync between the two mirrors, so this could cause corruption.
If you're purely trying to recover the root password and have access to perform vxvm operations, it would probably be easiest to:
- detach/remove rootmirror plexes in rootdg
- boot from cd to reset root password on rootdisk
- boot from disk
- recreate/reattach rootmirror to rootdg
If you don't have access to perform vxvm operations, then you'll need to unencapsulate - see the following technote:
TECH157465: 3 ways to unencapsulate (including manual unencapsulation)
http://www.symantec.com/business/support/index?page=content&id=TECH157465
You will need to reencapsulate once you've booted back onto disk.