Re: [gdm-list] Execute script on failed login

Thanks for the quick response.

Brian Cameron wrote:


I don't believe GDM provides any sort of "failed login hook" that could
be used generically.  You could get this to work if you modified the
source code to make it function the way you describe.  To do this, I'd
just change the function which is talking to PAM to add the hook.  For
example, in the gdm_verify_user function in daemon/verify-pam.c if
using GDM 2.20 or earlier.  Similar code is in GDM head in the
daemon/gdm-session-worker.c file.

Its a pitty. I'm going to test it. But generally I would like to avoid building my own gdm instead of using the gdm from my distribution.
Would it make sense to send out an enhancement request for that?

Another approach would be to write your own PAM module which adds the
scripting hook functionality you desire.

Thats what I checked first :-). See my Post on the Linux PAM mailing list: The problem is that PAM can only decide if a login fails if the whole stack from the related config file is executed. And the result is reported to the application only.



I found out that there are various scripts/commands which can be defined to be executed on login (PreSession, PostLogin ...). I would like to do something similar when login fails. E.g. a script which sends an email when somebody tries to login with a wrong username or password.
Any ideas/suggestions how I can do this?
(A thing like /etc/gdm/FailedLogin would be great :-) )

Important for me is that the script is triggered immediately when the (failed) login happens (so, cron job which grep's the log files isn't an option).

Thanks in advance

gdm-list mailing list
gdm-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]