Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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).
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.