Action if login happened
Sascha Ochsenknecht
s.ochsenknecht at web.de
Thu Jan 15 19:38:22 UTC 2009
Hi,
I would like to execute a command whenever somebody tries to login on a
machine. The command should have following information (via env or
something else):
a) username
b) login successful / login failed
c) if failed -> why? (password wrong or non-existing username)
I played a bit with pam_exec, but I'm not sure how to pass the
information to the command specified with the pam_exec module. I know
that I can get the username from the env PAM_USER. But the other
information?
Another question is in which pam config file (probably common-auth, this
is included by almost every other service) and at which position should
I put the pam_exec module?
Currently I didn't find a solution, maybe somebody can help me!?
Thanks in advance,
Sascha
More information about the Pam-list
mailing list