PAM_GET_USER - Online Linux Manual PageSection : 3
Updated : 09/03/2021
Source : Linux-PAM Manual
Note : Linux-PAM Manual

NAMEpam_get_user − get user name

SYNOPSIS#include <security/pam_modules​.h>int pam_get_user(const pam_handle_t *pamh, const char **user, const char *prompt);

DESCRIPTIONThe pam_get_user function returns the name of the user specified by pam_start(3)​. If no user was specified it returns what pam_get_item (pamh, PAM_USER, ​.​.​. ); would have returned​. If this is NULL it obtains the username via the pam_conv(3) mechanism, it prompts the user with the first non−NULL string in the following list: •  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​. This function sets the PAM_USER item associated with the pam_set_item(3) and pam_get_item(3) functions​.

RETURN VALUESPAM_SUCCESS User name was successful retrieved​. PAM_SYSTEM_ERR A NULL pointer was submitted​. PAM_CONV_ERR The conversation method supplied by the application failed to obtain the username​. PAM_BUF_ERR Memory buffer error​. PAM_ABORT Error resuming an old conversation​. PAM_CONV_AGAIN The conversation method supplied by the application is waiting for an event​.

SEE ALSOpam_end(3), pam_get_item(3), pam_set_item(3), pam_strerror(3)
0
Johanes Gumabo
Data Size   :   9,241 byte
man-pam_get_user.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 185,591
Visitor ID   :     :  
Visitor IP   :   18.119.235.107   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.