Name: Larry Date: October 16, 2003 at 02:07:47 Pacific Subject: Forgotten my Root Passwd OS: Solaris9 CPU/Ram: E250/256MB
Comment:
Had forgotten my Root passwd. Tried booting to Single User mode via Cdrom, mount boot disk partition, and attempt to edit the 'root' entry of the /mnt/etc/shadow file. However, it was flag as 'Read' only, and I can't change anything within though I can view its content! The same for /mnt/etc/passwd file too!
Any workaround for this besides having to re-format my server??!! Grateful for soonest possible advise! TiA.
You needn't reformat your server. Do what you described in your original post, but when you want to edit the /etc/shadow file, use vi to view the file, and when you are ready to write, type in
If you are not familiar with vi, then my advice would be for you to get a bit more familiar with it before you attempt to edit the /etc/shadow file using vi.
Hi, Tried following tips from Response 2 & 3, but No luck still! When I tried to 'mount /dev/dsk/c0t0d0s0 /tmp/a', system prompt me "mount: the state of /dev/.. is not okay and it was attempted to be mounted read/write"
The only way I can mount the partition is 'mount -F ufs -r /dev/dsk/c0t0d0s0 /tmp/a'
However, after I've edit the /tmp/a/etc/shadow file and tried to do a ':w!', it prompted me "Shadow is a Read-only file".. Likewise for the passwd file!
well, the -r may have mounted the entire file system as read only, which would prevent you from writing to the file system. Try mounting it again, but use -rw instead of -r. If that doesn't work, try they link below. It's a previous post from here, and it's more or less what is listed above, but with a few variations that may make a difference.