LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   "URGENT" user root does not exist (https://www.linuxquestions.org/questions/fedora-35/urgent-user-root-does-not-exist-587272/)

Kdships 09-25-2007 12:50 PM

"URGENT" user root does not exist
 
Guys please i really need help on this. It's my server we're talking about here.

After using this for about 36hours I get a funny username or password is incorrect. Then I tried my other user account which is not the root and that worked. So, I went to the shell and typed su and what I get is this weired "user root does not exist" message. What could be the problem and what might have caused this because this is the second time this is happening to me. The last time I had to reinstall. i don't want to do that this time. Any help will be greatly appreciated.

anomie 09-25-2007 01:11 PM

What does grep ':0:' /etc/passwd show you?

Kdships 09-25-2007 01:16 PM

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

anomie 09-25-2007 01:22 PM

The entry is a little strange in that, presuming your box uses a shadow file, there is normally a * in the second field. Also, it's odd that root's home directory is set to / rather than /root. What sort of Linux distro / version are you running?

On the chance that the former is the problem, make a backup of /etc/passwd and then modify the entry to look like:
Code:

root:*:0:0:root:/:/bin/bash
Then try to su again.

Kdships 09-25-2007 01:28 PM

I run Fedora 7. how do i backup from here?

anomie 09-25-2007 01:52 PM

cp /etc/passwd /etc/passwd.bak

Then use your favorite editor to edit/save /etc/passwd.

edit: Actually this isn't going to work. If you can't become root, you can't edit /etc/passwd.

You're going to need to boot to single-user mode and then perform this operation. Better still, from single-user mode just set root's password and hopefully the passwd program will be intelligent enough to correct the situation.

Kdships 09-25-2007 02:17 PM

Guess what guys....I ran the update with fedora DVD and the root login now works but the seems to be something wrong with the interface. All the links to program ad everyother thing is gone. All i see now is an empty screen and panel with the raising high parachutes. nothing else.

I also noticed some unusual sound when I log on to roots GUI

jtshaw 09-26-2007 07:52 PM

Moved: This thread is more suitable in Linux - Distribution -> Fedora and has been moved accordingly to help your thread/question get the exposure it deserves.

wmakowski 09-27-2007 09:54 AM

The correct entry in /etc/passwd on a Fedora 7 box should be...
Code:

root:x:0:0:root:/root:/bin/bash
Specifying / instead of /root loses all the settings in the root users default directory. This is why you lost all your links. By the way it is not advisable to login as root. You should su to root or use sudo from your regular user when you need root access.

It is difficult to determine the original cause of this problem without knowing what kind of maintenance is happening on your system. Does anyone else have root access to the system? If not, retrace your steps to determine when it happened and the possible causes. Otherwise talk it over with anyone else that has access to determine the root cause so to speak. :)

Bill

Kdships 09-28-2007 09:36 AM

Thanks guys. My fedora is back and kicking!


All times are GMT -5. The time now is 01:59 AM.