Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

As the title suggests, I have locked a user account... However to test it I tried logging into the locked account. What I saw, which I expect many of you expect is the 'incorrect password' prompt at the command line.

My question is this;

Is there a file that I can edit so that blocked users get a prompt stating that their account is locked, as opposed to the incorrect password prompt?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Try with usermod --expiredate 1970-01-01 <username> it should display the message "Your account has expired; please contact your system administrator"

share|improve this answer
    
I just tried that, and I only got the login incorrect prompt... –  Adam Jul 1 '13 at 13:11
    
Try to remove --lock –  Diblo Dk Jul 1 '13 at 13:33
    
Ok it worked, thank you –  Adam Jul 1 '13 at 14:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.