|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Julián de Navascués (julian.navascues
gmail.com)
Date: Thu Nov 20 2008 - 13:09:45 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi all,
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,
"su real_user")...
I have tried something like this:
int pam_sm_authenticate(pam_handle_t *pamh,int flags,int argc,const char
**argv)
{
int retval = pam_set_item(pamh, PAM_USER, "real_user");
return PAM_SUCCESS;
}
Using this auth module with a ssh server I would expect to login as
"real_user" and see a prompt like real_user
machine$ 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
Pam-list
redhat.com
https://www.redhat.com/mailman/listinfo/pam-list
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]