Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Centos5 user locked out

Posted on 2012-03-12
9
Medium Priority
?
351 Views
Last Modified: 2012-03-12
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.
0
Comment
Question by:ttist25
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 31

Accepted Solution

by:
farzanj earned 2000 total points
ID: 37709453
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.
0
 
LVL 1

Author Comment

by:ttist25
ID: 37709483
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?
0
 
LVL 31

Expert Comment

by:farzanj
ID: 37709532
Run the command
grep "userID" /etc/passwd
grep "userID" /etc/shadow

Just change the userID info but show the rest of it.
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 1

Author Comment

by:ttist25
ID: 37709629
/etc/passwd:
myuser:x:503:100:user name:/home/myuser:/bin/bash

/etc/shadow:
myuser:$1$F25D5MBJ$kxpeSQXqsg2bVxtxf84sul:15411:0:99999:7:::

thanks again
0
 
LVL 31

Expert Comment

by:farzanj
ID: 37709684
It looks fine.

Now here is how I would troubleshoot it.

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

#whoami
root
#su - myuser
whoami
myuser

Successful?

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

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

# grub-md5-crypt
Password:
Retype password:
$1$75nSY0$khv7ghFoAEHjIOtztHbqv0

myuser:$1$75nSY0$khv7ghFoAEHjIOtztHbqv0:15411:0:99999:7:::

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?
0
 
LVL 1

Author Comment

by:ttist25
ID: 37709759
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?
0
 
LVL 31

Expert Comment

by:farzanj
ID: 37709775
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.
0
 
LVL 1

Author Closing Comment

by:ttist25
ID: 37709785
Thanks again.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 37709801
Good luck.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question