Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
2  
What happens when you try to login as a normal user? –  Michael Mrozek Feb 1 '11 at 6:32
1  
What messages are in your logs (/var/log/security or /var/log/messages)? –  Christian Feb 1 '11 at 7:30
1  
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

2 Answers 2

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

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

Your Answer

 
discard

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