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 $
4 .\" $DragonFly: src/lib/libpam/modules/pam_krb5/Attic/pam_krb5.8,v 1.2 2003/06/17 04:26:50 dillon 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 If the authentication module is not the first in the stack,
72 and a previous module obtained the user's password, that password is
73 used to authenticate the user.
74 If this fails, the authentication
75 module returns failure without prompting the user for a password.
76 This option has no effect if the authentication module is
77 the first in the stack, or if no previous modules obtained the
80 This option is similar to the
82 option, except that if the previously obtained password fails, the
83 user is prompted for another password.
85 Obtain forwardable Kerberos credentials for the user.
87 Do not save the obtained credentials in a credentials cache.
89 useful option if the authentication module is used for services such
90 as ftp or pop, where the user would not be able to destroy them.
92 is not a recommendation to use the module for those services.]
93 .It Cm ccache Ns = Ns Ar name
96 as the credentials cache.
99 .Ar type : Ns Ar residual .
102 to designate the decimal UID of the user;
105 to designate the current process ID; can be used in
108 .Ss Kerberos 5 Account Management Module
109 The Kerberos 5 account management component
110 provides a function to perform account management,
111 .Fn pam_sm_acct_mgmt .
112 The function verifies that the authenticated principal is allowed
113 to login to the local user account by calling
115 (which checks the user's
118 .Ss Kerberos 5 Password Management Module
119 The Kerberos 5 password management component
120 provides a function to change passwords
121 .Pq Fn pam_sm_chauthtok .
122 The username supplied (the
125 command, or the username given as an argument) is mapped into
126 a Kerberos principal name, using the same technique as in
127 the authentication module.
128 Note that if a realm name was
129 explicitly supplied during authentication, but not during
130 a password change, the mapping
131 done by the password management module may not result in the
132 same principal as was used for authentication.
137 password, the password management module will
138 allow any user to change any principal's password (if the user knows
139 the principal's old password, of course).
143 is always prompted for the principal's old password.
145 The password management module uses the same heuristics as
147 to determine how to contact the Kerberos password server.
149 The following options may be passed to the password management
151 .Bl -tag -width ".Cm use_first_pass"
154 debugging information at
157 .It Cm use_first_pass
158 If the password management module is not the first in the stack,
159 and a previous module obtained the user's old password, that password is
160 used to authenticate the user.
161 If this fails, the password
163 module returns failure without prompting the user for the old password.
164 If successful, the new password entered to the previous module is also
165 used as the new Kerberos password.
166 If the new password fails,
167 the password management module returns failure without
168 prompting the user for a new password.
169 .It Cm try_first_pass
170 This option is similar to the
172 option, except that if the previously obtained old or new passwords fail,
173 the user is prompted for them.
175 .Ss Kerberos 5 Session Management Module
176 The Kerberos 5 session management component
177 provides functions to initiate
178 .Pq Fn pam_sm_open_session
180 .Pq Fn pam_sm_close_session
182 Since session management is not defined under Kerberos 5,
183 both of these functions simply return success.
185 only because of the naming conventions for PAM modules.
187 .Bl -tag -width "KRB5CCNAME"
189 Location of the credentials cache.
192 .Bl -tag -width ".Pa /tmp/krb5cc_ Ns Ar uid" -compact
193 .It Pa /tmp/krb5cc_ Ns Ar uid
194 default credentials cache
196 is the decimal UID of the user).
197 .It Pa $HOME/.k5login
198 file containing Kerberos principals that are allowed access.
207 Applications should not call
209 more than once between calls to
213 when using the Kerberos 5 PAM module.