There may come a time when you need to disable a users login to your Linux box… without deleting there account and still allowing them to receive the email. To do this you must login as “root” and at the command prompt type:
<root@techsoftcenter>:/#"passwd -l username"
(Without the quotes of course) This will lock the users account denying them access to login. You may be thinking “well how do I unlock it now?”, well there’s a command for that too =) At the command prompt type:
<root@techsoftcenter>:/#"passwd -u username"
(Once again without the quotes) And that will unlock the users account allowing them to login once again…
I hope it has been a useful article.