Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email email@example.com
From: Julián de Navascués (julian.navascuesgmail.com)
Date: Thu Nov 20 2008 - 13:09:45 CST
I wonder if it's possible to change the username inside a PAM auth module. I
would like to do something like login with a user "guest" and map it to a
real unix user account, for example "real_user" (like a switch user command,
I have tried something like this:
int pam_sm_authenticate(pam_handle_t *pamh,int flags,int argc,const char
int retval = pam_set_item(pamh, PAM_USER, "real_user");
Using this auth module with a ssh server I would expect to login as
"real_user" and see a prompt like real_usermachine$ and /home/real_user as
the working directory... but it does not and logs that "guest" is not a
valid unix user on the machine.
I would like to know what else is needed to map users...
Thank for your help
Pam-list mailing list