PAM pam_sm_close_session doesn't start

401 views Asked by At

I'm writing a PAM module and until then everything worked well, I managed pam_sm_open_session() with great success. The edited file for process is /etc/pam.d/login with "auth requisite pam_test_x64.so"

Now I'm having trouble with pam_sm_close_session() which doesn't work at all. I mean when I logout (CTRL+D or "logout"), nothing happens. And after all, my pam_sm_close_session is in the same file where pam_sm_open_session is coded so... maybe it's normal.

for open session Doc. says : PAM framework calls pam_sm_open_session() from the modules listed in the PAM configuration

for close session : PAM framework calls pam_sm_close_session() from the modules listed in the pam.conf file

So locations seems differents ..

Where do I have to say "when the user logout load "this"", like I did for the open_session ? Thanks

Aye, the OS is Debian 7.6.0-i386

1

There are 1 answers

0
user3210859 On BEST ANSWER

Finally found out how to deal with this.

the file to edit is common-session and not login. It works like a charm now ! Hope this will be useful for someone