LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-22-2010, 07:23 PM   #1
pafinator11
Member
 
Registered: Jul 2005
Location: Massachusetts
Distribution: Debian Lenny, FreeBSD
Posts: 89

Rep: Reputation: 15
Exclamation Can only login to single user mode


I'm running debian lenny. Suddenly when I rebooted my system I was unable to login. I type root and the password and it tells me the login is incorrect.

If I boot into single user mode, it accepts the password just fine. Looking in the /etc/shadow file, it appears to be fine as well.

Running passwd to set a new password sets a new password just fine, i can login to single user mode with the new password, however, I cannot login at a higher runlevel with the password.

If I delete a password in the /etc/shadow file, then try to login as that user, it simply says "Login Incorrect" without even asking for a password.

HELP!
 
Old 03-22-2010, 07:37 PM   #2
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
are you trying to login as root into gui? because if i'm not mistaken either pam or selinux explicitely forbids logging into the desktop as root, however you could modify the appropriate config file to allow this but otherwise it is set to simply fail login if username is root (or maybe even uid 0) even if the password is correct, try logging in as normal user
it's usually not recomended to log in as root anyways, but rather log in as normal user then use sudo or su to accomplish root tasks
 
Old 03-22-2010, 07:42 PM   #3
pafinator11
Member
 
Registered: Jul 2005
Location: Massachusetts
Distribution: Debian Lenny, FreeBSD
Posts: 89

Original Poster
Rep: Reputation: 15
This system is command line only. It fails login on all user accounts including root. The problem hasn't happened until today. I've been using this system for 6 months.
 
Old 03-22-2010, 07:56 PM   #4
pafinator11
Member
 
Registered: Jul 2005
Location: Massachusetts
Distribution: Debian Lenny, FreeBSD
Posts: 89

Original Poster
Rep: Reputation: 15
I'm no linux expert, so help me a bit...
What's the difference between the login method in single user mode and init 2+?
Is it just that in single user mode PAM is not enabled?
 
Old 03-22-2010, 08:10 PM   #5
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
If you normally log in as root (bad idea) and now can't, you may have edited /etc/securetty and blocked yourself

cheers
 
Old 03-22-2010, 08:13 PM   #6
pafinator11
Member
 
Registered: Jul 2005
Location: Massachusetts
Distribution: Debian Lenny, FreeBSD
Posts: 89

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by kbp View Post
If you normally log in as root (bad idea) and now can't, you may have edited /etc/securetty and blocked yourself

cheers
Nope. Root is set to login fine on nearly every terminal you could ever think of.

It's not just root that can't login. It's every user, super user or not.
 
Old 03-22-2010, 08:29 PM   #7
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Have a look at /var/log/messages .. you may see some relevant errors. Have you changed anything to do with pam ?
 
Old 03-22-2010, 08:40 PM   #8
pafinator11
Member
 
Registered: Jul 2005
Location: Massachusetts
Distribution: Debian Lenny, FreeBSD
Posts: 89

Original Poster
Rep: Reputation: 15
Nothing in there to do with PAM. Hmmm...
I have a theory...
I think somehow the passwords are being encrypted in a format that PAM isn't set to read.

Before uploading this, I used passwd to change the root password to the letter a so no one can steal my password.
Take a loot at /etc/passwd... heres the root line:
root:x:0:0:root:/root:/bin/bash
everything okay there? I'm not sure what the 0's mean.

Now heres /etc/shadow
root:$1$aOZ7l1FI$LaOg/Oozn.XT7LrDXi1d90:14690:0:99999:7:::

First, does that line look okay?
Second, what encryption format is that?
 
Old 03-22-2010, 08:59 PM   #9
pafinator11
Member
 
Registered: Jul 2005
Location: Massachusetts
Distribution: Debian Lenny, FreeBSD
Posts: 89

Original Poster
Rep: Reputation: 15
Also interesting...

debian:/etc# pwck
user lp: directory /var/spool/lpd does not exist
user news: directory /var/spool/news does not exist
user uucp: directory /var/spool/uucp does not exist
user list: directory /var/list does not exist
user irc: directory /var/run/ircd does not exist
user gnats: directory /var/lib/gnats does not exist
user nobody: directory /nonexistent does not exist
pwck: no changes
 
Old 03-22-2010, 09:38 PM   #10
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Those passwd and shadow entries look fine, the '0's are the uid and gid respectively for root, the hashing algo looks like md5 going by the '$1$' prefix, nothing unusual

The problem may not be pam related, is there anything else in /var/log/messages ?

Last edited by kbp; 03-22-2010 at 09:40 PM.
 
Old 03-22-2010, 09:47 PM   #11
pafinator11
Member
 
Registered: Jul 2005
Location: Massachusetts
Distribution: Debian Lenny, FreeBSD
Posts: 89

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by kbp View Post
the hashing algo looks like md5 going by the '$1$' prefix, nothing unusual
I think that's it... in the configuration file for pam it says the default encryption is DES and the line which manually sets it to anything else is commented out. I'm now nowhere near the box. I'll give this a shot tomorrow.
 
Old 03-22-2010, 09:53 PM   #12
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Have you run 'authconfig' recently ?
 
Old 03-23-2010, 07:31 AM   #13
pafinator11
Member
 
Registered: Jul 2005
Location: Massachusetts
Distribution: Debian Lenny, FreeBSD
Posts: 89

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by kbp View Post
Have you run 'authconfig' recently ?
Not recently, no. The most recent thing I did was compile mono. It had a significant number of dependencies which needed to be satisfied, so any one of them could have screwed with the login settings.

Tonight I'll take another whack at this.
 
Old 03-23-2010, 01:28 PM   #14
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
If you are having problems logging in as anyone but root, you should check your disk space.

When your / partition gets full, strange things happen.

Fortunately, a default of 5% of the filesystem allocated to / is reserved exclusively for the user root, so you can still login as root and fix things up, before there is not even enough space free for root to login.

So, please login (no GUI) as root and tell us the output of df -h
 
Old 03-23-2010, 02:27 PM   #15
pafinator11
Member
 
Registered: Jul 2005
Location: Massachusetts
Distribution: Debian Lenny, FreeBSD
Posts: 89

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by tredegar View Post
If you are having problems logging in as anyone but root, you should check your disk space.

When your / partition gets full, strange things happen.

Fortunately, a default of 5% of the filesystem allocated to / is reserved exclusively for the user root, so you can still login as root and fix things up, before there is not even enough space free for root to login.

So, please login (no GUI) as root and tell us the output of df -h
Root also cannot login in runlevel 2 and up. Root can only login when booting into single user mode. There is no GUI on this machine. It is a server and command line only. That may just mean that I've used up all the space possible and root can't even login anymore. I'll look into it.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
single user mode under vxfs mode enabled. UltraSoul Solaris / OpenSolaris 1 06-27-2009 09:48 PM
GDM and KDM won't login (single user mode works fine...) jmite Ubuntu 2 04-15-2009 08:36 AM
how do i get into single user mode please wrighty2008 Linux - Newbie 5 01-06-2009 09:58 AM
Cannot login with any user except in single user mode scheidel21 Linux - Desktop 1 03-19-2008 01:42 PM
single user mode aashishdhabarde Linux - Kernel 1 01-31-2008 05:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:16 AM.

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
Open Source Consulting | Domain Registration