Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
/usr/lib/security/pam_krb5_migrate.so.1
pam_sm_authenticate(3PAM) uses a host-based client service principal, present in the local keytab (/etc/krb5/krb5.keytab) to authenticate to kadmind(8) (defaults to the host/nodename.fqdn service principal), for the principal creation operation. Also, for successful creation of the krb5 user principal account, the host-based client service principal being used needs to be assigned the appropriate privilege on the master KDC's kadm5.acl(5) file. kadmind(8) checks for the appropriate privilege and validates the user password using PAM by calling pam_authenticate(3PAM) and pam_acct_mgmt(3PAM) for the k5migrate service.
If migration of the user to the KerberosV5 infrastructure is successful, the module will inform users about it by means of a PAM_TEXT_INFO message, unless instructed otherwise by the presence of the quiet option.
The authentication component always returns PAM_IGNORE and is meant to be stacked in pam.conf with a requirement that it be listed below pam_authtok_get(7) in the authentication stack. Also, if pam_krb5_migrate is used in the authentication stack of a particular service, it is mandatory that pam_krb5(7) be listed in the PAM account stack of that service for proper operation (see EXAMPLES).
Provides syslog(3C) debugging information at LOG_DEBUG level.
Name of the service used to authenticate to kadmind(8) defaults to host. This means that the module uses host/<nodename.fqdn> as its client service principal name, KerberosV5 user principal creation operation or <service>/<nodename.fqdn> if this option is provided.
Do not explain KerberosV5 migration to the user. This has the same effect as passing the PAM_SILENT flag to pam_sm_authenticate(3PAM) and is useful where applications cannot handle PAM_TEXT_INFO messages. If not set, the authentication component will issue a PAM_TEXT_INFO message after creation of the Kerberos V5 principal, indicating that it has done so.
Causes the creation of KerberosV5 user principals with password expiration set to now (current time).
The following entries from pam.conf(5) demonstrate the use of the pam_krb5_migrate.so.1 module:
login auth requisite pam_authtok_get.so.1 login auth required pam_dhkeys.so.1 login auth required pam_unix_cred.so.1 login auth sufficient pam_krb5.so.1 login auth requisite pam_unix_auth.so.1 login auth optional pam_krb5_migrate.so.1 expire_pw login auth required pam_dial_auth.so.1 other account requisite pam_roles.so.1 other account required pam_krb5.so.1 other account required pam_unix_account.so.1
The pam_krb5_migrate module can generally be present on the authentication stack of any service where the application calls pam_sm_authenticate(3PAM) and an authentication token (in the preceding example, the authentication token would be the user's Unix password) is available for use as a Kerberos V5 password.
Example 2 Sample Entries from kadm5.acl
The following entries from kadm5.acl(5) permit or deny privileges to the host client service principal:
host/*@EXAMPLE.COM U root host/*@EXAMPLE.COM ui *
The preceding entries permit the pam_krb5_migrate add privilege to the host client service principal of any machine in the EXAMPLE.COM KerberosV5 realm, but denies the add privilege to all host service principals for addition of the root user account.
Example 3 Sample Entries in pam.conf of the Master KDC
The entries below enable kadmind(8) on the master KDC to use the k5migrate PAM service in order to validate Unix user passwords for accounts that require migration to the Kerberos realm.
k5migrate auth required pam_unix_auth.so.1 k5migrate account required pam_unix_account.so.1
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Evolving |