LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Make computer shutdown on failed login attempt? (https://www.linuxquestions.org/questions/linux-security-4/make-computer-shutdown-on-failed-login-attempt-914557/)

Canadian1296 11-20-2011 12:32 PM

Make computer shutdown on failed login attempt?
 
I have a computer I will be running from a LiveCD (no harddrive) for encrypting and decrypting messages and files with PGP. The setup is basically my private key will be ok the computer (in RAM) and backed up onto a truecrypt volume (memory stick). The computer will stay running. If it's shutdown, the private key will be lost as it was stored in RAM, and must be put back on from the truecrypt volume. I'm working on the LiveCD (customizing a command line distribution of Ubuntu), and I'm looking for a way to make the computer shutdown if a bad password is typed at the login screen. This way if anyone besides me tries to log in, the computer will shutdown and the private key will be lost. I have no idea where to start with this, so any help is greatly appreciated. Also, please don't criticize what I'm doing with the computer. The reason I'm doing this is to see what's possible. I want to learn as much as I can about how the operating system works :)

ptrivino 11-20-2011 01:14 PM

Swatch to watch syslog?
 
I think you could run swatch or logwatcher (?) against your log and have its action be to issue 'shutdown.' But I think you'll need to set sshd to only allow one attempt (if that's what you want). I think you could configure this while running the LiveCD but I don't know how you'd *save* it for the next boot....

Canadian1296 11-21-2011 12:03 AM

Thank you for the suggestion, I'm looking into it and it looks promising. I'll try it when I have more time. Any ideas on how to do this while in the chroot environment (when building the livecd) so its perminent?


All times are GMT -5. The time now is 03:37 PM.