LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices



Reply
 
Search this Thread
Old 11-23-2007, 02:42 AM   #1
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Rep: Reputation: 30
Unable to login as 'root'


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 !!!!!

Last edited by ajeetraina; 11-23-2007 at 02:46 AM.
 
Old 11-23-2007, 03:24 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
How about shadow: is installed, /etc/shadow exists, any indication that shadow libraries not properly installed or referenced (ldd on /etc/passwd shows /lin/libshadow.* refs when shadow is used)?

Can you "su -" to root?
 
Old 11-23-2007, 03:47 AM   #3
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Original Poster
Rep: Reputation: 30
Ya ..shadow file exists.the contents are :
root:!:!:13840:0:999999:0:7:
bin:
daemon:
lp:syncasswd.............all entries are there.


I ran #ldd /etc/passwd and it threw:
you dont have exception permission for /etc/passwd not a dynamic executable

#su -
su:user root doesnt exist


aNY IDEA??
 
Old 11-23-2007, 03:47 AM   #4
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Sounds odd, but this also looks odd:
Quote:
This morning I tried to login as root in fedora machine it throws:

sh-3.00 # passwd root
Two points: first of all, to be able to run 'passwd', you need to be logged in already. So if you were able to run it, you actually had logged in (and to be able to passwd root's password, you need to be root or have loose sudo rights). Second point: there's a # after the sh prompt, which (to me at least) looks like you are logged in as root. Now am I right, or is there something odd going on there too? The rest of the thing surely does look odd..

You haven't tried to clone the root user, or make another user have root ID (0) - because such things, when failing, could cause something like this. Read passwd trough and first of all make sure there is no other ID 0 user there..

If you can't figure out what it is, or suspect there's a possibility somebody got in and is causing that, a clean overwrting reinstallation of your OS is the way to go, to be fairly sure.

Quote:
root:!:!:13840:0:999999:0:7:
I'm not sure if that's a valid entry..the exclamation marks (!) don't usually belong there. Added to a password field, for example, effectively cause the password to be "unreadable", thus locking the account (but still it should be there, just not let you in). Maybe you could try clearing the password field (and maybe go trough the other fields and see that their information is correct, or at least looks correct) and see if it zeros the password information. But if you can access the shadow file, you're logged in as root or have your system pretty well wrecked up.

Last edited by b0uncer; 11-23-2007 at 03:50 AM.
 
Old 11-23-2007, 04:04 AM   #5
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Original Poster
Rep: Reputation: 30
I am logged in as single user .So its clear that sh# will be displayed.
Since I was not able to login as normal runlevel I logged in runlevel 1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to login as user; can login as root. rksanders Debian 24 02-09-2011 09:01 AM
Unable to login as a root paragkalra Linux - Security 1 10-19-2007 01:51 AM
Root Unable To Login manoj.u.kumar Red Hat 3 07-03-2007 05:32 AM
Unable to login as root. Rax42 Linux - Newbie 4 02-05-2007 09:57 AM
Unable to login using non-root account saxophobe Linux - Security 4 06-28-2004 09:58 AM


All times are GMT -5. The time now is 02:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration