General discussion

Locked

VERY URGENT!!!

By gregberry ·
root user was deleted. need to recover it. tried the procedures to reset the root password in single user mode but is says root is unknown user.

This conversation is currently closed to new comments.

14 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

VERY URGENT!!!

by DKlippert In reply to VERY URGENT!!!
Collapse -

VERY URGENT!!!

by gregberry In reply to VERY URGENT!!!

Poster rated this answer

Collapse -

VERY URGENT!!!

by maxwell edison In reply to VERY URGENT!!!

I ran across this solution:

You should be able to reboot into single user mode and fix your password file. You'll probably have to do a reset or cycle power unless you are using a machine that has a way to soft boot from
the keyboard. You'll want to run sync a few times before hitting the power button of course.

Found at the following thread:

http://www.sudo.ws/pipermail/sudo-workers/2000-March/thread.html#106

Another source:

"Restore root/usr file system"

http://axp603.gsi.de:8080/www/eng/vms/qaa/dux_rrest.htmlx

REMOVE SPACES from the pasted URLs

Collapse -

VERY URGENT!!!

by maxwell edison In reply to VERY URGENT!!!

Another thread:

"Unix root user password problem"

http://www.computing.net/unix/wwwboard/forum/3004.html

REMOVE SPACES from the pasted URL

Collapse -

VERY URGENT!!!

by gregberry In reply to VERY URGENT!!!

Poster rated this answer

Collapse -

VERY URGENT!!!

by alveden In reply to VERY URGENT!!!

Wish you would specify which flavour of unix you are using. Variations in booting procedures and password files.

Anyway in generic terms.
1. Use an boot up floppy/cdrom to boot into single user mode.
2. Mount the partition of the HD installation containing the /etc directory.
3. Insert/Modify entry of the password and the shadow password file.
4. Reboot using the HD installation
5. Login as root then change the root password.

Below are some steps for solaris and RedHat. However if you are no runing either, comment on your OS version and I give you the steps.

Step for a recovery on solaris OS
1. Insert the solaris installation disc 1 into cdrom drive.
2.a. If machine is still running and stop A is not diable, hit stop A to get to the "ok" prompt. Jump to 3
2.b If machine is not running, powercycle the machine and hit stop A to get the "ok" prompt.
3. Boot to single user mode from cd by entering this command - boot -s cdrom
4. do a "mount $PATHTOYOURDEV /a"
5. vi the /a/etc/passwd, check for the root entry .. either add/modify the line .. which should look something like this.

root:0:1:Super-User:/bin/sh

6. vi the /a/etc/shadow, insert/modify to this entry

root::::::::

*note the number of colonis essential, in both entry.

7. "cd /" then "umount /a"
8. Do a "boot -s" and that will take you back to the hard drive installation.
9. Change the password.

Collapse -

VERY URGENT!!!

by alveden In reply to VERY URGENT!!!

Step for a recovery on RedHat linux OS
1. Insert the linux installation disc 1 into cdrom drive.
2. Powercycle the machine and boot using cdrom.
3. At the installation option menu, type "linux rescue", follow the instruction (some distribution will mount the partitions on c automatically) and you will reach a shell prompt.
4. If partition is not automatically mounted, you will need to
mkdir /temp/mnt
then do a "mount $PATHTOYOURDEV /temp/mnt"
5. vi the /temp/mnt/etc/passwd, check for the root entry .. either add/modify the line .. which should look something like this.

root:0:0:root:/root:/bin/bash

6. vi the /tmp/mnt/etc/shadow, insert/modify to this entry
root::::::::

*note the number of colon is essential, in both entry.

7. Logout and reboot. Remove all installation media.
8. Boot to single user mode and change password.

Collapse -

VERY URGENT!!!

by alveden In reply to VERY URGENT!!!

The entry in the /etc/shadow should have 8 trailing colon.

Collapse -

VERY URGENT!!!

by gregberry In reply to VERY URGENT!!!

Poster rated this answer

Collapse -

VERY URGENT!!!

by pj In reply to VERY URGENT!!!

Inserrt the installation CDs, then upgrade the system, it will ask for the root password and create the root user again.
If this is not possible, try to log-in ain standalone mode (if it is possible) and creat a user with userid 0.
If that doesn'twork try opening the /etc/passwd and /etc/shadow /etc/security/shadow /etc/security/passwd and copy the content of another machine root user in them.

Regards.-

Pablo.-

Back to Linux Forum
14 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums