Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My normal user account isn't working correctly in CentOS, but logging in as root works fine. What should I do to debug/fix the problem?

share|improve this question
What happens when you try to login as a normal user? – Michael Mrozek Feb 1 '11 at 6:32
What messages are in your logs (/var/log/security or /var/log/messages)? – Christian Feb 1 '11 at 7:30
also check /var/log/secure for login/pam errors. – jsbillings Feb 1 '11 at 14:11
how did you setup the user a/c? – yasouser Feb 1 '11 at 16:38
what is the output of passwd -S user? – Chad Feller Aug 24 '11 at 18:57

Check the logs to see if there are any messages of note there. Try resetting your password, not saying you don't know it, but a reset will fix a couple possible issues. Then check your /etc/passwd file look for the line with your username on it and see if there is anything out of the ordinary i.e. your shell being set to 'nologin' or 'false'. Last you could remove the user acct and then add it back.

share|improve this answer
I'm with you and betting the password expired, something that doesn't happen to the root account. – barrycarter Mar 26 '11 at 15:51

You may have not used the -p option in useradd, or maybe you were like me and supplied a plain text password with the -p option, thinking that would work. The best thing to try at this point is the passwd command. Its format is:

passwd [user]

where [user] is the account's username. You'll be asked to enter a new password and to verify it. For security purposes, the password will not be displayed as you type.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.