2 .\" $Id: pam_krb5.5,v 1.5 2000/01/05 00:59:56 fcusack Exp $
3 .\" $FreeBSD: src/lib/libpam/modules/pam_krb5/pam_krb5.8,v 1.6 2001/11/24 23:41:32 dd Exp $
4 .\" $DragonFly: src/lib/pam_module/pam_krb5/pam_krb5.8,v 1.1 2005/07/12 23:04:02 joerg Exp $
10 .Nd Kerberos 5 PAM module
12 .Pa /usr/lib/pam_krb5.so
14 The Kerberos 5 service module for PAM, typically
15 .Pa /usr/lib/pam_krb5.so ,
16 provides functionality for three PAM categories:
19 and password management.
20 It also provides null functions for session management.
23 module is a shared object
24 that can be dynamically loaded to provide
25 the necessary functionality upon demand.
26 Its path is specified in the
27 PAM configuration file.
28 .Ss Kerberos 5 Authentication Module
29 The Kerberos 5 authentication component
30 provides functions to verify the identity of a user
31 .Pq Fn pam_sm_authenticate
32 and to set user specific credentials
33 .Pq Fn pam_sm_setcred .
34 .Fn pam_sm_authenticate
35 converts the supplied username into a Kerberos principal,
36 by appending the default local realm name.
37 It also supports usernames with explicit realm names.
38 If a realm name is supplied, then upon a successful return, it
39 changes the username by mapping the principal name into a local username
41 .Fn krb5_aname_to_localname ) .
42 This typically just means
43 the realm name is stripped.
45 It prompts the user for a password and obtains a new Kerberos TGT for
47 The TGT is verified by obtaining a service
48 ticket for the local host.
50 When prompting for the current password, the authentication
51 module will use the prompt
52 .Dq Li "Password for <principal>:" .
56 function stores the newly acquired credentials in a credentials cache,
57 and sets the environment variable
60 The credentials cache should be destroyed by the user at logout with
63 The following options may be passed to the authentication module:
64 .Bl -tag -width ".Cm use_first_pass"
67 debugging information at
71 suppress warning messages to the user.
72 These messages include
73 reasons why the user's
74 authentication attempt was declined.
76 If the authentication module is not the first in the stack,
77 and a previous module obtained the user's password, that password is
78 used to authenticate the user.
79 If this fails, the authentication
80 module returns failure without prompting the user for a password.
81 This option has no effect if the authentication module is
82 the first in the stack, or if no previous modules obtained the
85 This option is similar to the
87 option, except that if the previously obtained password fails, the
88 user is prompted for another password.
90 Obtain forwardable Kerberos credentials for the user.
92 Do not save the obtained credentials in a credentials cache.
94 useful option if the authentication module is used for services such
95 as ftp or pop, where the user would not be able to destroy them.
97 is not a recommendation to use the module for those services.]
98 .It Cm ccache Ns = Ns Ar name
101 as the credentials cache.
104 .Ar type : Ns Ar residual .
107 to designate the decimal UID of the user;
110 to designate the current process ID; can be used in
113 .Ss Kerberos 5 Account Management Module
114 The Kerberos 5 account management component
115 provides a function to perform account management,
116 .Fn pam_sm_acct_mgmt .
117 The function verifies that the authenticated principal is allowed
118 to login to the local user account by calling
120 (which checks the user's
123 .Ss Kerberos 5 Password Management Module
124 The Kerberos 5 password management component
125 provides a function to change passwords
126 .Pq Fn pam_sm_chauthtok .
127 The username supplied (the
130 command, or the username given as an argument) is mapped into
131 a Kerberos principal name, using the same technique as in
132 the authentication module.
133 Note that if a realm name was
134 explicitly supplied during authentication, but not during
135 a password change, the mapping
136 done by the password management module may not result in the
137 same principal as was used for authentication.
142 password, the password management module will
143 allow any user to change any principal's password (if the user knows
144 the principal's old password, of course).
148 is always prompted for the principal's old password.
150 The password management module uses the same heuristics as
152 to determine how to contact the Kerberos password server.
154 The following options may be passed to the password management
156 .Bl -tag -width ".Cm use_first_pass"
159 debugging information at
162 .It Cm use_first_pass
163 If the password management module is not the first in the stack,
164 and a previous module obtained the user's old password, that password is
165 used to authenticate the user.
166 If this fails, the password
168 module returns failure without prompting the user for the old password.
169 If successful, the new password entered to the previous module is also
170 used as the new Kerberos password.
171 If the new password fails,
172 the password management module returns failure without
173 prompting the user for a new password.
174 .It Cm try_first_pass
175 This option is similar to the
177 option, except that if the previously obtained old or new passwords fail,
178 the user is prompted for them.
180 .Ss Kerberos 5 Session Management Module
181 The Kerberos 5 session management component
182 provides functions to initiate
183 .Pq Fn pam_sm_open_session
185 .Pq Fn pam_sm_close_session
187 Since session management is not defined under Kerberos 5,
188 both of these functions simply return success.
190 only because of the naming conventions for PAM modules.
192 .Bl -tag -width "KRB5CCNAME"
194 Location of the credentials cache.
197 .Bl -tag -width ".Pa /tmp/krb5cc_ Ns Ar uid" -compact
198 .It Pa /tmp/krb5cc_ Ns Ar uid
199 default credentials cache
201 is the decimal UID of the user).
202 .It Pa $HOME/.k5login
203 file containing Kerberos principals that are allowed access.
212 Applications should not call
214 more than once between calls to
218 when using the Kerberos 5 PAM module.