cancel
Showing results for 
Search instead for 
Did you mean: 

forgot root password rootdisk encapsulated

Orly_Tampoco
Level 3
Hi guys,

Does anyone know the procedure how to reset the root password when rootdisk is encapsulated/mirrored.

I have try to boot from cdrom and mount the root partition and edit the shadow file but this cause the system to panic and never boot up.

TIA.
7 REPLIES 7

Stumpr2
Level 6
Restore the password from backupMessage was edited by:
Bob Stump

John_Nam
Level 2
Orly, why can't you mount the root disk like normal? It should be a regular UFS file system.

boot -s cdrom

mount /dev/dsk/c0t0d0s0 /mnt/a
** or use whatever your disk device is.

Kumaran_Ramalin
Level 2
Orly, why can't you mount the root disk like normal? It should be a regular UFS file system.

boot -s cdrom

mount /dev/dsk/c0t0d0s0 /mnt/a
** or use whatever your disk device is.


Do the same on the mirrored disk as well. Otherwise the mirror will sync the old password.

Antony_Pavlenko
Level 4
Sun has SUE disk (last version is 3.6). It contains VX products too. So you can bott form this disk, import rootdg, mount volume and edit /etc/shadow.

Volker_Deleted
Level 3
Once you mount a partition that is also part of a volume read/write you get inconsistent mirrors because you only change one "side" of the mirror.
That can and most likely will lead to unpredictable behavior, most likely sooner or later the system will panic (as it did in your case).
Since you still have to log in even if you run single-user there is only really one way to do it right if you are lacking an alternative boot device with VxVM on it. (There are some shortcuts to this procedure but you would have to know a whole lot about how VxVM works in order to use them safely.). The following assumes the disk in question is named "rootdisk" and is member of the disk group "rootdg".
1) Boot from CD
2) Mount a partition to /mnt and change /mnt/etc/passwd
3) Change /mnt/etc/vfstab so that root will be mounted from the relevant partition (i.e. the one you are currently changing). Change the /mnt/etc/vfstab entries for swap, /var and /usr, too. This will effectively unencapsulate your disk.
4) Change /mnt/etc/system and remove the two lines from VxVM that point to the root device. They look roughly like this:
set rootdev=/dev/pseudo/vxio:0
set vxio:rootdev-is-volume=1
Delete these lines or comment them out using an asterisk (NOT #).
5) Reboot normally. The system comes up with the new password and with VxVM enabled, but swap and the root, /usr, and /var filesystems are mounted from partitions.
6) Re-encapsulate your rootdisk. In order to do so, you must first unconfigure it from VxVM: vxdg rmdisk -g rootdg rootdisk; /etc/vx/bin/vxdiskunsetup c#t#d#. If you get any error message concerning volumes that are still on that disk then get rid of them using: vxassist -g rootdg remove mirror \!rootdisk.
7) Mirror from the rootdisk to the rootmirror
8) If you had any other volumes (like /export/home and /export/opt) on the rootdisk then they had been converted to volumes and their partition table entries deleted when you first encapsulated your rootdisk. They are still left as volumes on the rootMIRROR disk, so mirror them again using standard vxassist commands.

If you need more info and speak german, there is now a book about VxVM (and VCS, by the way). Here is the link:
http://www.amazon.de/gp/product/3540346104/028-2942529-6037366?v=glance&n=299956

Good luck. I`ll be watching.

Volker_Deleted
Level 3
I forgot one thing: use "vxmirror" to mirror the rootdisk, not vxassist. If you already ran vxassist, then issue a "vxbootsetup" command. This will bring your partition tables in sync with the plexes.

Volker_Hermin1
Level 4
If you are satisfied with my reply, please mark this thread as answered. This will show other participants that there is some wothhile information in here, and it will keep my spirits up by awarding me some - admittedly meaningless - points ;)