pam_setcred — modify/delete user credentials for an authentication service
[ flag ... ] file ...
[ library ... ]
int pam_setcred(pam_handle_t *pamh,
is used to establish, modify, or delete user credentials.
is typically called after the user has been authenticated
and after a session has been opened (refer to
The user is specified by a prior call to
and is referenced by the authentication handle,
The following flags may be set in the
field. Note that the first four flags are mutually exclusive:
Set user credentials for an authentication service.
Delete user credentials associated with an authentication service.
Reinitialize user credentials.
Extend lifetime of user credentials.
Authentication service should not generate any messages.
If none of the flags are set,
is used as the default.
for information on thread-safety of PAM interfaces.
In addition to the error return values described in
the following values may be returned upon error:
Underlying authentication service can not retrieve user credentials unavailable.
User credentials expired.
User unknown to underlying authentication service.
Failure setting user credentials.