The Kerberos 5 authentication component provides functions to verify the identity of a user (
pam_sm_authenticate()) and to set user specific credentials (
pam_sm_setcred()).
pam_sm_authenticate() converts the supplied username into a Kerberos principal, by appending the default local realm name. It also supports usernames with explicit realm names. If a realm name is supplied, then upon a successful return, it changes the username by mapping the principal name into a local username (calling
krb5_aname_to_localname()). This typically just means the realm name is stripped.
It prompts the user for a password and obtains a new Kerberos TGT for the principal. The TGT is verified by obtaining a service ticket for the local host.
When prompting for the current password, the authentication module will use the prompt “
Password for <principal>:”.
The
pam_sm_setcred() function stores the newly acquired credentials in a credentials cache, and sets the environment variable
KRB5CCNAME appropriately. The credentials cache should be destroyed by the user at logout with
kdestroy(1).
The following options may be passed to the authentication module:
debug
syslog(3) debugging information at
LOG_DEBUG level.
no_warn
suppress warning messages to the user. These messages include reasons why the user's authentication attempt was declined.
use_first_pass
If the authentication module is not the first in the stack, and a previous module obtained the user's password, that password is used to authenticate the user. If this fails, the authentication module returns failure without prompting the user for a password. This option has no effect if the authentication module is the first in the stack, or if no previous modules obtained the user's password.
try_first_pass
This option is similar to the use_first_pass option, except that if the previously obtained password fails, the user is prompted for another password.
renewable=timeperiod
Obtain renewable Kerberos credentials for the user. The renewable time can be specified, or it defaults to one month. Since spaces are not allowed in the pam configuration time, underscores are used to form parseable times (e.g., 1_month).
forwardable
Obtain forwardable Kerberos credentials for the user.
no_ccache
Do not save the obtained credentials in a credentials cache. This is a useful option if the authentication module is used for services such as ftp or pop, where the user would not be able to destroy them. [This is not a recommendation to use the module for those services.]
ccache=name
Use name as the credentials cache. name must be in the form type:residual. The special tokens ‘%u', to designate the decimal UID of the user; and ‘%p', to designate the current process ID; can be used in name.