source: branches/samba-3.0/docs/manpages/winbindd.8@ 135

Last change on this file since 135 was 135, checked in by Paul Smedley, 17 years ago

Update source to 3.0.30

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