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

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

Update source to 3.0.30

File size: 15.4 KB
RevLine 
[134]1.\" Title: winbindd
2.\" Author:
3.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
[135]4.\" Date: 05/28/2008
[134]5.\" Manual: System Administration tools
6.\" Source: Samba 3.0
7.\"
[135]8.TH "WINBINDD" "8" "05/28/2008" "Samba 3\.0" "System Administration tools"
[134]9.\" disable hyphenation
10.nh
11.\" disable justification (adjust text to left margin only)
12.ad l
[39]13.SH "NAME"
14winbindd - Name Service Switch daemon for resolving names from NT servers
[22]15.SH "SYNOPSIS"
[44]16.HP 1
[134]17winbindd [\-D] [\-F] [\-S] [\-i] [\-Y] [\-d\ <debug\ level>] [\-s\ <smb\ config\ file>] [\-n]
[22]18.SH "DESCRIPTION"
19.PP
[39]20This program is part of the
21\fBsamba\fR(7)
[134]22suite\.
[22]23.PP
[44]24winbindd
[134]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
[44]26ntlm_auth
[134]27and to Samba itself\.
[22]28.PP
[39]29Even if winbind is not used for nsswitch, it still provides a service to
[44]30smbd,
31ntlm_auth
[39]32and the
[134]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\'\.)
[22]39.PP
[134]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\.
[22]43.PP
[39]44The service provided by
[44]45winbindd
[134]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\.
[22]47.PP
[39]48The
49\fIpam_winbind\fR
50module supports the
51\fIauth\fR,
52\fIaccount\fR
53and
54\fIpassword\fR
[134]55module\-types\. It should be noted that the
[39]56\fIaccount\fR
[134]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
[39]58\fIlibnss_winbind\fR
[134]59library has been correctly installed, or an alternate source of names configured, this should always succeed\.
[22]60.PP
61The following nsswitch databases are implemented by the winbindd service:
[39]62.PP
[134]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
[22]70hosts
[134]71.RS 4
72This feature is only available on IRIX\. User information traditionally stored in the
[39]73\fIhosts(5)\fR
74file and used by
[44]75gethostbyname(3)
[134]76functions\. Names are resolved through the WINS server or by broadcast\.
[39]77.RE
78.PP
[22]79passwd
[134]80.RS 4
[39]81User information traditionally stored in the
82\fIpasswd(5)\fR
83file and used by
[44]84getpwent(3)
[134]85functions\.
[39]86.RE
87.PP
[22]88group
[134]89.RS 4
[39]90Group information traditionally stored in the
91\fIgroup(5)\fR
92file and used by
[44]93getgrent(3)
[134]94functions\.
[39]95.RE
[22]96.PP
[39]97For example, the following simple configuration in the
[134]98\fI/etc/nsswitch\.conf\fR
[39]99file can be used to initially resolve user and group information from
100\fI/etc/passwd \fR
101and
102\fI/etc/group\fR
[134]103and then from the Windows NT server\.
[39]104.sp
[134]105.RS 4
[22]106.nf
107passwd: files winbind
108group: files winbind
[134]109## only available on IRIX; Linux users should us libnss_wins\.so
[22]110hosts: files dns winbind
111.fi
[134]112.RE
[22]113.PP
[39]114The following simple configuration in the
[134]115\fI/etc/nsswitch\.conf\fR
[39]116file can be used to initially resolve hostnames from
117\fI/etc/hosts\fR
[134]118and then from the WINS server\.
119.sp
120.RS 4
[22]121.nf
122hosts: files wins
123.fi
[134]124.RE
[22]125.SH "OPTIONS"
[39]126.PP
[134]127\-F
128.RS 4
[39]129If specified, this parameter causes the main
[44]130winbindd
[134]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
[44]132winbindd
[39]133under process supervisors such as
[44]134supervise
[39]135and
[44]136svscan
[134]137from Daniel J\. Bernstein\'s
[44]138daemontools
[134]139package, or the AIX process monitor\.
[39]140.RE
141.PP
[134]142\-S
143.RS 4
[39]144If specified, this parameter causes
[44]145winbindd
[134]146to log to standard output rather than a file\.
[39]147.RE
148.PP
[134]149\-d|\-\-debuglevel=level
150.RS 4
[39]151\fIlevel\fR
[134]152is an integer from 0 to 10\. The default value if this parameter is not specified is 0\.
[39]153.sp
[134]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\.
[39]155.sp
[134]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\.
[39]157.sp
158Note that specifying this parameter here will override the
[134]159\fIlog level\fR
[39]160parameter in the
[134]161\fIsmb\.conf\fR
162file\.
[39]163.RE
164.PP
[134]165\-V
166.RS 4
167Prints the program version number\.
[39]168.RE
169.PP
[134]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\.
[39]175.RE
176.PP
[134]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
[39]191Tells
[44]192winbindd
[134]193to not become a daemon and detach from the current terminal\. This option is used by developers when interactive debugging of
[44]194winbindd
[134]195is required\.
[44]196winbindd
[39]197also logs to standard output, as if the
[134]198\-S
199parameter had been given\.
[39]200.RE
201.PP
[134]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\.
[39]205.RE
206.PP
[134]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\.
[39]210.RE
[22]211.SH "NAME AND ID RESOLUTION"
212.PP
[134]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
[44]214winbindd
[134]215performs\.
[22]216.PP
[134]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\.
[22]218.PP
[134]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\.
[22]220.PP
[39]221See the
[134]222\fIidmap domains\fR
[39]223or the old
[134]224\fIidmap backend\fR
[39]225parameters in
[134]226\fIsmb\.conf\fR
227for options for sharing this database, such as via LDAP\.
[22]228.SH "CONFIGURATION"
229.PP
[39]230Configuration of the
[44]231winbindd
[39]232daemon is done through configuration parameters in the
233\fBsmb.conf\fR(5)
[134]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.\}
[22]244
[134]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.\}
[39]256
[134]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.\}
[39]268
[134]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.\}
[39]280
[134]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.\}
[39]292
[134]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.\}
[39]304
[134]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.\}
[39]316
[134]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.\}
[39]328
[134]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.\}
[39]340
[134]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.\}
[39]352
[134]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.\}
[44]364
[134]365\fIwinbind: rpc only\fR
366Setting this parameter forces winbindd to use RPC instead of LDAP to retrieve information from Domain Controllers\.
[22]367.SH "EXAMPLE SETUP"
368.PP
[134]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\.
[22]370.PP
[39]371In
[134]372\fI/etc/nsswitch\.conf\fR
[39]373put the following:
374.sp
[134]375.RS 4
[22]376.nf
377passwd: files winbind
378group: files winbind
379.fi
[134]380.RE
[22]381.PP
[39]382In
[134]383\fI/etc/pam\.d/*\fR
[39]384replace the
385\fI auth\fR
386lines with something like this:
387.sp
[134]388.RS 4
[22]389.nf
[134]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
[22]394 use_first_pass shadow nullok
395.fi
[134]396.RE
[39]397.sp
[134]398.sp
[39]399.it 1 an-trap
400.nr an-no-space-flag 1
401.nr an-break-flag 1
402.br
[134]403Note
[22]404.PP
[134]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\.
[22]406.PP
[39]407Note in particular the use of the
408\fIsufficient \fR
409keyword and the
410\fIuse_first_pass\fR
[134]411keyword\.
[22]412.PP
413Now replace the account lines with this:
414.PP
[134]415account required /lib/security/pam_winbind\.so
[22]416.PP
[134]417The next step is to join the domain\. To do that use the
[44]418net
[39]419program like this:
[22]420.PP
[134]421net join \-S PDC \-U Administrator
[22]422.PP
[39]423The username after the
[134]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"\.
[22]426.PP
[39]427Next copy
[134]428\fIlibnss_winbind\.so\fR
[39]429to
430\fI/lib\fR
431and
[134]432\fIpam_winbind\.so \fR
[39]433to
[134]434\fI/lib/security\fR\. A symbolic link needs to be made from
435\fI/lib/libnss_winbind\.so\fR
[39]436to
[134]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\.
[22]439.PP
[39]440Finally, setup a
441\fBsmb.conf\fR(5)
442containing directives like the following:
443.sp
[134]444.RS 4
[22]445.nf
446[global]
447 winbind separator = +
448 winbind cache time = 10
449 template shell = /bin/bash
450 template homedir = /home/%D/%U
[134]451 idmap uid = 10000\-20000
452 idmap gid = 10000\-20000
[22]453 workgroup = DOMAIN
454 security = domain
455 password server = *
456.fi
[134]457.RE
[22]458.PP
[134]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
[44]460getent passwd
[39]461and
[44]462getent group
[134]463to confirm the correct operation of winbindd\.
[22]464.SH "NOTES"
465.PP
[39]466The following notes are useful when configuring and running
[44]467winbindd:
[22]468.PP
[39]469\fBnmbd\fR(8)
470must be running on the local machine for
[44]471winbindd
[134]472to work\.
[22]473.PP
[134]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\.
[22]475.PP
[39]476If more than one UNIX machine is running
[134]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\.
[22]480.PP
[134]481If the the Windows NT SID to UNIX user and group id mapping file is damaged or destroyed then the mappings will be lost\.
[22]482.SH "SIGNALS"
483.PP
[39]484The following signals can be used to manipulate the
[44]485winbindd
[134]486daemon\.
[39]487.PP
[22]488SIGHUP
[134]489.RS 4
[39]490Reload the
491\fBsmb.conf\fR(5)
[134]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\.
[39]493.RE
494.PP
[22]495SIGUSR2
[134]496.RS 4
[39]497The SIGUSR2 signal will cause
[44]498winbindd
[134]499to write status information to the winbind log file\.
[39]500.sp
[134]501Log files are stored in the filename specified by the log file parameter\.
[39]502.RE
[22]503.SH "FILES"
[39]504.PP
[134]505\fI/etc/nsswitch\.conf(5)\fR
506.RS 4
507Name service switch configuration file\.
[39]508.RE
509.PP
[134]510/tmp/\.winbindd/pipe
511.RS 4
[39]512The UNIX pipe over which clients communicate with the
[44]513winbindd
[134]514program\. For security reasons, the winbind client will only attempt to connect to the winbindd daemon if both the
515\fI/tmp/\.winbindd\fR
[39]516directory and
[134]517\fI/tmp/\.winbindd/pipe\fR
518file are owned by root\.
[39]519.RE
520.PP
[22]521$LOCKDIR/winbindd_privileged/pipe
[134]522.RS 4
523The UNIX pipe over which \'privileged\' clients communicate with the
[44]524winbindd
[134]525program\. For security reasons, access to some winbindd functions \- like those needed by the
[44]526ntlm_auth
[134]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
[39]528\fI$LOCKDIR/winbindd_privileged\fR
529directory and
530\fI$LOCKDIR/winbindd_privileged/pipe\fR
[134]531file are owned by root\.
[39]532.RE
533.PP
[134]534/lib/libnss_winbind\.so\.X
535.RS 4
536Implementation of name service switch library\.
[39]537.RE
538.PP
[134]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\.
[39]545.RE
546.PP
[134]547$LOCKDIR/winbindd_cache\.tdb
548.RS 4
549Storage for cached user and group information\.
[39]550.RE
[22]551.SH "VERSION"
552.PP
[134]553This man page is correct for version 3\.0 of the Samba suite\.
[22]554.SH "SEE ALSO"
555.PP
[134]556\fInsswitch\.conf(5)\fR,
[39]557\fBsamba\fR(7),
558\fBwbinfo\fR(1),
559\fBntlm_auth\fR(8),
560\fBsmb.conf\fR(5),
561\fBpam_winbind\fR(8)
[22]562.SH "AUTHOR"
563.PP
[134]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\.
[22]565.PP
[44]566wbinfo
[39]567and
[44]568winbindd
[134]569were written by Tim Potter\.
[22]570.PP
[134]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.