LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Root login name changed (https://www.linuxquestions.org/questions/linux-general-1/root-login-name-changed-401139/)

kinetik 01-09-2006 05:41 AM

Root login name changed
 
We have a test-machine of RHEL AS3 on a VMWare server. Was running beautifully ...until someone mistakenly changed the root account's username to something else, let's call it koot.

When doing a less /etc/passwd, this is what I get:

-koot: o:0:0:root:/root:/bin/bash
t root 2880 Dec 27 15:52 passwd:

Some of us had sudoers rights which no longer work (sudo: no passwd entry for root!).

My particular account is part of the root group:

kinetik:x:500:501:Kinetik:/home/kinetik:/bin/bash


I can't make any changes whatsoever that can get the root account back to a working state...



Is there any way I can get this sorted out without having to reinstall?

trickykid 01-09-2006 05:54 AM

Moderator Note: Title changed, "Tough One" doesn't describe your actual question or your thread.

Boot your system with a rescue disk, edit your password and shadow files, reboot.

reddazz 01-09-2006 06:00 AM

Does logging in as "koot" work? If so, login as that username and edit the root section in /etc/passwd to something like,
Code:

root:x:0:0:root:/root:/bin/bash
Normally I would suggest using the Redhat installation CD or a Live CD to rescue the system, but I am not sure how you would do this using vmware.

kinetik 01-09-2006 07:14 AM

Quote:

Originally Posted by reddazz
Does logging in as "koot" work? If so, login as that username and edit the root section in /etc/passwd to something like,
Code:

root:x:0:0:root:/root:/bin/bash
Normally I would suggest using the Redhat installation CD or a Live CD to rescue the system, but I am not sure how you would do this using vmware.


That's the problem right there... I was hoping there's a way to recover it 'live', but it seems the only hope I got is to try & boot from CD in VMWare and go from there...


Anyway, thanks for the advice all. I'll post back here as soon as I solved this and let you know which route I took (fixed using bootdisk, reinstall etc.).


All times are GMT -5. The time now is 10:27 AM.