Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / lib / libpam / modules / pam_krb5 / pam_krb5.8
1 .\"
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 $
5 .Dd January 15, 1999
6 .Dt PAM_KRB5 8
7 .Os
8 .Sh NAME
9 .Nm pam_krb5
10 .Nd Kerberos 5 PAM module
11 .Sh SYNOPSIS
12 .Pa /usr/lib/pam_krb5.so
13 .Sh DESCRIPTION
14 The Kerberos 5 service module for PAM, typically
15 .Pa /usr/lib/pam_krb5.so ,
16 provides functionality for three PAM categories:
17 authentication,
18 account management,
19 and password management.
20 It also provides null functions for session management.
21 The
22 .Pa pam_krb5.so
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
40 (calling
41 .Fn krb5_aname_to_localname ) .
42 This typically just means
43 the realm name is stripped.
44 .Pp
45 It prompts the user for a password and obtains a new Kerberos TGT for
46 the principal.
47 The TGT is verified by obtaining a service
48 ticket for the local host.
49 .Pp
50 When prompting for the current password, the authentication
51 module will use the prompt
52 .Dq Li "Password for <principal>:" .
53 .Pp
54 The
55 .Fn pam_sm_setcred
56 function stores the newly acquired credentials in a credentials cache,
57 and sets the environment variable
58 .Ev KRB5CCNAME
59 appropriately.
60 The credentials cache should be destroyed by the user at logout with
61 .Xr kdestroy 1 .
62 .Pp
63 The following options may be passed to the authentication module:
64 .Bl -tag -width ".Cm use_first_pass"
65 .It Cm debug
66 .Xr syslog 3
67 debugging information at
68 .Dv LOG_DEBUG
69 level.
70 .It Cm use_first_pass
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
78 user's password.
79 .It Cm try_first_pass
80 This option is similar to the
81 .Cm use_first_pass
82 option, except that if the previously obtained password fails, the
83 user is prompted for another password.
84 .It Cm forwardable
85 Obtain forwardable Kerberos credentials for the user.
86 .It Cm no_ccache
87 Do not save the obtained credentials in a credentials cache.
88 This is a
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.
91 [This
92 is not a recommendation to use the module for those services.]
93 .It Cm ccache Ns = Ns Ar name
94 Use
95 .Ar name
96 as the credentials cache.
97 .Ar name
98 must be in the form
99 .Ar type : Ns Ar residual .
100 The special tokens
101 .Ql %u ,
102 to designate the decimal UID of the user;
103 and
104 .Ql %p ,
105 to designate the current process ID; can be used in
106 .Ar name .
107 .El
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
114 .Fn krb5_kuserok
115 (which checks the user's
116 .Pa .k5login
117 file).
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
123 user running the
124 .Xr passwd 1
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.
133 .Pp
134 Unlike when
135 changing a
136 .Ux
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).
140 Also unlike
141 .Ux ,
142 root
143 is always prompted for the principal's old password.
144 .Pp
145 The password management module uses the same heuristics as
146 .Xr kpasswd 1
147 to determine how to contact the Kerberos password server.
148 .Pp
149 The following options may be passed to the password management
150 module:
151 .Bl -tag -width ".Cm use_first_pass"
152 .It Cm debug
153 .Xr syslog 3
154 debugging information at
155 .Dv LOG_DEBUG
156 level.
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
162 management
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
171 .Cm use_first_pass
172 option, except that if the previously obtained old or new passwords fail,
173 the user is prompted for them.
174 .El
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
179 and terminate
180 .Pq Fn pam_sm_close_session
181 sessions.
182 Since session management is not defined under Kerberos 5,
183 both of these functions simply return success.
184 They are provided
185 only because of the naming conventions for PAM modules.
186 .Sh ENVIRONMENT
187 .Bl -tag -width "KRB5CCNAME"
188 .It Ev KRB5CCNAME
189 Location of the credentials cache.
190 .El
191 .Sh FILES
192 .Bl -tag -width ".Pa /tmp/krb5cc_ Ns Ar uid" -compact
193 .It Pa /tmp/krb5cc_ Ns Ar uid
194 default credentials cache
195 .Ar ( uid
196 is the decimal UID of the user).
197 .It Pa $HOME/.k5login
198 file containing Kerberos principals that are allowed access.
199 .El
200 .Sh SEE ALSO
201 .Xr kdestroy 1 ,
202 .Xr passwd 1 ,
203 .Xr syslog 3 ,
204 .Xr pam.conf 5 ,
205 .Xr pam 8
206 .Sh NOTES
207 Applications should not call
208 .Fn pam_authenticate
209 more than once between calls to
210 .Fn pam_start
211 and
212 .Fn pam_end
213 when using the Kerberos 5 PAM module.