Script run on login success/failure
I have a couple scripts that I'd like to run on two different events. One to run when I login successfully, and another to run when a login attempt is made unsuccessfully. Login will be coming from either lightdm or xscreensaver, but I'm not sure where to look to 'hook' into the event.
About this post
- Posted
- Archived
- Score
- 3 · 100% up
- Kind
- Text
- ID
- 2oxius
3 comments
PAM is definitely the thing to do this, unfortunately, PAM is a poorly documented mess.
Something like this? https://stackoverflow.com/questions/5284624/hook-into-linux-authentication-to-run-script-or-program-when-certain-conditions
Thanks, seems daunting but I'll take a look. Much appreciated.
You want .xinitrc for successful login script. No idea how you would do failed login attempts. Something to do with logind or PAM?
Edit: Why the downvotes? Am I incorrect?