jeroennijhof/pam_script

How to obtain current session?

Closed this issue · 2 comments

Hi, sorry to bother you. I do not know where else to post this question.

How to obtain the ENVs of current session? I have pam_krb5 run to auth user. And it set a KRB5CCNAME that I need to know in pam_script_ses_open.

And another question, why PAM_AUTHTOK is "INCORRECT" if the user does not exist in /etc/passwd?

For the moment only the following ENV variables are set:

The environment variables passed by pam-script onto the script
(all will exist but some may be null if not applicable):
PAM_SERVICE - the application that's invoking the PAM stack
PAM_TYPE - the module-type (e.g. auth,account,session,password)
PAM_USER - the user being authenticated into
PAM_RUSER - the remote user, the user invoking the application
PAM_RHOST - remote host
PAM_TTY - the controlling tty
PAM_AUTHTOK - password in readable text

When the user doesn't exist, INCORRECT is the default PAM value.