Quote:
Originally Posted by Pooja2505
Permission 777 is given to script.
|
That's nice
but it's wrong. Owner should be root and access rights should be 0755 at most. Change it before doing anything else.
Quote:
Originally Posted by Pooja2505
i have added the following in /etc/pam.d/system-auth
session required /usr/local/bin/my.sh log=/etc/logfile
|
That is
not how 'man pam_exec' suggests the entry should be. It could look something like
Code:
open_session optional pam_exec.so seteuid /path/to/script
Also since you're debugging make it read
Code:
open_session optional pam_exec.so debug seteuid /path/to/script
Also do not test and debug as root but only as unprivileged user and don't use system-auth for testing as you won't be able to login if you fsck things up proper.