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.1.2.3 2001/12/17 10:08:31 ru Exp $
9 .Nd Kerberos 5 PAM module
11 .Pa /usr/lib/pam_krb5.so
13 The Kerberos 5 service module for PAM, typically
14 .Pa /usr/lib/pam_krb5.so ,
15 provides functionality for three PAM categories:
18 and password management.
19 It also provides null functions for session management.
22 module is a shared object
23 that can be dynamically loaded to provide
24 the necessary functionality upon demand.
25 Its path is specified in the
26 PAM configuration file.
27 .Ss Kerberos 5 Authentication Module
28 The Kerberos 5 authentication component
29 provides functions to verify the identity of a user
30 .Pq Fn pam_sm_authenticate
31 and to set user specific credentials
32 .Pq Fn pam_sm_setcred .
33 .Fn pam_sm_authenticate
34 converts the supplied username into a Kerberos principal,
35 by appending the default local realm name.
36 It also supports usernames with explicit realm names.
37 If a realm name is supplied, then upon a successful return, it
38 changes the username by mapping the principal name into a local username
40 .Fn krb5_aname_to_localname ) .
41 This typically just means
42 the realm name is stripped.
44 It prompts the user for a password and obtains a new Kerberos TGT for
46 The TGT is verified by obtaining a service
47 ticket for the local host.
49 When prompting for the current password, the authentication
50 module will use the prompt
51 .Dq Li "Password for <principal>:" .
55 function stores the newly acquired credentials in a credentials cache,
56 and sets the environment variable
59 The credentials cache should be destroyed by the user at logout with
62 The following options may be passed to the authentication module:
63 .Bl -tag -width ".Cm use_first_pass"
66 debugging information at
70 If the authentication module is not the first in the stack,
71 and a previous module obtained the user's password, that password is
72 used to authenticate the user.
73 If this fails, the authentication
74 module returns failure without prompting the user for a password.
75 This option has no effect if the authentication module is
76 the first in the stack, or if no previous modules obtained the
79 This option is similar to the
81 option, except that if the previously obtained password fails, the
82 user is prompted for another password.
84 Obtain forwardable Kerberos credentials for the user.
86 Do not save the obtained credentials in a credentials cache.
88 useful option if the authentication module is used for services such
89 as ftp or pop, where the user would not be able to destroy them.
91 is not a recommendation to use the module for those services.]
92 .It Cm ccache Ns = Ns Ar name
95 as the credentials cache.
98 .Ar type : Ns Ar residual .
101 to designate the decimal UID of the user;
104 to designate the current process ID; can be used in
107 .Ss Kerberos 5 Account Management Module
108 The Kerberos 5 account management component
109 provides a function to perform account management,
110 .Fn pam_sm_acct_mgmt .
111 The function verifies that the authenticated principal is allowed
112 to login to the local user account by calling
114 (which checks the user's
117 .Ss Kerberos 5 Password Management Module
118 The Kerberos 5 password management component
119 provides a function to change passwords
120 .Pq Fn pam_sm_chauthtok .
121 The username supplied (the
124 command, or the username given as an argument) is mapped into
125 a Kerberos principal name, using the same technique as in
126 the authentication module.
127 Note that if a realm name was
128 explicitly supplied during authentication, but not during
129 a password change, the mapping
130 done by the password management module may not result in the
131 same principal as was used for authentication.
136 password, the password management module will
137 allow any user to change any principal's password (if the user knows
138 the principal's old password, of course).
142 is always prompted for the principal's old password.
144 The password management module uses the same heuristics as
146 to determine how to contact the Kerberos password server.
148 The following options may be passed to the password management
150 .Bl -tag -width ".Cm use_first_pass"
153 debugging information at
156 .It Cm use_first_pass
157 If the password management module is not the first in the stack,
158 and a previous module obtained the user's old password, that password is
159 used to authenticate the user.
160 If this fails, the password
162 module returns failure without prompting the user for the old password.
163 If successful, the new password entered to the previous module is also
164 used as the new Kerberos password.
165 If the new password fails,
166 the password management module returns failure without
167 prompting the user for a new password.
168 .It Cm try_first_pass
169 This option is similar to the
171 option, except that if the previously obtained old or new passwords fail,
172 the user is prompted for them.
174 .Ss Kerberos 5 Session Management Module
175 The Kerberos 5 session management component
176 provides functions to initiate
177 .Pq Fn pam_sm_open_session
179 .Pq Fn pam_sm_close_session
181 Since session management is not defined under Kerberos 5,
182 both of these functions simply return success.
184 only because of the naming conventions for PAM modules.
186 .Bl -tag -width "KRB5CCNAME"
188 Location of the credentials cache.
191 .Bl -tag -width ".Pa /tmp/krb5cc_ Ns Ar uid" -compact
192 .It Pa /tmp/krb5cc_ Ns Ar uid
193 default credentials cache
195 is the decimal UID of the user).
196 .It Pa $HOME/.k5login
197 file containing Kerberos principals that are allowed access.
206 Applications should not call
208 more than once between calls to
212 when using the Kerberos 5 PAM module.