source: vendor/current/docs/manpages/winbindd.8

Last change on this file was 989, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.7

File size: 14.4 KB
Line 
1'\" t
2.\" Title: winbindd
3.\" Author: [see the "AUTHOR" section]
4.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
5.\" Date: 10/25/2016
6.\" Manual: System Administration tools
7.\" Source: Samba 4.4
8.\" Language: English
9.\"
10.TH "WINBINDD" "8" "10/25/2016" "Samba 4\&.4" "System Administration tools"
11.\" -----------------------------------------------------------------
12.\" * Define some portability stuff
13.\" -----------------------------------------------------------------
14.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15.\" http://bugs.debian.org/507673
16.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18.ie \n(.g .ds Aq \(aq
19.el .ds Aq '
20.\" -----------------------------------------------------------------
21.\" * set default formatting
22.\" -----------------------------------------------------------------
23.\" disable hyphenation
24.nh
25.\" disable justification (adjust text to left margin only)
26.ad l
27.\" -----------------------------------------------------------------
28.\" * MAIN CONTENT STARTS HERE *
29.\" -----------------------------------------------------------------
30.SH "NAME"
31winbindd \- Name Service Switch daemon for resolving names from NT servers
32.SH "SYNOPSIS"
33.HP \w'\ 'u
34winbindd [\-D|\-\-daemon] [\-F|\-\-foreground] [\-S|\-\-stdout] [\-i|\-\-interactive] [\-d\ <debug\ level>] [\-s\ <smb\ config\ file>] [\-n|\-\-no\-caching] [\-\-no\-process\-group]
35.SH "DESCRIPTION"
36.PP
37This program is part of the
38\fBsamba\fR(7)
39suite\&.
40.PP
41winbindd
42is a daemon that provides a number of services to the Name Service Switch capability found in most modern C libraries, to arbitrary applications via PAM and
43ntlm_auth
44and to Samba itself\&.
45.PP
46Even if winbind is not used for nsswitch, it still provides a service to
47smbd,
48ntlm_auth
49and the
50pam_winbind\&.so
51PAM module, by managing connections to domain controllers\&. In this configuration the
52\m[blue]\fBidmap config * : range\fR\m[]
53parameter is not required\&. (This is known as `netlogon proxy only mode\*(Aq\&.)
54.PP
55The Name Service Switch allows user and system information to be obtained from different databases services such as NIS or DNS\&. The exact behaviour can be configured through the
56/etc/nsswitch\&.conf
57file\&. Users and groups are allocated as they are resolved to a range of user and group ids specified by the administrator of the Samba system\&.
58.PP
59The service provided by
60winbindd
61is called `winbind\*(Aq and can be used to resolve user and group information from a Windows NT server\&. The service can also provide authentication services via an associated PAM module\&.
62.PP
63The
64pam_winbind
65module supports the
66\fIauth\fR,
67\fIaccount\fR
68and
69\fIpassword\fR
70module\-types\&. It should be noted that the
71\fIaccount\fR
72module simply performs a getpwnam() to verify that the system can obtain a uid for the user, as the domain controller has already performed access control\&. If the
73libnss_winbind
74library has been correctly installed, or an alternate source of names configured, this should always succeed\&.
75.PP
76The following nsswitch databases are implemented by the winbindd service:
77.PP
78hosts
79.RS 4
80This feature is only available on IRIX\&. User information traditionally stored in the
81hosts(5)
82file and used by
83gethostbyname(3)
84functions\&. Names are resolved through the WINS server or by broadcast\&.
85.RE
86.PP
87passwd
88.RS 4
89User information traditionally stored in the
90passwd(5)
91file and used by
92getpwent(3)
93functions\&.
94.RE
95.PP
96group
97.RS 4
98Group information traditionally stored in the
99group(5)
100file and used by
101getgrent(3)
102functions\&.
103.RE
104.PP
105For example, the following simple configuration in the
106/etc/nsswitch\&.conf
107file can be used to initially resolve user and group information from
108/etc/passwd
109and
110/etc/group
111and then from the Windows NT server\&.
112.sp
113.if n \{\
114.RS 4
115.\}
116.nf
117passwd: files winbind
118group: files winbind
119## only available on IRIX: use winbind to resolve hosts:
120# hosts: files dns winbind
121## All other NSS enabled systems should use libnss_wins\&.so like this:
122hosts: files dns wins
123
124.fi
125.if n \{\
126.RE
127.\}
128.PP
129The following simple configuration in the
130/etc/nsswitch\&.conf
131file can be used to initially resolve hostnames from
132/etc/hosts
133and then from the WINS server\&.
134.sp
135.if n \{\
136.RS 4
137.\}
138.nf
139hosts: files wins
140.fi
141.if n \{\
142.RE
143.\}
144.SH "OPTIONS"
145.PP
146\-D|\-\-daemon
147.RS 4
148If specified, this parameter causes the server to operate as a daemon\&. That is, it detaches itself and runs in the background on the appropriate port\&. This switch is assumed if
149winbindd
150is executed on the command line of a shell\&.
151.RE
152.PP
153\-F|\-\-foreground
154.RS 4
155If specified, this parameter causes the main
156winbindd
157process to not daemonize, i\&.e\&. double\-fork and disassociate with the terminal\&. Child processes are still created as normal to service each connection request, but the main process does not exit\&. This operation mode is suitable for running
158winbindd
159under process supervisors such as
160supervise
161and
162svscan
163from Daniel J\&. Bernstein\*(Aqs
164daemontools
165package, or the AIX process monitor\&.
166.RE
167.PP
168\-S|\-\-stdout
169.RS 4
170If specified, this parameter causes
171winbindd
172to log to standard output rather than a file\&.
173.RE
174.PP
175\-i|\-\-interactive
176.RS 4
177Tells
178winbindd
179to not become a daemon and detach from the current terminal\&. This option is used by developers when interactive debugging of
180winbindd
181is required\&.
182winbindd
183also logs to standard output, as if the
184\-S
185parameter had been given\&.
186.RE
187.PP
188\-n|\-\-no\-caching
189.RS 4
190Disable some caching\&. This means winbindd will often have to wait for a response from the domain controller before it can respond to a client and this thus makes things slower\&. The results will however be more accurate, since results from the cache might not be up\-to\-date\&. This might also temporarily hang winbindd if the DC doesn\*(Aqt respond\&. This does not disable the samlogon cache, which is required for group membership tracking in trusted environments\&.
191.RE
192.PP
193\-\-no\-process\-group
194.RS 4
195Do not create a new process group for winbindd\&.
196.RE
197.SH "NAME AND ID RESOLUTION"
198.PP
199Users and groups on a Windows NT server are assigned a security id (SID) which is globally unique when the user or group is created\&. To convert the Windows NT user or group into a unix user or group, a mapping between SIDs and unix user and group ids is required\&. This is one of the jobs that
200winbindd
201performs\&.
202.PP
203As winbindd users and groups are resolved from a server, user and group ids are allocated from a specified range\&. This is done on a first come, first served basis, although all existing users and groups will be mapped as soon as a client performs a user or group enumeration command\&. The allocated unix ids are stored in a database and will be remembered\&.
204.PP
205WARNING: The SID to unix id database is the only location where the user and group mappings are stored by winbindd\&. If this store is deleted or corrupted, there is no way for winbindd to determine which user and group ids correspond to Windows NT user and group rids\&.
206.SH "CONFIGURATION"
207.PP
208Configuration of the
209winbindd
210daemon is done through configuration parameters in the
211\fBsmb.conf\fR(5)
212file\&. All parameters should be specified in the [global] section of smb\&.conf\&.
213.sp
214.RS 4
215.ie n \{\
216\h'-04'\(bu\h'+03'\c
217.\}
218.el \{\
219.sp -1
220.IP \(bu 2.3
221.\}
222\m[blue]\fBwinbind separator\fR\m[]
223.RE
224.sp
225.RS 4
226.ie n \{\
227\h'-04'\(bu\h'+03'\c
228.\}
229.el \{\
230.sp -1
231.IP \(bu 2.3
232.\}
233\m[blue]\fBidmap config * : range\fR\m[]
234.RE
235.sp
236.RS 4
237.ie n \{\
238\h'-04'\(bu\h'+03'\c
239.\}
240.el \{\
241.sp -1
242.IP \(bu 2.3
243.\}
244\m[blue]\fBidmap config * : backend\fR\m[]
245.RE
246.sp
247.RS 4
248.ie n \{\
249\h'-04'\(bu\h'+03'\c
250.\}
251.el \{\
252.sp -1
253.IP \(bu 2.3
254.\}
255\m[blue]\fBwinbind cache time\fR\m[]
256.RE
257.sp
258.RS 4
259.ie n \{\
260\h'-04'\(bu\h'+03'\c
261.\}
262.el \{\
263.sp -1
264.IP \(bu 2.3
265.\}
266\m[blue]\fBwinbind enum users\fR\m[]
267.RE
268.sp
269.RS 4
270.ie n \{\
271\h'-04'\(bu\h'+03'\c
272.\}
273.el \{\
274.sp -1
275.IP \(bu 2.3
276.\}
277\m[blue]\fBwinbind enum groups\fR\m[]
278.RE
279.sp
280.RS 4
281.ie n \{\
282\h'-04'\(bu\h'+03'\c
283.\}
284.el \{\
285.sp -1
286.IP \(bu 2.3
287.\}
288\m[blue]\fBtemplate homedir\fR\m[]
289.RE
290.sp
291.RS 4
292.ie n \{\
293\h'-04'\(bu\h'+03'\c
294.\}
295.el \{\
296.sp -1
297.IP \(bu 2.3
298.\}
299\m[blue]\fBtemplate shell\fR\m[]
300.RE
301.sp
302.RS 4
303.ie n \{\
304\h'-04'\(bu\h'+03'\c
305.\}
306.el \{\
307.sp -1
308.IP \(bu 2.3
309.\}
310\m[blue]\fBwinbind use default domain\fR\m[]
311.RE
312.sp
313.RS 4
314.ie n \{\
315\h'-04'\(bu\h'+03'\c
316.\}
317.el \{\
318.sp -1
319.IP \(bu 2.3
320.\}
321\m[blue]\fBwinbind: rpc only\fR\m[]
322Setting this parameter forces winbindd to use RPC instead of LDAP to retrieve information from Domain Controllers\&.
323.RE
324.SH "EXAMPLE SETUP"
325.PP
326To setup winbindd for user and group lookups plus authentication from a domain controller use something like the following setup\&. This was tested on an early Red Hat Linux box\&.
327.PP
328In
329/etc/nsswitch\&.conf
330put the following:
331.sp
332.if n \{\
333.RS 4
334.\}
335.nf
336passwd: files winbind
337group: files winbind
338.fi
339.if n \{\
340.RE
341.\}
342.PP
343In
344/etc/pam\&.d/*
345replace the
346\fI auth\fR
347lines with something like this:
348.sp
349.if n \{\
350.RS 4
351.\}
352.nf
353auth required /lib/security/pam_securetty\&.so
354auth required /lib/security/pam_nologin\&.so
355auth sufficient /lib/security/pam_winbind\&.so
356auth required /lib/security/pam_unix\&.so \e
357 use_first_pass shadow nullok
358.fi
359.if n \{\
360.RE
361.\}
362.sp
363.if n \{\
364.sp
365.\}
366.RS 4
367.it 1 an-trap
368.nr an-no-space-flag 1
369.nr an-break-flag 1
370.br
371.ps +1
372\fBNote\fR
373.ps -1
374.br
375.PP
376The PAM module pam_unix has recently replaced the module pam_pwdb\&. Some Linux systems use the module pam_unix2 in place of pam_unix\&.
377.sp .5v
378.RE
379.PP
380Note in particular the use of the
381\fIsufficient \fR
382keyword and the
383\fIuse_first_pass\fR
384keyword\&.
385.PP
386Now replace the account lines with this:
387.PP
388account required /lib/security/pam_winbind\&.so
389.PP
390The next step is to join the domain\&. To do that use the
391net
392program like this:
393.PP
394net join \-S PDC \-U Administrator
395.PP
396The username after the
397\fI\-U\fR
398can be any Domain user that has administrator privileges on the machine\&. Substitute the name or IP of your PDC for "PDC"\&.
399.PP
400Next copy
401libnss_winbind\&.so
402to
403/lib
404and
405pam_winbind\&.so
406to
407/lib/security\&. A symbolic link needs to be made from
408/lib/libnss_winbind\&.so
409to
410/lib/libnss_winbind\&.so\&.2\&. If you are using an older version of glibc then the target of the link should be
411/lib/libnss_winbind\&.so\&.1\&.
412.PP
413Finally, setup a
414\fBsmb.conf\fR(5)
415containing directives like the following:
416.sp
417.if n \{\
418.RS 4
419.\}
420.nf
421[global]
422 winbind separator = +
423 winbind cache time = 10
424 template shell = /bin/bash
425 template homedir = /home/%D/%U
426 idmap config * : range = 10000\-20000
427 workgroup = DOMAIN
428 security = domain
429 password server = *
430.fi
431.if n \{\
432.RE
433.\}
434.PP
435Now start winbindd and you should find that your user and group database is expanded to include your NT users and groups, and that you can login to your unix box as a domain user, using the DOMAIN+user syntax for the username\&. You may wish to use the commands
436getent passwd
437and
438getent group
439to confirm the correct operation of winbindd\&.
440.SH "NOTES"
441.PP
442The following notes are useful when configuring and running
443winbindd:
444.PP
445\fBnmbd\fR(8)
446must be running on the local machine for
447winbindd
448to work\&.
449.PP
450PAM is really easy to misconfigure\&. Make sure you know what you are doing when modifying PAM configuration files\&. It is possible to set up PAM such that you can no longer log into your system\&.
451.PP
452If more than one UNIX machine is running
453winbindd, then in general the user and groups ids allocated by winbindd will not be the same\&. The user and group ids will only be valid for the local machine, unless a shared
454\m[blue]\fBidmap config * : backend\fR\m[]
455is configured\&.
456.PP
457If the Windows NT SID to UNIX user and group id mapping file is damaged or destroyed then the mappings will be lost\&.
458.SH "SIGNALS"
459.PP
460The following signals can be used to manipulate the
461winbindd
462daemon\&.
463.PP
464SIGHUP
465.RS 4
466Reload the
467\fBsmb.conf\fR(5)
468file and apply any parameter changes to the running version of winbindd\&. This signal also clears any cached user and group information\&. The list of other domains trusted by winbindd is also reloaded\&.
469.RE
470.PP
471SIGUSR2
472.RS 4
473The SIGUSR2 signal will cause
474winbindd
475to write status information to the winbind log file\&.
476.sp
477Log files are stored in the filename specified by the log file parameter\&.
478.RE
479.SH "FILES"
480.PP
481/etc/nsswitch\&.conf(5)
482.RS 4
483Name service switch configuration file\&.
484.RE
485.PP
486/tmp/\&.winbindd/pipe
487.RS 4
488The UNIX pipe over which clients communicate with the
489winbindd
490program\&. For security reasons, the winbind client will only attempt to connect to the winbindd daemon if both the
491/tmp/\&.winbindd
492directory and
493/tmp/\&.winbindd/pipe
494file are owned by root\&.
495.RE
496.PP
497$LOCKDIR/winbindd_privileged/pipe
498.RS 4
499The UNIX pipe over which \*(Aqprivileged\*(Aq clients communicate with the
500winbindd
501program\&. For security reasons, access to some winbindd functions \- like those needed by the
502ntlm_auth
503utility \- is restricted\&. By default, only users in the \*(Aqroot\*(Aq group will get this access, however the administrator may change the group permissions on $LOCKDIR/winbindd_privileged to allow programs like \*(Aqsquid\*(Aq to use ntlm_auth\&. Note that the winbind client will only attempt to connect to the winbindd daemon if both the
504$LOCKDIR/winbindd_privileged
505directory and
506$LOCKDIR/winbindd_privileged/pipe
507file are owned by root\&.
508.RE
509.PP
510/lib/libnss_winbind\&.so\&.X
511.RS 4
512Implementation of name service switch library\&.
513.RE
514.PP
515$LOCKDIR/winbindd_idmap\&.tdb
516.RS 4
517Storage for the Windows NT rid to UNIX user/group id mapping\&. The lock directory is specified when Samba is initially compiled using the
518\fI\-\-with\-lockdir\fR
519option\&. This directory is by default
520/usr/local/samba/var/locks\&.
521.RE
522.PP
523$LOCKDIR/winbindd_cache\&.tdb
524.RS 4
525Storage for cached user and group information\&.
526.RE
527.SH "VERSION"
528.PP
529This man page is correct for version 3 of the Samba suite\&.
530.SH "SEE ALSO"
531.PP
532nsswitch\&.conf(5),
533\fBsamba\fR(7),
534\fBwbinfo\fR(1),
535\fBntlm_auth\fR(8),
536\fBsmb.conf\fR(5),
537\fBpam_winbind\fR(8)
538.SH "AUTHOR"
539.PP
540The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
541.PP
542wbinfo
543and
544winbindd
545were written by Tim Potter\&.
546.PP
547The conversion to DocBook for Samba 2\&.2 was done by Gerald Carter\&. The conversion to DocBook XML 4\&.2 for Samba 3\&.0 was done by Alexander Bokovoy\&.
Note: See TracBrowser for help on using the repository browser.