Computing.Net > Forums > Solaris > Forgotten my Root Passwd

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Forgotten my Root Passwd

Reply to Message Icon

Name: Larry
Date: October 16, 2003 at 02:07:47 Pacific
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.

Larry



Sponsored Link
Ads by Google

Response Number 1
Name: boarddude
Date: October 16, 2003 at 04:22:31 Pacific
Reply:

man vi.....


0

Response Number 2
Name: wpatte
Date: October 16, 2003 at 11:37:29 Pacific
Reply:

Use the software cd 1 of 2 to recover the root password:

boot cdrom -s from ok prompt

mkdir /tmp/a

mount /dev/dsk/c0t0d0s0 /tmp/a

cd /tmp/a/etc

TERM=vt100; export TERM

vi shadow

delete passwd entry (13 chars) in the line for the root account


0

Response Number 3
Name: cha-to
Date: October 16, 2003 at 15:17:21 Pacific
Reply:

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

:w!

instead of just

:w

That'll save read-only files.

http://osr5doc.ca.caldera.com:457/OSUserG/_Stopping_vi.html

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.

D.O.



0

Response Number 4
Name: Larry Lim
Date: October 18, 2003 at 00:27:00 Pacific
Reply:

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!

Help!


0

Response Number 5
Name: cha-to
Date: October 18, 2003 at 09:00:14 Pacific
Reply:

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.

http://www.computing.net/solaris/wwwboard/forum/3345.html

D.O.



0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: Forgotten my Root Passwd

solaris root passwd www.computing.net/answers/solaris/solaris-root-passwd/31.html

Root passwd can't change www.computing.net/answers/solaris/root-passwd-cant-change/5022.html

wrong entry in /etc/passwd www.computing.net/answers/solaris/wrong-entry-in-etcpasswd/3175.html