Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
Rep:
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
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.
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?
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?
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
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 ?
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.
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.