pam_get_user (3) - Linux Man Pages
pam_get_user: get user name
pam_get_user - get user name
int pam_get_user(const pam_handle_t
*pamh, const char **user, const char *prompt);
- • The prompt argument passed to the function.
- • What is returned by pam_get_item (pamh, PAM_USER_PROMPT, ... );
- • The default prompt: "login: "
By whatever means the username is obtained, a pointer to it is returned as the contents of *user. Note, this memory should not be free()'d or modified by the module.
- User name was successful retrieved.
- A NULL pointer was submitted.
- The conversation method supplied by the application failed to obtain the username.