source: trunk/server/docs/manpages/winbindd.8@ 752

Last change on this file since 752 was 752, checked in by Silvan Scherrer, 13 years ago

Samba Server: updated trunk to 3.6.9 2nd part

File size: 15.7 KB
Line 
1'\" t
2.\" Title: winbindd
3.\" Author: [see the "AUTHOR" section]
4.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5.\" Date: 10/29/2012
6.\" Manual: System Administration tools
7.\" Source: Samba 3.6
8.\" Language: English
9.\"
10.TH "WINBINDD" "8" "10/29/2012" "Samba 3\&.6" "System Administration tools"
11.\" -----------------------------------------------------------------
12.\" * set default formatting
13.\" -----------------------------------------------------------------
14.\" disable hyphenation
15.nh
16.\" disable justification (adjust text to left margin only)
17.ad l
18.\" -----------------------------------------------------------------
19.\" * MAIN CONTENT STARTS HERE *
20.\" -----------------------------------------------------------------
21.SH "NAME"
22winbindd \- Name Service Switch daemon for resolving names from NT servers
23.SH "SYNOPSIS"
24.HP \w'\ 'u
25winbindd [\-D] [\-F] [\-S] [\-i] [\-d\ <debug\ level>] [\-s\ <smb\ config\ file>] [\-n]
26.SH "DESCRIPTION"
27.PP
28This program is part of the
29\fBsamba\fR(7)
30suite\&.
31.PP
32winbindd
33is 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
34ntlm_auth
35and to Samba itself\&.
36.PP
37Even if winbind is not used for nsswitch, it still provides a service to
38smbd,
39ntlm_auth
40and the
41pam_winbind\&.so
42PAM module, by managing connections to domain controllers\&. In this configuration the
43\m[blue]\fBidmap config * : range\fR\m[]
44parameter is not required\&. (This is known as `netlogon proxy only mode\'\&.)
45.PP
46The 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
47/etc/nsswitch\&.conf
48file\&. 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\&.
49.PP
50The service provided by
51winbindd
52is called `winbind\' 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\&.
53.PP
54The
55pam_winbind
56module supports the
57\fIauth\fR,
58\fIaccount\fR
59and
60\fIpassword\fR
61module\-types\&. It should be noted that the
62\fIaccount\fR
63module 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
64libnss_winbind
65library has been correctly installed, or an alternate source of names configured, this should always succeed\&.
66.PP
67The following nsswitch databases are implemented by the winbindd service:
68.PP
69hosts
70.RS 4
71This feature is only available on IRIX\&. User information traditionally stored in the
72hosts(5)
73file and used by
74gethostbyname(3)
75functions\&. Names are resolved through the WINS server or by broadcast\&.
76.RE
77.PP
78passwd
79.RS 4
80User information traditionally stored in the
81passwd(5)
82file and used by
83getpwent(3)
84functions\&.
85.RE
86.PP
87group
88.RS 4
89Group information traditionally stored in the
90group(5)
91file and used by
92getgrent(3)
93functions\&.
94.RE
95.PP
96For example, the following simple configuration in the
97/etc/nsswitch\&.conf
98file can be used to initially resolve user and group information from
99/etc/passwd
100and
101/etc/group
102and then from the Windows NT server\&.
103.sp
104.if n \{\
105.RS 4
106.\}
107.nf
108passwd: files winbind
109group: files winbind
110## only available on IRIX: use winbind to resolve hosts:
111# hosts: files dns winbind
112## All other NSS enabled systems should use libnss_wins\&.so like this:
113hosts: files dns wins
114
115.fi
116.if n \{\
117.RE
118.\}
119.PP
120The following simple configuration in the
121/etc/nsswitch\&.conf
122file can be used to initially resolve hostnames from
123/etc/hosts
124and then from the WINS server\&.
125.sp
126.if n \{\
127.RS 4
128.\}
129.nf
130hosts: files wins
131.fi
132.if n \{\
133.RE
134.\}
135.SH "OPTIONS"
136.PP
137\-D
138.RS 4
139If 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
140winbindd
141is executed on the command line of a shell\&.
142.RE
143.PP
144\-F
145.RS 4
146If specified, this parameter causes the main
147winbindd
148process 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
149winbindd
150under process supervisors such as
151supervise
152and
153svscan
154from Daniel J\&. Bernstein\'s
155daemontools
156package, or the AIX process monitor\&.
157.RE
158.PP
159\-S
160.RS 4
161If specified, this parameter causes
162winbindd
163to log to standard output rather than a file\&.
164.RE
165.PP
166\-d|\-\-debuglevel=level
167.RS 4
168\fIlevel\fR
169is an integer from 0 to 10\&. The default value if this parameter is not specified is 0\&.
170.sp
171The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&.
172.sp
173Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&.
174.sp
175Note that specifying this parameter here will override the
176\m[blue]\fB\%smb.conf.5.html#\fR\m[]
177parameter in the
178smb\&.conf
179file\&.
180.RE
181.PP
182\-V|\-\-version
183.RS 4
184Prints the program version number\&.
185.RE
186.PP
187\-s|\-\-configfile <configuration file>
188.RS 4
189The file specified contains the configuration details required by the server\&. The information in this file includes server\-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide\&. See
190smb\&.conf
191for more information\&. The default configuration file name is determined at compile time\&.
192.RE
193.PP
194\-l|\-\-log\-basename=logdirectory
195.RS 4
196Base directory name for log/debug files\&. The extension
197\fB"\&.progname"\fR
198will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&.
199.RE
200.PP
201\-h|\-\-help
202.RS 4
203Print a summary of command line options\&.
204.RE
205.PP
206\-i
207.RS 4
208Tells
209winbindd
210to not become a daemon and detach from the current terminal\&. This option is used by developers when interactive debugging of
211winbindd
212is required\&.
213winbindd
214also logs to standard output, as if the
215\-S
216parameter had been given\&.
217.RE
218.PP
219\-n
220.RS 4
221Disable caching\&. This means winbindd will always 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\'t respond\&.
222.RE
223.SH "NAME AND ID RESOLUTION"
224.PP
225Users 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
226winbindd
227performs\&.
228.PP
229As 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\&.
230.PP
231WARNING: 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\&.
232.SH "CONFIGURATION"
233.PP
234Configuration of the
235winbindd
236daemon is done through configuration parameters in the
237\fBsmb.conf\fR(5)
238file\&. All parameters should be specified in the [global] section of smb\&.conf\&.
239.sp
240.RS 4
241.ie n \{\
242\h'-04'\(bu\h'+03'\c
243.\}
244.el \{\
245.sp -1
246.IP \(bu 2.3
247.\}
248
249\m[blue]\fBwinbind separator\fR\m[]
250.RE
251.sp
252.RS 4
253.ie n \{\
254\h'-04'\(bu\h'+03'\c
255.\}
256.el \{\
257.sp -1
258.IP \(bu 2.3
259.\}
260
261\m[blue]\fBidmap config * : range\fR\m[]
262.RE
263.sp
264.RS 4
265.ie n \{\
266\h'-04'\(bu\h'+03'\c
267.\}
268.el \{\
269.sp -1
270.IP \(bu 2.3
271.\}
272
273\m[blue]\fBidmap config * : backend\fR\m[]
274.RE
275.sp
276.RS 4
277.ie n \{\
278\h'-04'\(bu\h'+03'\c
279.\}
280.el \{\
281.sp -1
282.IP \(bu 2.3
283.\}
284
285\m[blue]\fBwinbind cache time\fR\m[]
286.RE
287.sp
288.RS 4
289.ie n \{\
290\h'-04'\(bu\h'+03'\c
291.\}
292.el \{\
293.sp -1
294.IP \(bu 2.3
295.\}
296
297\m[blue]\fBwinbind enum users\fR\m[]
298.RE
299.sp
300.RS 4
301.ie n \{\
302\h'-04'\(bu\h'+03'\c
303.\}
304.el \{\
305.sp -1
306.IP \(bu 2.3
307.\}
308
309\m[blue]\fBwinbind enum groups\fR\m[]
310.RE
311.sp
312.RS 4
313.ie n \{\
314\h'-04'\(bu\h'+03'\c
315.\}
316.el \{\
317.sp -1
318.IP \(bu 2.3
319.\}
320
321\m[blue]\fBtemplate homedir\fR\m[]
322.RE
323.sp
324.RS 4
325.ie n \{\
326\h'-04'\(bu\h'+03'\c
327.\}
328.el \{\
329.sp -1
330.IP \(bu 2.3
331.\}
332
333\m[blue]\fBtemplate shell\fR\m[]
334.RE
335.sp
336.RS 4
337.ie n \{\
338\h'-04'\(bu\h'+03'\c
339.\}
340.el \{\
341.sp -1
342.IP \(bu 2.3
343.\}
344
345\m[blue]\fBwinbind use default domain\fR\m[]
346.RE
347.sp
348.RS 4
349.ie n \{\
350\h'-04'\(bu\h'+03'\c
351.\}
352.el \{\
353.sp -1
354.IP \(bu 2.3
355.\}
356
357\m[blue]\fBwinbind: rpc only\fR\m[]
358Setting this parameter forces winbindd to use RPC instead of LDAP to retrieve information from Domain Controllers\&.
359.RE
360.SH "EXAMPLE SETUP"
361.PP
362To 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\&.
363.PP
364In
365/etc/nsswitch\&.conf
366put the following:
367.sp
368.if n \{\
369.RS 4
370.\}
371.nf
372passwd: files winbind
373group: files winbind
374.fi
375.if n \{\
376.RE
377.\}
378.PP
379In
380/etc/pam\&.d/*
381replace the
382\fI auth\fR
383lines with something like this:
384.sp
385.if n \{\
386.RS 4
387.\}
388.nf
389auth required /lib/security/pam_securetty\&.so
390auth required /lib/security/pam_nologin\&.so
391auth sufficient /lib/security/pam_winbind\&.so
392auth required /lib/security/pam_unix\&.so \e
393 use_first_pass shadow nullok
394.fi
395.if n \{\
396.RE
397.\}
398.sp
399.if n \{\
400.sp
401.\}
402.RS 4
403.it 1 an-trap
404.nr an-no-space-flag 1
405.nr an-break-flag 1
406.br
407.ps +1
408\fBNote\fR
409.ps -1
410.br
411.PP
412The PAM module pam_unix has recently replaced the module pam_pwdb\&. Some Linux systems use the module pam_unix2 in place of pam_unix\&.
413.sp .5v
414.RE
415.PP
416Note in particular the use of the
417\fIsufficient \fR
418keyword and the
419\fIuse_first_pass\fR
420keyword\&.
421.PP
422Now replace the account lines with this:
423.PP
424account required /lib/security/pam_winbind\&.so
425.PP
426The next step is to join the domain\&. To do that use the
427net
428program like this:
429.PP
430net join \-S PDC \-U Administrator
431.PP
432The username after the
433\fI\-U\fR
434can be any Domain user that has administrator privileges on the machine\&. Substitute the name or IP of your PDC for "PDC"\&.
435.PP
436Next copy
437libnss_winbind\&.so
438to
439/lib
440and
441pam_winbind\&.so
442to
443/lib/security\&. A symbolic link needs to be made from
444/lib/libnss_winbind\&.so
445to
446/lib/libnss_winbind\&.so\&.2\&. If you are using an older version of glibc then the target of the link should be
447/lib/libnss_winbind\&.so\&.1\&.
448.PP
449Finally, setup a
450\fBsmb.conf\fR(5)
451containing directives like the following:
452.sp
453.if n \{\
454.RS 4
455.\}
456.nf
457[global]
458 winbind separator = +
459 winbind cache time = 10
460 template shell = /bin/bash
461 template homedir = /home/%D/%U
462 idmap config * : range = 10000\-20000
463 workgroup = DOMAIN
464 security = domain
465 password server = *
466.fi
467.if n \{\
468.RE
469.\}
470.PP
471Now 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
472getent passwd
473and
474getent group
475to confirm the correct operation of winbindd\&.
476.SH "NOTES"
477.PP
478The following notes are useful when configuring and running
479winbindd:
480.PP
481\fBnmbd\fR(8)
482must be running on the local machine for
483winbindd
484to work\&.
485.PP
486PAM 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\&.
487.PP
488If more than one UNIX machine is running
489winbindd, 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
490\m[blue]\fBidmap config * : backend\fR\m[]
491is configured\&.
492.PP
493If the the Windows NT SID to UNIX user and group id mapping file is damaged or destroyed then the mappings will be lost\&.
494.SH "SIGNALS"
495.PP
496The following signals can be used to manipulate the
497winbindd
498daemon\&.
499.PP
500SIGHUP
501.RS 4
502Reload the
503\fBsmb.conf\fR(5)
504file 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\&.
505.RE
506.PP
507SIGUSR2
508.RS 4
509The SIGUSR2 signal will cause
510winbindd
511to write status information to the winbind log file\&.
512.sp
513Log files are stored in the filename specified by the log file parameter\&.
514.RE
515.SH "FILES"
516.PP
517/etc/nsswitch\&.conf(5)
518.RS 4
519Name service switch configuration file\&.
520.RE
521.PP
522/tmp/\&.winbindd/pipe
523.RS 4
524The UNIX pipe over which clients communicate with the
525winbindd
526program\&. For security reasons, the winbind client will only attempt to connect to the winbindd daemon if both the
527/tmp/\&.winbindd
528directory and
529/tmp/\&.winbindd/pipe
530file are owned by root\&.
531.RE
532.PP
533$LOCKDIR/winbindd_privileged/pipe
534.RS 4
535The UNIX pipe over which \'privileged\' clients communicate with the
536winbindd
537program\&. For security reasons, access to some winbindd functions \- like those needed by the
538ntlm_auth
539utility \- is restricted\&. By default, only users in the \'root\' group will get this access, however the administrator may change the group permissions on $LOCKDIR/winbindd_privileged to allow programs like \'squid\' to use ntlm_auth\&. Note that the winbind client will only attempt to connect to the winbindd daemon if both the
540$LOCKDIR/winbindd_privileged
541directory and
542$LOCKDIR/winbindd_privileged/pipe
543file are owned by root\&.
544.RE
545.PP
546/lib/libnss_winbind\&.so\&.X
547.RS 4
548Implementation of name service switch library\&.
549.RE
550.PP
551$LOCKDIR/winbindd_idmap\&.tdb
552.RS 4
553Storage for the Windows NT rid to UNIX user/group id mapping\&. The lock directory is specified when Samba is initially compiled using the
554\fI\-\-with\-lockdir\fR
555option\&. This directory is by default
556/usr/local/samba/var/locks\&.
557.RE
558.PP
559$LOCKDIR/winbindd_cache\&.tdb
560.RS 4
561Storage for cached user and group information\&.
562.RE
563.SH "VERSION"
564.PP
565This man page is correct for version 3 of the Samba suite\&.
566.SH "SEE ALSO"
567.PP
568nsswitch\&.conf(5),
569\fBsamba\fR(7),
570\fBwbinfo\fR(1),
571\fBntlm_auth\fR(8),
572\fBsmb.conf\fR(5),
573\fBpam_winbind\fR(8)
574.SH "AUTHOR"
575.PP
576The 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\&.
577.PP
578wbinfo
579and
580winbindd
581were written by Tim Potter\&.
582.PP
583The 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.