Man page - pam_set_item(3)
Packages contas this manual
- pam_putenv(3)
- pam_strerror(3)
- pam(3)
- pam_sm_setcred(3)
- pam_get_authtok(3)
- pam_error(3)
- pam_sm_acct_mgmt(3)
- pam_getenv(3)
- pam_conv(3)
- pam_start(3)
- pam_get_data(3)
- pam_sm_close_session(3)
- pam_prompt(3)
- pam_close_session(3)
- pam_setcred(3)
- pam_info(3)
- pam_get_authtok_noverify(3)
- pam_set_data(3)
- pam_xauth_data(3)
- pam_end(3)
- pam_open_session(3)
- pam_vinfo(3)
- pam_get_item(3)
- pam_getenvlist(3)
- pam_get_user(3)
- misc_conv(3)
- pam_vprompt(3)
- pam_vsyslog(3)
- pam_syslog(3)
- pam_fail_delay(3)
- pam_chauthtok(3)
- pam_acct_mgmt(3)
- pam_sm_chauthtok(3)
- pam_get_authtok_verify(3)
- pam_sm_open_session(3)
- pam_misc_setenv(3)
- pam_verror(3)
- pam_sm_authenticate(3)
- pam_authenticate(3)
- pam_misc_drop_env(3)
- pam_set_item(3)
- pam_misc_paste_env(3)
apt-get install libpam-doc
Manual
| PAM_SET_ITEM(3) | Linux-PAM Manual | PAM_SET_ITEM(3) |
NAME
pam_set_item - set and update PAM information
SYNOPSIS
#include <security/pam_modules.h>
int pam_set_item(pam_handle_t *pamh, int item_type, const void *item);
DESCRIPTION
The pam_set_item function allows applications and PAM service modules to access and to update PAM information of item_type. For this a copy of the object pointed to by the item argument is created. The following item_types are supported:
PAM_SERVICE
PAM_USER
PAM_USER_PROMPT
PAM_TTY
PAM_RUSER
Generally an application or module will attempt to supply the value that is most strongly authenticated (a local account before a remote one. The level of trust in this value is embodied in the actual authentication stack associated with the application, so it is ultimately at the discretion of the system administrator.
PAM_RUSER@PAM_RHOST should always identify the requesting user. In some cases, PAM_RUSER may be NULL. In such situations, it is unclear who the requesting entity is.
PAM_RHOST
PAM_AUTHTOK
PAM_OLDAUTHTOK
PAM_CONV
The following additional items are specific to Linux-PAM and should not be used in portable applications:
PAM_FAIL_DELAY
PAM_XDISPLAY
PAM_XAUTHDATA
PAM_AUTHTOK_TYPE
For all item_types, other than PAM_CONV and PAM_FAIL_DELAY, item is a pointer to a <NUL> terminated character string. In the case of PAM_CONV, item points to an initialized pam_conv structure. In the case of PAM_FAIL_DELAY, item is a function pointer: void (*delay_fn)(int retval, unsigned usec_delay, void *appdata_ptr)
Both, PAM_AUTHTOK and PAM_OLDAUTHTOK, will be reset before returning to the application. Which means an application is not able to access the authentication tokens.
RETURN VALUES
PAM_BAD_ITEM
PAM_BUF_ERR
PAM_SUCCESS
PAM_SYSTEM_ERR
SEE ALSO
pam_get_item(3), pam_strerror(3)
| 06/29/2025 | Linux-PAM |