PDA

View Full Version : root unable to login



ajeetraina
23rd November 2007, 08:48 AM
This morning I tried to login as root in fedora machine it throws:

sh-3.00 # passwd root
passwd:unknown user name 'root'

I checked the /etc/passwd file and it says:

root:x:500:500:/home/root:/bin/bash

I tried to change 500 to 0 and again tried.
But to my surprise,it threw the same error:
passwd:unknown user name 'root'

and the file /etc/passwd get changed to root:x:500:500:/home/root:/bin/bash again


Also ,I checked the root directory..its there?
If I run #useradd root
it says: useradd:unknown gid 100
No group "mail" exists,creating mail spool with mode 0600

Can anyone help me whats going on here.???????plzzz
I am stucked !!!!!

kurzer
23rd November 2007, 09:39 AM
I don't know what you did but a normal line for root in the /etc/passwd looks like this:
root:x:0:0:root:/root:/bin/bash

The user 'root' is created automatically at the installation, and it's not possible to change the root password as normal user. Only root can change passwords of other users.

ajeetraina
23rd November 2007, 10:21 AM
No maan !!!
I was just trying to mount NFS users for the fedora Directory Server and that happened.
I know that root is numbered 0 and there is no other user with that id but wonder how can I install becoz thats the development machine..Plzz help???

ajeetraina
23rd November 2007, 10:25 AM
[QUOTE=ajeetraina]No maan !!!
I was just trying to mount NFS users for the fedora Directory Server and that happened.
I saw the /etc/passwd file and noticed that "0" being assigned to lp groupid,halt groupid and few more ..whats that?Any idea.

ajeetraina
23rd November 2007, 10:27 AM
[QUOTE=ajeetraina][QUOTE=ajeetraina]No maan !!!
I was just trying to mount NFS users for the fedora Directory Server and that happened.
I could see "0" in front of lp and shutdown groupid which tells that the root ahs rights for that? Anydiea?

stevea
23rd November 2007, 10:39 AM
I was just trying to mount NFS users for the fedora Directory Server and

Sounds like directory server is *working*.

ajeetraina
23rd November 2007, 10:45 AM
If the directory server is working but I am in runlevel 1 and in that level no eth0 card is active..how can it affect the local machien at runlevel 1???

away
23rd November 2007, 10:53 AM
I had the same problem when I played with suid/sgid :)
after a bit of browsing through /etc I found passwd.OLD along with passwd file, which I overwrote above /etc/passwd

p.s sorry if the reply is uncompetent as i am quite a newbie in linux

ajeetraina
23rd November 2007, 11:38 AM
I saw the file called passwd.OLD and mv it to passwd but the error remains.

away
23rd November 2007, 11:53 AM
Have you also overwritten /etc/shadow.OLD file over /etc/shadow? It must be also present in the directory
for me that solved the problem :)

ajeetraina
26th November 2007, 06:03 AM
No man !!! Nothing ..ok let me know how can I get out of this problem without disturbing the critical project going on in this machine.I mean can I insert the CD and go to rescue mode.OR any alternative ?