so I am looking around and see there are messages on the log files for when a login attempt is failed, accepted, etc., but I don't see anything specifically for when an account is locked.

Could any one help on how to set that up, like a locked out message when a user reaches the limit re-tries on CentOS?

  • 1
    Interesting question. What version of CentOS or RHEL are you running? – 0xSheepdog Jun 29 '17 at 16:27
  • CentOS 7. I am not sure if this is already in place and I just have to enable it or I have to set something up myself like, when account retries reaches limit create: account locklout message, for example. – dude Jun 29 '17 at 16:48

the best solution is to check /var/log/secure file to see the successful and failed login attempts.And to collect all the records of bad login attempts by a user(john) you can use lastb john command.

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.