I’m trying to do something that you would think would be straightforward and easy to do - that admins would do as a matter of course, but I cannot find any documentation or examples to indicate it is even possible:
I want to restrict account logins to n failed attempts in a given period after which the account is disabled for a given period BUT I want this for ALL login attempts regardless how they originate. eg. if Alice enters the wrong password at the Desktop login screen, then enters the wrong password via ssh on another machine and then enters the wrong password via cockpit on that 2nd machine, I want that to count as 3 tries and disable her account on the target machine. I want to do this with one entry somewhere, ideally for all accounts with overrides for specific accounts.
I have looked at pam, PAM, pam_faillock and faillock and from what I can gather the policy has to be applied for each and every utility/application through which access is attempted (and hence for every process listed under /etc/pam.d/ - at the very least. The doc, unless I’ve missed something or it’s incomplete (not unusual) implies that any application that mediates access and ISN’T in /etc/pam.d doesn’t have to comply with any rules - surely this can’t be right ?
I assume there is a kernel routine somewhere that ultimately grants or denies access and I would have thought there was a way to configure the above policy for that regardless what was calling it.
Any suggestions ?