auth/credentials: don't ignore "client use kerberos" and --use-kerberos for machine...
[Samba.git] / docs-xml / manpages / winbindd.8.xml
blobe60bd655ec07aee9387df1abb04b4b5e6b738167
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="winbindd.8">
5 <refmeta>
6         <refentrytitle>winbindd</refentrytitle>
7         <manvolnum>8</manvolnum>
8         <refmiscinfo class="source">Samba</refmiscinfo>
9         <refmiscinfo class="manual">System Administration tools</refmiscinfo>
10         <refmiscinfo class="version">&doc.version;</refmiscinfo>
11 </refmeta>
14 <refnamediv>
15         <refname>winbindd</refname>
16         <refpurpose>Name Service Switch daemon for resolving names
17         from NT servers</refpurpose>
18 </refnamediv>
20 <refsynopsisdiv>
21         <cmdsynopsis>
22                 <command>winbindd</command>
23                 <arg choice="opt">-D|--daemon</arg>
24                 <arg choice="opt">-i|--interactive</arg>
25                 <arg choice="opt">-F|--foreground</arg>
26                 <arg choice="opt">--no-process-group</arg>
27                 <arg choice="opt">-n|--no-caching</arg>
28                 <arg choice="opt">-d &lt;debug level&gt;</arg>
29                 <arg choice="opt">--debug-stdout</arg>
30                 <arg choice="opt">--configfile=&lt;configuration file&gt;</arg>
31                 <arg choice="opt">--option=&lt;name&gt;=&lt;value&gt;</arg>
32                 <arg choice="opt">-l|--log-basename &lt;log directory&gt;</arg>
33                 <arg choice="opt">--leak-report</arg>
34                 <arg choice="opt">--leak-report-full</arg>
35                 <arg choice="opt">-V|--version</arg>
36         </cmdsynopsis>
37 </refsynopsisdiv>
39 <refsect1>
40         <title>DESCRIPTION</title>
42         <para>This program is part of the <citerefentry><refentrytitle>samba</refentrytitle>
43         <manvolnum>7</manvolnum></citerefentry> suite.</para>
45         <para><command>winbindd</command> is a daemon that provides
46         a number of services to the Name Service Switch capability found
47         in most modern C libraries, to arbitrary applications via PAM
48         and <command>ntlm_auth</command> and to Samba itself.</para>
50         <para>Even if winbind is not used for nsswitch, it still provides a
51         service to <command>smbd</command>, <command>ntlm_auth</command>
52         and the <command>pam_winbind.so</command> PAM module, by managing connections to
53         domain controllers.  In this configuration the
54         <smbconfoption name="idmap config * : range"/>
55         parameter is not required. (This is known as `netlogon proxy only mode'.)</para>
57         <para> The Name Service Switch allows user
58         and system information to be obtained from different databases
59         services such as NIS or DNS.  The exact behaviour can be configured
60         through the <filename>/etc/nsswitch.conf</filename> file.
61         Users and groups are allocated as they are resolved to a range
62         of user and group ids specified by the administrator of the
63         Samba system.</para>
65         <para>The service provided by <command>winbindd</command> is called `winbind' and
66         can be used to resolve user and group information from a
67         Windows NT server. The service can also provide authentication
68         services via an associated PAM module. </para>
70         <para>
71         The <filename>pam_winbind</filename> module supports the
72         <parameter>auth</parameter>, <parameter>account</parameter>
73         and <parameter>password</parameter>
74         module-types.  It should be noted that the
75         <parameter>account</parameter> module simply performs a getpwnam() to verify that
76         the system can obtain a uid for the user, as the domain
77         controller has already performed access control.  If the
78         <filename>libnss_winbind</filename> library has been correctly
79         installed, or an alternate source of names configured, this should always succeed.
80         </para>
82         <para>The following nsswitch databases are implemented by
83         the winbindd service: </para>
85         <variablelist>
86                 <varlistentry>
87                 <term>hosts</term>
88                 <listitem><para>This feature is only available on IRIX.
89                 User information traditionally stored in
90                 the <filename>hosts(5)</filename> file and used by
91                 <command>gethostbyname(3)</command> functions. Names are
92                 resolved through the WINS server or by broadcast.
93                 </para></listitem>
94                 </varlistentry>
96                 <varlistentry>
97                 <term>passwd</term>
98                 <listitem><para>User information traditionally stored in
99                 the <filename>passwd(5)</filename> file and used by
100                 <command>getpwent(3)</command> functions. </para></listitem>
101                 </varlistentry>
103                 <varlistentry>
104                 <term>group</term>
105                 <listitem><para>Group information traditionally stored in
106                 the <filename>group(5)</filename> file and used by
107                 <command>getgrent(3)</command> functions. </para></listitem>
108                 </varlistentry>
109         </variablelist>
111         <para>For example, the following simple configuration in the
112         <filename>/etc/nsswitch.conf</filename> file can be used to initially
113         resolve user and group information from <filename>/etc/passwd
114         </filename> and <filename>/etc/group</filename> and then from the
115         Windows NT server.
116         </para>
118 <programlisting>
119 passwd:         files winbind
120 group:          files winbind
121 ## only available on IRIX: use winbind to resolve hosts:
122 # hosts:        files dns winbind
123 ## All other NSS enabled systems should use libnss_wins.so like this:
124 hosts:          files dns wins
126 </programlisting>
128         <para>The following simple configuration in the
129         <filename>/etc/nsswitch.conf</filename> file can be used to initially
130         resolve hostnames from <filename>/etc/hosts</filename> and then from the
131         WINS server.</para>
132 <programlisting>
133 hosts:          files wins
134 </programlisting>
136 </refsect1>
139 <refsect1>
140         <title>OPTIONS</title>
142         <variablelist>
143                 <varlistentry>
144                 <term>-D|--daemon</term>
145                 <listitem><para>If specified, this parameter causes
146                 the server to operate as a daemon. That is, it detaches
147                 itself and runs in the background on the appropriate port.
148                 This switch is assumed if <command>winbindd</command> is
149                 executed on the command line of a shell.
150                 </para></listitem>
151                 </varlistentry>
153                 <varlistentry>
154                 <term>-i|--interactive</term>
155                 <listitem><para>Tells <command>winbindd</command> to not
156                 become a daemon and detach from the current terminal. This
157                 option is used by developers when interactive debugging
158                 of <command>winbindd</command> is required.
159                 <command>winbindd</command> also logs to standard output,
160                 as if the <command>-S</command> parameter had been given.
161                 </para></listitem>
162                 </varlistentry>
164                 <varlistentry>
165                 <term>-F|--foreground</term>
166                 <listitem><para>If specified, this parameter causes
167                 the main <command>winbindd</command> process to not daemonize,
168                 i.e. double-fork and disassociate with the terminal.
169                 Child processes are still created as normal to service
170                 each connection request, but the main process does not
171                 exit. This operation mode is suitable for running
172                 <command>winbindd</command> under process supervisors such
173                 as <command>supervise</command> and <command>svscan</command>
174                 from Daniel J. Bernstein's <command>daemontools</command>
175                 package, or the AIX process monitor.
176                 </para></listitem>
177                 </varlistentry>
179                 <varlistentry>
180                 <term>--no-process-group</term>
181                 <listitem><para>Do not create a new process group for winbindd.
182                 </para></listitem>
183                 </varlistentry>
185                 <varlistentry>
186                 <term>-n|--no-caching</term>
187                 <listitem><para>Disable some caching. This means winbindd will
188                 often have to wait for a response from the domain controller
189                 before it can respond to a client and this thus makes things
190                 slower. The results will however be more accurate, since
191                 results from the cache might not be up-to-date. This
192                 might also temporarily hang winbindd if the DC doesn't respond.
193                 This does not disable the samlogon cache, which is required for
194                 group membership tracking in trusted environments.
195                 </para></listitem>
196                 </varlistentry>
198                 &cmdline.common.debug.server;
199                 &cmdline.common.config.server;
200                 &cmdline.common.option;
202                 <varlistentry>
203                         <term>-l|--log-basename=logdirectory</term>
204                         <listitem>
205                                 <para>
206                                         Base directory name for log/debug files. The parent process
207                                         uses filename log.winbindd, the child process uses filename
208                                         log.wb-&lt;name>. The log file is never removed by winbindd.
209                                 </para>
210                         </listitem>
211                 </varlistentry>
213                 &cmdline.common.samba.leakreport;
214                 &cmdline.common.samba.leakreportfull;
215                 &cmdline.version;
217                 &popt.autohelp;
219         </variablelist>
220 </refsect1>
223 <refsect1>
224         <title>NAME AND ID RESOLUTION</title>
226         <para>Users and groups on a Windows NT server are assigned
227         a security id (SID) which is globally unique when the
228         user or group is created.  To convert the Windows NT user or group
229         into a unix user or group, a mapping between SIDs and unix user
230         and group ids is required.  This is one of the jobs that <command>
231         winbindd</command> performs. </para>
233         <para>As winbindd users and groups are resolved from a server, user
234         and group ids are allocated from a specified range.  This
235         is done on a first come, first served basis, although all existing
236         users and groups will be mapped as soon as a client performs a user
237         or group enumeration command.  The allocated unix ids are stored
238         in a database and will be remembered. </para>
240         <para>WARNING: The SID to unix id database is the only location
241         where the user and group mappings are stored by winbindd.  If this
242         store is deleted or corrupted, there is no way for winbindd to
243         determine which user and group ids correspond to Windows NT user
244         and group rids. </para>
246 </refsect1>
249 <refsect1>
250         <title>CONFIGURATION</title>
252         <para>Configuration of the <command>winbindd</command> daemon
253         is done through configuration parameters in the <citerefentry>
254         <refentrytitle>smb.conf</refentrytitle><manvolnum>5</manvolnum>
255         </citerefentry> file.  All parameters should be specified in the
256         [global] section of smb.conf. </para>
258         <itemizedlist>
259                 <listitem><para>
260                 <smbconfoption name="winbind separator"/></para></listitem>
261                 <listitem><para>
262                 <smbconfoption name="idmap config * : range"/></para></listitem>
263                 <listitem><para>
264                 <smbconfoption name="idmap config * : backend"/></para></listitem>
265                 <listitem><para>
266                 <smbconfoption name="winbind cache time"/></para></listitem>
267                 <listitem><para>
268                 <smbconfoption name="winbind enum users"/></para></listitem>
269                 <listitem><para>
270                 <smbconfoption name="winbind enum groups"/></para></listitem>
271                 <listitem><para>
272                 <smbconfoption name="template homedir"/></para></listitem>
273                 <listitem><para>
274                 <smbconfoption name="template shell"/></para></listitem>
275                 <listitem><para>
276                 <smbconfoption name="winbind use default domain"/></para></listitem>
277                 <listitem><para>
278                 <smbconfoption name="winbind: rpc only"/>
279                 Setting this parameter forces winbindd to use RPC
280                 instead of LDAP to retrieve information from Domain
281                 Controllers.
282                 </para></listitem>
283         </itemizedlist>
284 </refsect1>
287 <refsect1>
288         <title>EXAMPLE SETUP</title>
290         <para>
291         To setup winbindd for user and group lookups plus
292         authentication from a domain controller use something like the
293         following setup. This was tested on an early Red Hat Linux box.
294         </para>
296         <para>In <filename>/etc/nsswitch.conf</filename> put the
297         following:
298 <programlisting>
299 passwd: files winbind
300 group:  files winbind
301 </programlisting>
302         </para>
304         <para>In <filename>/etc/pam.d/*</filename> replace the <parameter>
305         auth</parameter> lines with something like this:
306 <programlisting>
307 auth  required    /lib/security/pam_securetty.so
308 auth  required    /lib/security/pam_nologin.so
309 auth  sufficient  /lib/security/pam_winbind.so
310 auth  required    /lib/security/pam_unix.so \
311                   use_first_pass shadow nullok
312 </programlisting>
313         </para>
315         <note><para>
316         The PAM module pam_unix has recently replaced the module pam_pwdb.
317         Some Linux systems use the module pam_unix2 in place of pam_unix.
318         </para></note>
320         <para>Note in particular the use of the <parameter>sufficient
321         </parameter> keyword and the <parameter>use_first_pass</parameter> keyword. </para>
323         <para>Now replace the account lines with this: </para>
325         <para><command>account    required      /lib/security/pam_winbind.so
326         </command></para>
328         <para>The next step is to join the domain. To do that use the
329         <command>net</command> program like this:  </para>
331         <para><command>net join -S PDC -U Administrator</command></para>
333         <para>The username after the <parameter>-U</parameter> can be any
334         Domain user that has administrator privileges on the machine.
335         Substitute the name or IP of your PDC for "PDC".</para>
337         <para>Next copy <filename>libnss_winbind.so</filename> to
338         <filename>/lib</filename> and <filename>pam_winbind.so
339         </filename> to <filename>/lib/security</filename>.  A symbolic link needs to be
340         made from <filename>/lib/libnss_winbind.so</filename> to
341         <filename>/lib/libnss_winbind.so.2</filename>.  If you are using an
342         older version of glibc then the target of the link should be
343         <filename>/lib/libnss_winbind.so.1</filename>.</para>
345         <para>Finally, setup a <citerefentry><refentrytitle>smb.conf</refentrytitle>
346         <manvolnum>5</manvolnum></citerefentry> containing directives like the
347         following:
348 <programlisting>
349 [global]
350         winbind separator = +
351         winbind cache time = 10
352         template shell = /bin/bash
353         template homedir = /home/%D/%U
354         idmap config * : range = 10000-20000
355         workgroup = DOMAIN
356         security = domain
357         password server = *
358 </programlisting></para>
361         <para>Now start winbindd and you should find that your user and
362         group database is expanded to include your NT users and groups,
363         and that you can login to your unix box as a domain user, using
364         the DOMAIN+user syntax for the username. You may wish to use the
365         commands <command>getent passwd</command> and <command>getent group
366         </command> to confirm the correct operation of winbindd.</para>
367 </refsect1>
370 <refsect1>
371         <title>NOTES</title>
373         <para>The following notes are useful when configuring and
374         running <command>winbindd</command>: </para>
376         <para>PAM is really easy to misconfigure.  Make sure you know what
377         you are doing when modifying PAM configuration files.  It is possible
378         to set up PAM such that you can no longer log into your system. </para>
380         <para>If more than one UNIX machine is running <command>winbindd</command>,
381         then in general the user and groups ids allocated by winbindd will not
382         be the same.  The user and group ids will only be valid for the local
383         machine, unless a shared <smbconfoption name="idmap config * : backend"/> is configured.</para>
385         <para>If the Windows NT SID to UNIX user and group id mapping
386         file is damaged or destroyed then the mappings will be lost. </para>
387 </refsect1>
390 <refsect1>
391         <title>SIGNALS</title>
393         <para>The following signals can be used to manipulate the
394         <command>winbindd</command> daemon. </para>
396         <variablelist>
397                 <varlistentry>
398                 <term>SIGHUP</term>
399                 <listitem><para>Reload the <citerefentry><refentrytitle>smb.conf</refentrytitle>
400                 <manvolnum>5</manvolnum></citerefentry> file and
401                 apply any parameter changes to the running
402                 version of winbindd.  This signal also clears any cached
403                 user and group information.  The list of other domains trusted
404                 by winbindd is also reloaded.
405                 </para>
406                 <para>Instead of sending a SIGHUP signal, a request to reload configuration
407                 file may be sent using <citerefentry><refentrytitle>smbcontrol</refentrytitle>
408                 <manvolnum>1</manvolnum></citerefentry> program.
409                 </para></listitem>
410                 </varlistentry>
412                 <varlistentry>
413                 <term>SIGUSR2</term>
414                 <listitem><para>The SIGUSR2 signal will cause <command>
415                 winbindd</command> to write status information to the winbind
416                 log file.</para>
418                 <para>Log files are stored in the filename specified by the
419                 log file parameter.</para></listitem>
420                 </varlistentry>
421         </variablelist>
422 </refsect1>
424 <refsect1>
425         <title>FILES</title>
427         <variablelist>
428                 <varlistentry>
429                 <term><filename>/etc/nsswitch.conf(5)</filename></term>
430                 <listitem><para>Name service switch configuration file.</para>
431                 </listitem>
432                 </varlistentry>
434                 <varlistentry>
435                 <term>&pathconfig.WINBINDD_SOCKET_DIR;/pipe</term>
436                 <listitem><para>The UNIX pipe over which clients communicate with
437                 the <command>winbindd</command> program.  For security reasons, the
438                 winbind client will only attempt to connect to the winbindd daemon
439                 if both the <filename>&pathconfig.WINBINDD_SOCKET_DIR;</filename> directory
440                 and <filename>&pathconfig.WINBINDD_SOCKET_DIR;/pipe</filename> file are owned by
441                 root. </para>
443                 <para><smbconfoption name="winbindd socket directory"/>
444                 overrides this default.</para>
446                 </listitem>
447                 </varlistentry>
449                 <varlistentry>
450                 <term>$STATEDIR/winbindd_privileged/pipe</term>
451                 <listitem><para>The UNIX pipe over which 'privileged' clients
452                 communicate with the <command>winbindd</command> program.  For security
453                 reasons, access to some winbindd functions - like those needed by
454                 the <command>ntlm_auth</command> utility - is restricted.  By default,
455                 only users in the 'root' group will get this access, however the administrator
456                 may change the group permissions on $STATEDIR/winbindd_privileged to allow
457                 programs like 'squid' to use ntlm_auth.
458                 Note that the winbind client will only attempt to connect to the winbindd daemon
459                 if both the <filename>$STATEDIR/winbindd_privileged</filename> directory
460                 and <filename>$STATEDIR/winbindd_privileged/pipe</filename> file are owned by
461                 root. </para>
462                 <para><smbconfoption name="state dir"/> controls what
463                 $STATEDIR refers to.</para>
464                 </listitem>
465                 </varlistentry>
467                 <varlistentry>
468                 <term>/lib/libnss_winbind.so.X</term>
469                 <listitem><para>Implementation of name service switch library.
470                 </para></listitem>
471                 </varlistentry>
473                 <varlistentry>
474                 <term>$STATEDIR/winbindd_idmap.tdb</term>
475                 <listitem><para>Storage for the Windows NT rid to UNIX user/group
476                 id mapping.  The directory is specified when Samba is initially
477                 compiled using the
478                 <parameter>--with-statedir</parameter> option or <smbconfoption name="state dir"/>.
479                 The default directory in this installation is <filename>&pathconfig.STATEDIR;
480                 </filename>. </para></listitem>
481                 </varlistentry>
483                 <varlistentry>
484                 <term>$LOCKDIR/winbindd_cache.tdb</term>
485                 <listitem><para>Storage for cached user and group information.
486                 </para></listitem>
487                 </varlistentry>
488         </variablelist>
489 </refsect1>
492 <refsect1>
493         <title>VERSION</title>
495         <para>This man page is part of version &doc.version; of
496         the Samba suite.</para>
497 </refsect1>
499 <refsect1>
500         <title>SEE ALSO</title>
502         <para><filename>nsswitch.conf(5)</filename>, <citerefentry>
503         <refentrytitle>samba</refentrytitle>
504         <manvolnum>7</manvolnum></citerefentry>, <citerefentry>
505         <refentrytitle>wbinfo</refentrytitle>
506         <manvolnum>1</manvolnum></citerefentry>, <citerefentry>
507         <refentrytitle>ntlm_auth</refentrytitle>
508         <manvolnum>8</manvolnum></citerefentry>, <citerefentry>
509         <refentrytitle>smb.conf</refentrytitle>
510         <manvolnum>5</manvolnum></citerefentry>, <citerefentry>
511         <refentrytitle>pam_winbind</refentrytitle>
512         <manvolnum>8</manvolnum></citerefentry></para>
513 </refsect1>
515 <refsect1>
516         <title>AUTHOR</title>
518         <para>The original Samba software and related utilities
519         were created by Andrew Tridgell. Samba is now developed
520         by the Samba Team as an Open Source project similar
521         to the way the Linux kernel is developed.</para>
523         <para><command>wbinfo</command> and <command>winbindd</command> were
524         written by Tim Potter.</para>
526         <para>The conversion to DocBook for Samba 2.2 was done
527         by Gerald Carter. The conversion to DocBook XML 4.2 for
528         Samba 3.0 was done by Alexander Bokovoy.</para>
529 </refsect1>
531 </refentry>