source: vendor/3.6.23/docs/htmldocs/manpages/winbindd.8.html

Last change on this file was 860, checked in by Silvan Scherrer, 11 years ago

Samba 3.6: updated vendor to latest version

File size: 20.7 KB
Line 
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>winbindd</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="winbindd"><a name="winbindd.8"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>winbindd &#8212; Name Service Switch daemon for resolving names
2 from NT servers</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="literal">winbindd</code> [-D] [-F] [-S] [-i] [-Y] [-d &lt;debug level&gt;] [-s &lt;smb config file&gt;] [-n]</p></div></div><div class="refsect1" title="DESCRIPTION"><a name="id266856"></a><h2>DESCRIPTION</h2><p>This program is part of the <a class="citerefentry" href="samba.7.html"><span class="citerefentry"><span class="refentrytitle">samba</span>(7)</span></a> suite.</p><p><code class="literal">winbindd</code> is a daemon that provides
3 a number of services to the Name Service Switch capability found
4 in most modern C libraries, to arbitrary applications via PAM
5 and <code class="literal">ntlm_auth</code> and to Samba itself.</p><p>Even if winbind is not used for nsswitch, it still provides a
6 service to <code class="literal">smbd</code>, <code class="literal">ntlm_auth</code>
7 and the <code class="literal">pam_winbind.so</code> PAM module, by managing connections to
8 domain controllers. In this configuration the
9 <a class="link" href="smb.conf.5.html#IDMAPCONFIG*:RANGE" target="_top">idmap config * : range</a>
10 parameter is not required. (This is known as `netlogon proxy only mode'.)</p><p> The Name Service Switch allows user
11 and system information to be obtained from different databases
12 services such as NIS or DNS. The exact behaviour can be configured
13 through the <code class="filename">/etc/nsswitch.conf</code> file.
14 Users and groups are allocated as they are resolved to a range
15 of user and group ids specified by the administrator of the
16 Samba system.</p><p>The service provided by <code class="literal">winbindd</code> is called `winbind' and
17 can be used to resolve user and group information from a
18 Windows NT server. The service can also provide authentication
19 services via an associated PAM module. </p><p>
20 The <code class="filename">pam_winbind</code> module supports the
21 <em class="parameter"><code>auth</code></em>, <em class="parameter"><code>account</code></em>
22 and <em class="parameter"><code>password</code></em>
23 module-types. It should be noted that the
24 <em class="parameter"><code>account</code></em> module simply performs a getpwnam() to verify that
25 the system can obtain a uid for the user, as the domain
26 controller has already performed access control. If the
27 <code class="filename">libnss_winbind</code> library has been correctly
28 installed, or an alternate source of names configured, this should always succeed.
29 </p><p>The following nsswitch databases are implemented by
30 the winbindd service: </p><div class="variablelist"><dl><dt><span class="term">hosts</span></dt><dd><p>This feature is only available on IRIX.
31 User information traditionally stored in
32 the <code class="filename">hosts(5)</code> file and used by
33 <code class="literal">gethostbyname(3)</code> functions. Names are
34 resolved through the WINS server or by broadcast.
35 </p></dd><dt><span class="term">passwd</span></dt><dd><p>User information traditionally stored in
36 the <code class="filename">passwd(5)</code> file and used by
37 <code class="literal">getpwent(3)</code> functions. </p></dd><dt><span class="term">group</span></dt><dd><p>Group information traditionally stored in
38 the <code class="filename">group(5)</code> file and used by
39 <code class="literal">getgrent(3)</code> functions. </p></dd></dl></div><p>For example, the following simple configuration in the
40 <code class="filename">/etc/nsswitch.conf</code> file can be used to initially
41 resolve user and group information from <code class="filename">/etc/passwd
42 </code> and <code class="filename">/etc/group</code> and then from the
43 Windows NT server.
44 </p><pre class="programlisting">
45passwd: files winbind
46group: files winbind
47## only available on IRIX: use winbind to resolve hosts:
48# hosts: files dns winbind
49## All other NSS enabled systems should use libnss_wins.so like this:
50hosts: files dns wins
51
52</pre><p>The following simple configuration in the
53 <code class="filename">/etc/nsswitch.conf</code> file can be used to initially
54 resolve hostnames from <code class="filename">/etc/hosts</code> and then from the
55 WINS server.</p><pre class="programlisting">
56hosts: files wins
57</pre></div><div class="refsect1" title="OPTIONS"><a name="id307067"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">-D</span></dt><dd><p>If specified, this parameter causes
58 the server to operate as a daemon. That is, it detaches
59 itself and runs in the background on the appropriate port.
60 This switch is assumed if <code class="literal">winbindd</code> is
61 executed on the command line of a shell.
62 </p></dd><dt><span class="term">-F</span></dt><dd><p>If specified, this parameter causes
63 the main <code class="literal">winbindd</code> process to not daemonize,
64 i.e. double-fork and disassociate with the terminal.
65 Child processes are still created as normal to service
66 each connection request, but the main process does not
67 exit. This operation mode is suitable for running
68 <code class="literal">winbindd</code> under process supervisors such
69 as <code class="literal">supervise</code> and <code class="literal">svscan</code>
70 from Daniel J. Bernstein's <code class="literal">daemontools</code>
71 package, or the AIX process monitor.
72 </p></dd><dt><span class="term">-S</span></dt><dd><p>If specified, this parameter causes
73 <code class="literal">winbindd</code> to log to standard output rather
74 than a file.</p></dd><dt><span class="term">-d|--debuglevel=level</span></dt><dd><p><em class="replaceable"><code>level</code></em> is an integer
75from 0 to 10. The default value if this parameter is
76not specified is 0.</p><p>The higher this value, the more detail will be
77logged to the log files about the activities of the
78server. At level 0, only critical errors and serious
79warnings will be logged. Level 1 is a reasonable level for
80day-to-day running - it generates a small amount of
81information about operations carried out.</p><p>Levels above 1 will generate considerable
82amounts of log data, and should only be used when
83investigating a problem. Levels above 3 are designed for
84use only by developers and generate HUGE amounts of log
85data, most of which is extremely cryptic.</p><p>Note that specifying this parameter here will
86override the <a class="link" href="smb.conf.5.html#" target="_top"></a> parameter
87in the <code class="filename">smb.conf</code> file.</p></dd><dt><span class="term">-V|--version</span></dt><dd><p>Prints the program version number.
88</p></dd><dt><span class="term">-s|--configfile &lt;configuration file&gt;</span></dt><dd><p>The file specified contains the
89configuration details required by the server. The
90information in this file includes server-specific
91information such as what printcap file to use, as well
92as descriptions of all the services that the server is
93to provide. See <code class="filename">smb.conf</code> for more information.
94The default configuration file name is determined at
95compile time.</p></dd><dt><span class="term">-l|--log-basename=logdirectory</span></dt><dd><p>Base directory name for log/debug files. The extension
96<code class="constant">".progname"</code> will be appended (e.g. log.smbclient,
97log.smbd, etc...). The log file is never removed by the client.
98</p></dd><dt><span class="term">-h|--help</span></dt><dd><p>Print a summary of command line options.
99</p></dd><dt><span class="term">-i</span></dt><dd><p>Tells <code class="literal">winbindd</code> to not
100 become a daemon and detach from the current terminal. This
101 option is used by developers when interactive debugging
102 of <code class="literal">winbindd</code> is required.
103 <code class="literal">winbindd</code> also logs to standard output,
104 as if the <code class="literal">-S</code> parameter had been given.
105 </p></dd><dt><span class="term">-n</span></dt><dd><p>Disable caching. This means winbindd will
106 always have to wait for a response from the domain controller
107 before it can respond to a client and this thus makes things
108 slower. The results will however be more accurate, since
109 results from the cache might not be up-to-date. This
110 might also temporarily hang winbindd if the DC doesn't respond.
111 </p></dd><dt><span class="term">-Y</span></dt><dd><p>Single daemon mode. This means winbindd will run
112 as a single process (the mode of operation in Samba 2.2). Winbindd's
113 default behavior is to launch a child process that is responsible for
114 updating expired cache entries.
115 </p></dd></dl></div></div><div class="refsect1" title="NAME AND ID RESOLUTION"><a name="id307306"></a><h2>NAME AND ID RESOLUTION</h2><p>Users and groups on a Windows NT server are assigned
116 a security id (SID) which is globally unique when the
117 user or group is created. To convert the Windows NT user or group
118 into a unix user or group, a mapping between SIDs and unix user
119 and group ids is required. This is one of the jobs that <code class="literal">
120 winbindd</code> performs. </p><p>As winbindd users and groups are resolved from a server, user
121 and group ids are allocated from a specified range. This
122 is done on a first come, first served basis, although all existing
123 users and groups will be mapped as soon as a client performs a user
124 or group enumeration command. The allocated unix ids are stored
125 in a database and will be remembered. </p><p>WARNING: The SID to unix id database is the only location
126 where the user and group mappings are stored by winbindd. If this
127 store is deleted or corrupted, there is no way for winbindd to
128 determine which user and group ids correspond to Windows NT user
129 and group rids. </p></div><div class="refsect1" title="CONFIGURATION"><a name="id307336"></a><h2>CONFIGURATION</h2><p>Configuration of the <code class="literal">winbindd</code> daemon
130 is done through configuration parameters in the <a class="citerefentry" href="smb.conf.5.html"><span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span></a> file. All parameters should be specified in the
131 [global] section of smb.conf. </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
132 <a class="link" href="smb.conf.5.html#WINBINDSEPARATOR" target="_top">winbind separator</a></p></li><li class="listitem"><p>
133 <a class="link" href="smb.conf.5.html#IDMAPCONFIG*:RANGE" target="_top">idmap config * : range</a></p></li><li class="listitem"><p>
134 <a class="link" href="smb.conf.5.html#IDMAPCONFIG*:BACKEND" target="_top">idmap config * : backend</a></p></li><li class="listitem"><p>
135 <a class="link" href="smb.conf.5.html#WINBINDCACHETIME" target="_top">winbind cache time</a></p></li><li class="listitem"><p>
136 <a class="link" href="smb.conf.5.html#WINBINDENUMUSERS" target="_top">winbind enum users</a></p></li><li class="listitem"><p>
137 <a class="link" href="smb.conf.5.html#WINBINDENUMGROUPS" target="_top">winbind enum groups</a></p></li><li class="listitem"><p>
138 <a class="link" href="smb.conf.5.html#TEMPLATEHOMEDIR" target="_top">template homedir</a></p></li><li class="listitem"><p>
139 <a class="link" href="smb.conf.5.html#TEMPLATESHELL" target="_top">template shell</a></p></li><li class="listitem"><p>
140 <a class="link" href="smb.conf.5.html#WINBINDUSEDEFAULTDOMAIN" target="_top">winbind use default domain</a></p></li><li class="listitem"><p>
141 <a class="link" href="smb.conf.5.html#WINBIND:RPCONLY" target="_top">winbind: rpc only</a>
142 Setting this parameter forces winbindd to use RPC
143 instead of LDAP to retrieve information from Domain
144 Controllers.
145 </p></li></ul></div></div><div class="refsect1" title="EXAMPLE SETUP"><a name="id307470"></a><h2>EXAMPLE SETUP</h2><p>
146 To setup winbindd for user and group lookups plus
147 authentication from a domain controller use something like the
148 following setup. This was tested on an early Red Hat Linux box.
149 </p><p>In <code class="filename">/etc/nsswitch.conf</code> put the
150 following:
151</p><pre class="programlisting">
152passwd: files winbind
153group: files winbind
154</pre><p>
155 </p><p>In <code class="filename">/etc/pam.d/*</code> replace the <em class="parameter"><code>
156 auth</code></em> lines with something like this:
157</p><pre class="programlisting">
158auth required /lib/security/pam_securetty.so
159auth required /lib/security/pam_nologin.so
160auth sufficient /lib/security/pam_winbind.so
161auth required /lib/security/pam_unix.so \
162 use_first_pass shadow nullok
163</pre><p>
164 </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
165 The PAM module pam_unix has recently replaced the module pam_pwdb.
166 Some Linux systems use the module pam_unix2 in place of pam_unix.
167 </p></div><p>Note in particular the use of the <em class="parameter"><code>sufficient
168 </code></em> keyword and the <em class="parameter"><code>use_first_pass</code></em> keyword. </p><p>Now replace the account lines with this: </p><p><code class="literal">account required /lib/security/pam_winbind.so
169 </code></p><p>The next step is to join the domain. To do that use the
170 <code class="literal">net</code> program like this: </p><p><code class="literal">net join -S PDC -U Administrator</code></p><p>The username after the <em class="parameter"><code>-U</code></em> can be any
171 Domain user that has administrator privileges on the machine.
172 Substitute the name or IP of your PDC for "PDC".</p><p>Next copy <code class="filename">libnss_winbind.so</code> to
173 <code class="filename">/lib</code> and <code class="filename">pam_winbind.so
174 </code> to <code class="filename">/lib/security</code>. A symbolic link needs to be
175 made from <code class="filename">/lib/libnss_winbind.so</code> to
176 <code class="filename">/lib/libnss_winbind.so.2</code>. If you are using an
177 older version of glibc then the target of the link should be
178 <code class="filename">/lib/libnss_winbind.so.1</code>.</p><p>Finally, setup a <a class="citerefentry" href="smb.conf.5.html"><span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span></a> containing directives like the
179 following:
180</p><pre class="programlisting">
181[global]
182 winbind separator = +
183 winbind cache time = 10
184 template shell = /bin/bash
185 template homedir = /home/%D/%U
186 idmap config * : range = 10000-20000
187 workgroup = DOMAIN
188 security = domain
189 password server = *
190</pre><p>Now start winbindd and you should find that your user and
191 group database is expanded to include your NT users and groups,
192 and that you can login to your unix box as a domain user, using
193 the DOMAIN+user syntax for the username. You may wish to use the
194 commands <code class="literal">getent passwd</code> and <code class="literal">getent group
195 </code> to confirm the correct operation of winbindd.</p></div><div class="refsect1" title="NOTES"><a name="id307642"></a><h2>NOTES</h2><p>The following notes are useful when configuring and
196 running <code class="literal">winbindd</code>: </p><p><a class="citerefentry" href="nmbd.8.html"><span class="citerefentry"><span class="refentrytitle">nmbd</span>(8)</span></a> must be running on the local machine
197 for <code class="literal">winbindd</code> to work. </p><p>PAM is really easy to misconfigure. Make sure you know what
198 you are doing when modifying PAM configuration files. It is possible
199 to set up PAM such that you can no longer log into your system. </p><p>If more than one UNIX machine is running <code class="literal">winbindd</code>,
200 then in general the user and groups ids allocated by winbindd will not
201 be the same. The user and group ids will only be valid for the local
202 machine, unless a shared <a class="link" href="smb.conf.5.html#IDMAPCONFIG*:BACKEND" target="_top">idmap config * : backend</a> is configured.</p><p>If the the Windows NT SID to UNIX user and group id mapping
203 file is damaged or destroyed then the mappings will be lost. </p></div><div class="refsect1" title="SIGNALS"><a name="id307698"></a><h2>SIGNALS</h2><p>The following signals can be used to manipulate the
204 <code class="literal">winbindd</code> daemon. </p><div class="variablelist"><dl><dt><span class="term">SIGHUP</span></dt><dd><p>Reload the <a class="citerefentry" href="smb.conf.5.html"><span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span></a> file and
205 apply any parameter changes to the running
206 version of winbindd. This signal also clears any cached
207 user and group information. The list of other domains trusted
208 by winbindd is also reloaded. </p></dd><dt><span class="term">SIGUSR2</span></dt><dd><p>The SIGUSR2 signal will cause <code class="literal">
209 winbindd</code> to write status information to the winbind
210 log file.</p><p>Log files are stored in the filename specified by the
211 log file parameter.</p></dd></dl></div></div><div class="refsect1" title="FILES"><a name="id307756"></a><h2>FILES</h2><div class="variablelist"><dl><dt><span class="term"><code class="filename">/etc/nsswitch.conf(5)</code></span></dt><dd><p>Name service switch configuration file.</p></dd><dt><span class="term">/tmp/.winbindd/pipe</span></dt><dd><p>The UNIX pipe over which clients communicate with
212 the <code class="literal">winbindd</code> program. For security reasons, the
213 winbind client will only attempt to connect to the winbindd daemon
214 if both the <code class="filename">/tmp/.winbindd</code> directory
215 and <code class="filename">/tmp/.winbindd/pipe</code> file are owned by
216 root. </p></dd><dt><span class="term">$LOCKDIR/winbindd_privileged/pipe</span></dt><dd><p>The UNIX pipe over which 'privileged' clients
217 communicate with the <code class="literal">winbindd</code> program. For security
218 reasons, access to some winbindd functions - like those needed by
219 the <code class="literal">ntlm_auth</code> utility - is restricted. By default,
220 only users in the 'root' group will get this access, however the administrator
221 may change the group permissions on $LOCKDIR/winbindd_privileged to allow
222 programs like 'squid' to use ntlm_auth.
223 Note that the winbind client will only attempt to connect to the winbindd daemon
224 if both the <code class="filename">$LOCKDIR/winbindd_privileged</code> directory
225 and <code class="filename">$LOCKDIR/winbindd_privileged/pipe</code> file are owned by
226 root. </p></dd><dt><span class="term">/lib/libnss_winbind.so.X</span></dt><dd><p>Implementation of name service switch library.
227 </p></dd><dt><span class="term">$LOCKDIR/winbindd_idmap.tdb</span></dt><dd><p>Storage for the Windows NT rid to UNIX user/group
228 id mapping. The lock directory is specified when Samba is initially
229 compiled using the <em class="parameter"><code>--with-lockdir</code></em> option.
230 This directory is by default <code class="filename">/usr/local/samba/var/locks
231 </code>. </p></dd><dt><span class="term">$LOCKDIR/winbindd_cache.tdb</span></dt><dd><p>Storage for cached user and group information.
232 </p></dd></dl></div></div><div class="refsect1" title="VERSION"><a name="id307888"></a><h2>VERSION</h2><p>This man page is correct for version 3 of
233 the Samba suite.</p></div><div class="refsect1" title="SEE ALSO"><a name="id307898"></a><h2>SEE ALSO</h2><p><code class="filename">nsswitch.conf(5)</code>, <a class="citerefentry" href="samba.7.html"><span class="citerefentry"><span class="refentrytitle">samba</span>(7)</span></a>, <a class="citerefentry" href="wbinfo.1.html"><span class="citerefentry"><span class="refentrytitle">wbinfo</span>(1)</span></a>, <a class="citerefentry" href="ntlm_auth.8.html"><span class="citerefentry"><span class="refentrytitle">ntlm_auth</span>(8)</span></a>, <a class="citerefentry" href="smb.conf.5.html"><span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span></a>, <a class="citerefentry" href="pam_winbind.8.html"><span class="citerefentry"><span class="refentrytitle">pam_winbind</span>(8)</span></a></p></div><div class="refsect1" title="AUTHOR"><a name="id307953"></a><h2>AUTHOR</h2><p>The original Samba software and related utilities
234 were created by Andrew Tridgell. Samba is now developed
235 by the Samba Team as an Open Source project similar
236 to the way the Linux kernel is developed.</p><p><code class="literal">wbinfo</code> and <code class="literal">winbindd</code> were
237 written by Tim Potter.</p><p>The conversion to DocBook for Samba 2.2 was done
238 by Gerald Carter. The conversion to DocBook XML 4.2 for
239 Samba 3.0 was done by Alexander Bokovoy.</p></div></div></body></html>
Note: See TracBrowser for help on using the repository browser.