source: branches/samba-3.5.x/docs/manpages/winbindd.8@ 717

Last change on this file since 717 was 620, checked in by Herwig Bauernfeind, 14 years ago

Samba 3.5: Update trunk to 3.5.11

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