Hi everyone,
I am trying to do something when a user logs in and logs out the system. I have implemented my functions and run them via syscall and they work fine. but I could not find which function runs when a user logs in so that I can call my function from that and which function runs when logs out. I tried to use pam_sm_open session() but could not call my function from there. actually I guess it is not the right function to do what I want, because nothing happen when user logs in Altoug I put some printf in the pam_sm_open_session. which functions gets run when a user logs in in kernel?
Thanks..
I am trying to do something when a user logs in and logs out the system. I have implemented my functions and run them via syscall and they work fine. but I could not find which function runs when a user logs in so that I can call my function from that and which function runs when logs out. I tried to use pam_sm_open session() but could not call my function from there. actually I guess it is not the right function to do what I want, because nothing happen when user logs in Altoug I put some printf in the pam_sm_open_session. which functions gets run when a user logs in in kernel?
Thanks..