LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-18-2010, 01:40 PM   #1
jaypas
LQ Newbie
 
Registered: Jul 2010
Posts: 21

Rep: Reputation: 1
Unlock a User Account


Hi, all,
I ran a test where I login a test user several times using the wrong password to see that he gets locked out after several attempts. Now that I got the test user locked out, how do I unlock the test user? I tried passwd -u <test user>, but it says passwd: Error (password not set?).
Thanks,
Jaypas
 
Old 08-18-2010, 02:18 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 25,796

Rep: Reputation: 7745Reputation: 7745Reputation: 7745Reputation: 7745Reputation: 7745Reputation: 7745Reputation: 7745Reputation: 7745Reputation: 7745Reputation: 7745Reputation: 7745
Quote:
Originally Posted by jaypas View Post
Hi, all,
I ran a test where I login a test user several times using the wrong password to see that he gets locked out after several attempts. Now that I got the test user locked out, how do I unlock the test user? I tried passwd -u <test user>, but it says passwd: Error (password not set?).
Thanks,
Jaypas
Try "usermod -U <username>". Check the man pages on both for details, but from the passwd page:
Code:
-u     A system administrator can unlock the specified account, if the account is not 
passwordless afterwards (it will not unlock an account that has only  "!" 
as a password).
 
Old 08-19-2010, 09:34 AM   #3
jaypas
LQ Newbie
 
Registered: Jul 2010
Posts: 21

Original Poster
Rep: Reputation: 1
Thanks for the response. I tried usermod -U <test user>, but it is saying that the test user was not found in /etc/passwd. The server that the test user was locked out of is part of a network which is controlled by a directory server. I noticed that the userid of the test user is not in the local /etc/passwd. I'm not familiar yet with how the directory server works. I noticed that there are a bunch of ldap commands. Do you know which one I would use to unlock the test user? BTW, I've already asked the sysad to unlock the test user. I just would like to know how to unlock a user, because I plan to rerun this test again.
Thanks,
Jaypas
 
Old 08-19-2010, 09:55 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 25,796

Rep: Reputation: 7745Reputation: 7745Reputation: 7745Reputation: 7745Reputation: 7745Reputation: 7745Reputation: 7745Reputation: 7745Reputation: 7745Reputation: 7745Reputation: 7745
Quote:
Originally Posted by jaypas View Post
Thanks for the response. I tried usermod -U <test user>, but it is saying that the test user was not found in /etc/passwd. The server that the test user was locked out of is part of a network which is controlled by a directory server. I noticed that the userid of the test user is not in the local /etc/passwd. I'm not familiar yet with how the directory server works. I noticed that there are a bunch of ldap commands. Do you know which one I would use to unlock the test user? BTW, I've already asked the sysad to unlock the test user. I just would like to know how to unlock a user, because I plan to rerun this test again.
Thanks,
Jaypas
Well, LDAP is far different from local files, so it's not surprising that didn't work. You didn't mention LDAP before.

Check out the cpu-ldap tool (http://linux.die.net/man/8/cpu-ldap for the man page, with a link to the software), although it may be depreciated now. You can also use ldappasswd or ldapmodify, because resetting the password should also unlock the account.
 
Old 08-19-2010, 06:24 PM   #5
jaypas
LQ Newbie
 
Registered: Jul 2010
Posts: 21

Original Poster
Rep: Reputation: 1
Ok, I will try ldappasswd or ldapmodify.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can I unlock the root account? newbiesforever Ubuntu 24 09-28-2009 12:27 PM
[Solaris 9] unlock user account noir911 Solaris / OpenSolaris 18 09-08-2009 10:11 PM
Using RHEL 64bit Not sure how to unlock an account mccartjd Linux - Newbie 2 04-24-2008 06:26 AM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 10:02 AM
Can unlock screen with root password in my user account - want to change this sm1 Linux - Newbie 2 07-24-2005 05:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration