pam_get_user(3) 					     Library Functions Manual						   pam_get_user(3)

NAME
pam_get_user - PAM routine to retrieve user name. SYNOPSIS
[ flag ... ] file ... [ library ... ] DESCRIPTION
is used by PAM service modules to retrieve the current user name from the PAM handle. If the user name has not been set, via or then the PAM conversation function will be used to prompt the user for the user name with the string "prompt". If prompt is NULL, then is called and the value of is used for prompting. If the value of is NULL, the following default prompt is used: After the user name is gathered by the conversation function, is called to set the value of By convention, applications that need to prompt for a user name should call and set the value of before calling The service module's func- tion will then call to prompt for the user name. Note that certain PAM service modules (such as a smart card module) may override the value of and pass in their own prompt. Applications that call multiple times should set the value of to NULL with before calling if they want the user to be prompted for a new user name each time. The value of user retrieved by should not be modified or freed. The item will be released by APPLICATION USAGE
Refer to pam(3) for information on thread-safety of PAM interfaces. RETURN VALUES
Upon success, returns otherwise it returns an error code. Refer to pam(3) for information on error related return values. SEE ALSO
pam(3), pam_start(3), pam_authenticate(3), pam_get_item(3), pam_set_item(3), pam_sm(3), pam_sm_authenticate(3), pam_end(3). pam_get_user(3)