By robertlam18
Hi I want to lockout the root account for several minutes for wrong password. I think PAM package is already installed on Digital Ocean droplet. I am told to add this
auth required pam_tally2.so deny=3 onerr=fail lock_time=1800
auth required pam_env.so
to nano /etc/pam.d/system-auth
However my droplet don’t have system-auth
when I run /sbin/pam_tally2 I get the below even though I can see the file
pam_tally2: No such file or directory
Please me know how to setup the account lockout function. Before I download and recompile PAM and risk messing up my server I wonder if there is a tested method on solving this. cheers.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Are you trying to follow a guide for CentOS on Ubuntu? On an Ubuntu system you would use:
nano /etc/pam.d/common-auth
Running pam_tally2 will give you the error:
pam_tally2: No such file or directory
But if you pass it arguments it will show the appropriate output. For instance:
# pam_tally2 --user=root
Login Failures Latest failure From
root 0
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.