Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lost root password

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Not a while ago I posted a message like this. I got some help, and I think I'm on the one-yard line. I lost my root password, I don't have any root/boot diskettes. OpenServer version 5.0.0. I have managed to use the N1/N2 diskettes for the 3.2 Unix, and I'm able to mount the hard disk in /mnt. But I cannot access the bin directory. The command "/etc/chroot /mnt /bin/su root -c passwd" does not work. I try to cd into the /mnt/bin directory, but says it doesn't exist. The only directory in which I can cd into is /mnt/etc. Can anyone help?
 
With hard drive mounted
cd /mnt/etc
cp shadow shadow.org (saves a copy)
ed shadow
1p (show the line)
1s/..................// (18 periods)
1p (show the line)
1s/:/root::/
w
q
move back to root dir and unmount sync and haltsys
reboot
log in as root
will force passwd at login
This will take advantage of /bin/ed which is a little different than edit but usable. It works with 3.2v4.2 and 3.2v5.0.0. But would be better if you had EBD from your 5.0.0 system as there are filesystem changes between it and 4.2.
And as usual, there are no guarantees. [sig]<p>Ed Fair<br><a href=mailto: efair@atlnet.com> efair@atlnet.com</a><br><a href= > </a><br>Any advice I give is my best judgement based on my interpretation of the facts you supply. <br>
Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.<br>
[/sig]
 
The system was configured for relax security. Will the ed commands you mentioned work on the passwd file?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top