3

On my ssh server, I'm trying to hide the existence of all the users except for one. For any user besides that one user, I will get a Password: prompt which will never allow the user to enter. That's good. But for real users, after a certain number of attempts it will start printing "Account locked due to XX failed logins". It will not do this for the non-existant users. How can I disable this message?

3

The message "Account locked due to XX failed logins" is the result of your using pam_tally (most probably pam_tally2). Just comment the corresponding lines in your PAM configuration files.

  • What are the corresponding lines? I can post /etc/pam.d/sshd if that'd help. – thesecretmaster Aug 23 '17 at 22:02
  • @thesecretmaster grep -F -r tally /etc/pam* – xhienne Aug 23 '17 at 22:11
  • I see a relevant looking line in system-login, but why would that affect SSH? – thesecretmaster Aug 23 '17 at 22:13
  • Ah, nevermind. system-remote-login refers to system-login. – thesecretmaster Aug 24 '17 at 0:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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