English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Can someone tell me how can I recover the administrator root account in redhat?

I would appriciate it.

2007-06-14 00:18:05 · 3 answers · asked by Milad Abedi 1 in Computers & Internet Security

3 answers

You must have access to the console for this to work. Follow these steps:


Power off the system
Power on the system, wait for the LILO/SILO/MILO prompt (platform dependent)
Depending on how lucky you are, or rather how ancient your linux distribution is, you might be able to get away with the following:

At the prompt, type 1 (where is the label you use to boot linux normally) and thus boot to single user mode.
In single user mode, linux never used to prompt for the superuser password. If this is the case with your system, simply use mount -o remount -n / and then use the passwd command to change the superuser password.
If you're blessed with a somewat more secure system, you need to do this:
At the prompt, type in init=/bin/sh (where is the label you use to boot linux normally).
Once the system dumps you at a "# " prompt, type: mount -o remount -n /
echo root2:x:0:0:::: >> /etc/passwd
echo root2:::::::: >> /etc/shadow
sync
Power cycle the system.
Once the system has booted, log in as root2 (you shouldn't be prompted for a password) and use the command passwd root to change the root pasword, then

2007-06-14 00:29:55 · answer #1 · answered by prasy 3 · 0 0

Re-install Redhat.

2007-06-14 00:24:04 · answer #2 · answered by ELfaGeek 7 · 0 0

Unless you can log onto the kernel as an administrator, I don't see how you can change anything in the core files.

In a terminal, type:

>$ id yourLogOnName

uid=1000(yourLogOnName) gid=1000(yourLogOnName) groups=1000(yourLogOnName),4(adm),20(dialout),24(cdrom),25 (floppy),29(audio),30(dip),44(video),46(plugdev),1 09(lpadmin),111(scanner)

if you don't see "adm" in any of the fields, it's going to be impossible

If yourLogOnName is in that group...

>$ nano -B /etc/group

will give you an editor to make changes in the adm file

x. Answer the questions with Y and Return

Then do a restart
>$ shutdown -r now

2007-06-14 00:39:03 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers