libndr: Avoid assigning duplicate versions to symbols
[amitay/samba.git] / docs-xml / manpages / pam_winbind.8.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="pam_winbind.8">
4
5 <refmeta>
6         <refentrytitle>pam_winbind</refentrytitle>
7         <manvolnum>8</manvolnum>
8         <refmiscinfo class="source">Samba</refmiscinfo>
9         <refmiscinfo class="manual">8</refmiscinfo>
10         <refmiscinfo class="version">&doc.version;</refmiscinfo>
11 </refmeta>
12
13
14 <refnamediv>
15         <refname>pam_winbind</refname>
16         <refpurpose>PAM module for Winbind</refpurpose>
17 </refnamediv>
18
19 <refsect1>
20         <title>DESCRIPTION</title>
21
22         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
23         <manvolnum>7</manvolnum></citerefentry> suite.</para>
24
25         <para>
26         pam_winbind is a PAM module that can authenticate users against the local domain by talking to the Winbind daemon.
27         </para>
28
29 </refsect1>
30
31 <refsect1>
32         <title>SYNOPSIS</title>
33
34         <para>
35                 Edit the PAM system config /etc/pam.d/service and modify it as the following example shows:
36                 <programlisting>
37                             ...
38                             auth      required        pam_env.so
39                             auth      sufficient      pam_unix2.so
40                         +++ auth      required        pam_winbind.so  use_first_pass
41                             account   requisite       pam_unix2.so
42                         +++ account   required        pam_winbind.so  use_first_pass
43                         +++ password  sufficient      pam_winbind.so
44                             password  requisite       pam_pwcheck.so  cracklib
45                             password  required        pam_unix2.so    use_authtok
46                             session   required        pam_unix2.so
47                         +++ session   required        pam_winbind.so
48                             ...
49                 </programlisting>
50
51                 Make sure that pam_winbind is one of the first modules in the session part. It may retrieve
52                 kerberos tickets which are needed by other modules.
53         </para>
54 </refsect1>
55
56 <refsect1>
57         <title>OPTIONS</title>
58         <para>
59         
60                 pam_winbind supports several options which can either be set in
61                 the PAM configuration files or in the pam_winbind configuration
62                 file situated at
63                 <filename>/etc/security/pam_winbind.conf</filename>. Options
64                 from the PAM configuration file take precedence to those from
65                 the configuration file. See
66                 <citerefentry><refentrytitle>pam_winbind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
67                 for further details.
68
69                 <variablelist>
70
71                 <varlistentry>
72                 <term>debug</term>
73                 <listitem><para>Gives debugging output to syslog.</para></listitem>
74                 </varlistentry>
75
76                 <varlistentry>
77                 <term>debug_state</term>
78                 <listitem><para>Gives detailed PAM state debugging output to syslog.</para></listitem>
79                 </varlistentry>
80
81                 <varlistentry>
82                 <term>require_membership_of=[SID or NAME]</term>
83                 <listitem><para>
84                 If this option is set, pam_winbind will only succeed if the user is a member of the given SID or NAME. A SID
85                 can be either a group-SID, an alias-SID or even an user-SID. It is also possible to give a NAME instead of the
86                 SID. That name must have the form: <parameter>MYDOMAIN\mygroup</parameter> or
87                 <parameter>MYDOMAIN\myuser</parameter> (where '\' character corresponds to the value of
88                 <parameter>winbind separator</parameter> parameter). It is also possible to use a UPN in the form
89                 <parameter>user@REALM</parameter> or <parameter>group@REALM</parameter>. pam_winbind will, in that case, lookup
90                 the SID internally. Note that NAME may not contain any spaces. It is thus recommended to only use SIDs. You can
91                 verify the list of SIDs a user is a member of with <command>wbinfo --user-sids=SID</command>.
92                 </para>
93
94                 <para>
95                 This option must only be specified on a auth
96                 module declaration, as it only operates in conjunction
97                 with password authentication.
98                 </para>
99                 </listitem>
100                 </varlistentry>
101
102                 <varlistentry>
103                 <term>use_first_pass</term>
104                 <listitem><para>
105                 By default, pam_winbind tries to get the authentication token from a previous module. If no token is available
106                 it asks the user for the old password. With this option, pam_winbind aborts with an error if no authentication
107                 token from a previous module is available.
108                 </para></listitem>
109                 </varlistentry>
110
111                 <varlistentry>
112                 <term>try_first_pass</term>
113                 <listitem><para>
114                                 Same as the use_first_pass option (previous item), except that if the primary password is not
115                                 valid, PAM will prompt for a password.
116                 </para></listitem>
117                 </varlistentry>
118
119                 <varlistentry>
120                 <term>use_authtok</term>
121                 <listitem><para>
122                 Set the new password to the one provided by the previously stacked password module. If this option is not set 
123                 pam_winbind will ask the user for the new password.
124                 </para></listitem>
125                 </varlistentry>
126
127                 <varlistentry>
128                 <term>try_authtok</term>
129                 <listitem><para>
130                 Same as the use_authtok option (previous item), except that if the new password is not
131                 valid, PAM will prompt for a password.
132                 </para></listitem>
133                 </varlistentry>
134
135                 <varlistentry>
136                 <term>krb5_auth</term>
137                 <listitem><para>
138
139                 pam_winbind can authenticate using Kerberos when winbindd is
140                 talking to an Active Directory domain controller. Kerberos
141                 authentication must be enabled with this parameter. When
142                 Kerberos authentication can not succeed (e.g. due to clock
143                 skew), winbindd will fallback to samlogon authentication over
144                 MSRPC. When this parameter is used in conjunction with
145                 <parameter>winbind refresh tickets</parameter>, winbind will
146                 keep your Ticket Granting Ticket (TGT) up-to-date by refreshing
147                 it whenever necessary.
148
149                 </para></listitem>
150                 </varlistentry>
151
152                 <varlistentry>
153                 <term>krb5_ccache_type=[type]</term>
154                 <listitem><para>
155
156                 When pam_winbind is configured to try kerberos authentication
157                 by enabling the <parameter>krb5_auth</parameter> option, it can
158                 store the retrieved Ticket Granting Ticket (TGT) in a
159                 credential cache. The type of credential cache can be
160                 controlled with this option.  The supported values are:
161                 <parameter>KCM</parameter> or <parameter>KEYRING</parameter>
162                 (when supported by the system's Kerberos library and
163                 operating system),
164                 <parameter>FILE</parameter> and <parameter>DIR</parameter>
165                 (when the DIR type is supported by the system's Kerberos
166                 library). In case of FILE a credential cache in the form of
167                 /tmp/krb5cc_UID will be created -  in case of DIR you NEED
168                 to specify a directory which must exist, the UID directory
169                 will be created in the specified directory.
170                 In all cases UID is replaced with the numeric user id.
171                 Check the details of the Kerberos implementation.</para>
172
173                 <para>When using the KEYRING type, the supported mechanism is
174                 <quote>KEYRING:persistent:UID</quote>, which uses the Linux
175                 kernel keyring to store credentials on a per-UID basis.
176                 KEYRING has limitations. For example, it is secure kernel memory,
177                 so bulk storage of credentials is not possible.</para>
178
179                 <para>When using the KCM type, the supported mechanism is
180                 <quote>KCM:UID</quote>, which uses a Kerberos credential
181                 manager to store credentials on a per-UID basis similar to
182                 KEYRING. This is the recommended choice on latest Linux
183                 distributions that offer a Kerberos Credential Manager. If not,
184                 we suggest to use KEYRING, as those are the most secure and
185                 predictable method.</para>
186
187                 <para>It is also possible to define custom filepaths and use the "%u"
188                 pattern in order to substitute the numeric user id.
189                 Examples:</para>
190
191                 <variablelist>
192                         <varlistentry>
193                                 <term>krb5_ccache_type = DIR:/run/user/%u/krb5cc</term>
194                                         <listitem><para>This will create a credential cache file in the specified directory.</para></listitem>
195                         </varlistentry>
196                         <varlistentry>
197                                 <term>krb5_ccache_type = FILE:/tmp/krb5cc_%u</term>
198                                         <listitem><para>This will create a credential cache file.</para></listitem>
199                         </varlistentry>
200                 </variablelist>
201
202                 <para>Leave empty to just do kerberos authentication without
203                 having a ticket cache after the logon has succeeded.
204                 This setting is empty by default.</para>
205                 </listitem>
206                 </varlistentry>
207
208                 <varlistentry>
209                 <term>cached_login</term>
210                 <listitem><para>
211                 Winbind allows one to logon using cached credentials when <parameter>winbind offline logon</parameter> is enabled. To use this feature from the PAM module this option must be set.
212                 </para></listitem>
213                 </varlistentry>
214
215                 <varlistentry>
216                 <term>silent</term>
217                 <listitem><para>
218                 Do not emit any messages.
219                 </para></listitem>
220                 </varlistentry>
221
222                 <varlistentry>
223                 <term>mkhomedir</term>
224                 <listitem><para>
225                 Create homedirectory for a user on-the-fly, option is valid in
226                 PAM session block.
227                 </para></listitem>
228                 </varlistentry>
229
230                 <varlistentry>
231                 <term>warn_pwd_expire</term>
232                 <listitem><para>
233                 Defines number of days before pam_winbind starts to warn about passwords that are
234                 going to expire. Defaults to 14 days.
235                 </para></listitem>
236                 </varlistentry>
237
238                 </variablelist>
239
240         </para>
241
242 </refsect1>
243
244 <refsect1>
245         <title>PAM DATA EXPORTS</title>
246
247         <para>This section describes the data exported in the PAM stack which could be used in other PAM modules.</para>
248
249         <varlistentry>
250                 <term>PAM_WINBIND_HOMEDIR</term>
251                 <listitem>
252                         <para>
253                                 This is the Windows Home Directory set in the profile tab in the user settings
254                                 on the Active Directory Server. This could be a local path or a directory on a
255                                 share mapped to a drive.
256                         </para>
257                 </listitem>
258         </varlistentry>
259         <varlistentry>
260                 <term>PAM_WINBIND_LOGONSCRIPT</term>
261                 <listitem>
262                         <para>
263                                 The path to the logon script which should be executed if a user logs in. This is
264                                 normally a relative path to the script stored on the server.
265                         </para>
266                 </listitem>
267         </varlistentry>
268         <varlistentry>
269                 <term>PAM_WINBIND_LOGONSERVER</term>
270                 <listitem>
271                         <para>
272                                 This exports the Active Directory server we are authenticating against. This can be
273                                 used as a variable later.
274                         </para>
275                 </listitem>
276         </varlistentry>
277         <varlistentry>
278                 <term>PAM_WINBIND_PROFILEPATH</term>
279                 <listitem>
280                         <para>
281                                 This is the profile path set in the profile tab in the user settings. Normally
282                                 the home directory is synced with this directory on a share.
283                         </para>
284                 </listitem>
285         </varlistentry>
286 </refsect1>
287
288 <refsect1>
289         <title>SEE ALSO</title>
290         <para><citerefentry>
291         <refentrytitle>pam_winbind.conf</refentrytitle>
292         <manvolnum>5</manvolnum></citerefentry>, <citerefentry>
293         <refentrytitle>wbinfo</refentrytitle>
294         <manvolnum>1</manvolnum></citerefentry>, <citerefentry>
295         <refentrytitle>winbindd</refentrytitle>
296         <manvolnum>8</manvolnum></citerefentry>, <citerefentry>
297         <refentrytitle>smb.conf</refentrytitle>
298         <manvolnum>5</manvolnum></citerefentry></para>
299 </refsect1>
300
301 <refsect1>
302         <title>VERSION</title>
303
304         <para>This man page is part of version &doc.version; of Samba.</para>
305 </refsect1>
306
307 <refsect1>
308         <title>AUTHOR</title>
309         
310         <para>
311         The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by
312         the Samba Team as an Open Source project similar to the way the Linux kernel is developed.
313         </para>
314         
315         <para>This manpage was written by Jelmer Vernooij and Guenther Deschner.</para>
316
317 </refsect1>
318
319 </refentry>