source: branches/samba-3.2.x/docs/manpages/winbindd.8@ 201

Last change on this file since 201 was 201, checked in by Herwig Bauernfeind, 16 years ago

Update to Samba 3.2.3

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