Centos5 user locked out

Hey there,

Centos5 noob.  

I have a user who isn't able to log on to the domain.  I reset his password and he still isn't able to login.  I'm assuming that he's been locked out due to a lockout policy.  

How do I reset his user so he's not locked out.  I would need to do it via command line since the GUI users and groups application won't open (it prompts me for root credentials and then just doesn't open).

ANy help will be greatly appreciated.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Use the following command

chage -l

This will show you if it is locked.

Also, you can get the entries of this user in /etc/passwd and /etc/shadow files.  If there is a ! in front of the password hash of this user, you will have to get rid of it.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ttist25Author Commented:
Thanks Farzanj,

The output for chage -l is as follows:

Last password change: Mar 12, 2012
Password expires: never
Password inactive: never
Account expires: never
Minimum number of days between password change: 0
Maximum number of days between password change: 999999
Number of days warning before password expires: 7

Does this indicate that he's not locked out?
Run the command
grep "userID" /etc/passwd
grep "userID" /etc/shadow

Just change the userID info but show the rest of it.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

ttist25Author Commented:
myuser:x:503:100:user name:/home/myuser:/bin/bash


thanks again
It looks fine.

Now here is how I would troubleshoot it.

1.  As root, try to su - to this user.

#su - myuser


2.  Open another console and try to log on directly to this user without using root.

If not, change the password hash in /etc/shadow file.
I generated hash for password "password"

# grub-md5-crypt
Retype password:


And try to log on.  Success?

3.  Is the user trying to log on remotely?  Using ssh?  He may be restricted in ssh.

4.  Are you by any chance using LDAP for user authentication?
ttist25Author Commented:
I am able to su to myuser and also to ssh as myuser without trouble.

The user is trying to log on to the samba domain from a windows7 pro computer.  He has done this successfully (as have other users) without issue for over a year.  The win box went down over the weekend for an automatic update and he's not been able to login since.  

I had him verify that he's loging in as domain\myuser but still no joy.  

Any other ideas?
Oh, then it is a totally different issue.  It is related to Samba now.  On windows side he lost something.  You will have to check the windows part.
ttist25Author Commented:
Thanks again.
Good luck.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.