1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�24.�Winbind: Use of Domain Accounts</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="The Official Samba 3.4.x HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part�III.�Advanced Configuration"><link rel="prev" href="VFS.html" title="Chapter�23.�Stackable VFS modules"><link rel="next" href="AdvancedNetworkManagement.html" title="Chapter�25.�Advanced Network Management"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter�24.�Winbind: Use of Domain Accounts</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="VFS.html">Prev</a>�</td><th width="60%" align="center">Part�III.�Advanced Configuration</th><td width="20%" align="right">�<a accesskey="n" href="AdvancedNetworkManagement.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="winbind"></a>Chapter�24.�Winbind: Use of Domain Accounts</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Tim</span> <span class="orgname">Samba Team</span> <span class="surname">Potter</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:tpot@linuxcare.com.au">tpot@linuxcare.com.au</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Andrew</span> <span class="orgname">Samba Team</span> <span class="surname">Tridgell</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:tridge@samba.org">tridge@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Naag</span> <span class="surname">Mummaneni</span></h3><span class="contrib">Notes for Solaris</span>�<div class="affiliation"><div class="address"><p><code class="email"><<a class="email" href="mailto:getnag@rediffmail.com">getnag@rediffmail.com</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="orgname">SNAP</span> <span class="surname">Trostel</span></h3><div class="affiliation"><span class="orgname">SNAP<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jtrostel@snapserver.com">jtrostel@snapserver.com</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="orgname">The Samba Team</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="orgname">Samba Team</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>></code></p></div></div></div></div><div><p class="pubdate">June 15, 2005</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="winbind.html#id2653118">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="winbind.html#id2653461">Introduction</a></span></dt><dt><span class="sect1"><a href="winbind.html#id2653551">What Winbind Provides</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id2653704">Target Uses</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2653749">Handling of Foreign SIDs</a></span></dt></dl></dd><dt><span class="sect1"><a href="winbind.html#id2653875">How Winbind Works</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id2653925">Microsoft Remote Procedure Calls</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2654018">Microsoft Active Directory Services</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2654066">Name Service Switch</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2654298">Pluggable Authentication Modules</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2654453">User and Group ID Allocation</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2654529">Result Caching</a></span></dt></dl></dd><dt><span class="sect1"><a href="winbind.html#id2654586">Installation and Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id2654592">Introduction</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2654706">Requirements</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2654858">Testing Things Out</a></span></dt></dl></dd><dt><span class="sect1"><a href="winbind.html#id2657317">Conclusion</a></span></dt><dt><span class="sect1"><a href="winbind.html#id2657366">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id2657408">NSCD Problem Warning</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2657444">Winbind Is Not Resolving Users and Groups</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2653118"></a>Features and Benefits</h2></div></div></div><p>
2
<a class="indexterm" name="id2653126"></a>
3
<a class="indexterm" name="id2653132"></a>
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�24.�Winbind: Use of Domain Accounts</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="The Official Samba 3.4.x HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part�III.�Advanced Configuration"><link rel="prev" href="VFS.html" title="Chapter�23.�Stackable VFS modules"><link rel="next" href="AdvancedNetworkManagement.html" title="Chapter�25.�Advanced Network Management"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter�24.�Winbind: Use of Domain Accounts</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="VFS.html">Prev</a>�</td><th width="60%" align="center">Part�III.�Advanced Configuration</th><td width="20%" align="right">�<a accesskey="n" href="AdvancedNetworkManagement.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter�24.�Winbind: Use of Domain Accounts"><div class="titlepage"><div><div><h2 class="title"><a name="winbind"></a>Chapter�24.�Winbind: Use of Domain Accounts</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Tim</span> <span class="surname">Potter</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:tpot@linuxcare.com.au">tpot@linuxcare.com.au</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Andrew</span> <span class="surname">Tridgell</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:tridge@samba.org">tridge@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Naag</span> <span class="surname">Mummaneni</span></h3><span class="contrib">Notes for Solaris</span>�<div class="affiliation"><div class="address"><p><code class="email"><<a class="email" href="mailto:getnag@rediffmail.com">getnag@rediffmail.com</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="surname">Trostel</span></h3><div class="affiliation"><span class="orgname">SNAP<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jtrostel@snapserver.com">jtrostel@snapserver.com</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>></code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>></code></p></div></div></div></div><div><p class="pubdate">June 15, 2005</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="winbind.html#id2659210">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="winbind.html#id2659554">Introduction</a></span></dt><dt><span class="sect1"><a href="winbind.html#id2659643">What Winbind Provides</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id2659796">Target Uses</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2659842">Handling of Foreign SIDs</a></span></dt></dl></dd><dt><span class="sect1"><a href="winbind.html#id2659968">How Winbind Works</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id2660018">Microsoft Remote Procedure Calls</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2660111">Microsoft Active Directory Services</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2660159">Name Service Switch</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2660391">Pluggable Authentication Modules</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2660546">User and Group ID Allocation</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2660622">Result Caching</a></span></dt></dl></dd><dt><span class="sect1"><a href="winbind.html#id2660678">Installation and Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id2660684">Introduction</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2660799">Requirements</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2660951">Testing Things Out</a></span></dt></dl></dd><dt><span class="sect1"><a href="winbind.html#id2663370">Conclusion</a></span></dt><dt><span class="sect1"><a href="winbind.html#id2663418">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id2663460">NSCD Problem Warning</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2663497">Winbind Is Not Resolving Users and Groups</a></span></dt></dl></dd></dl></div><div class="sect1" title="Features and Benefits"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2659210"></a>Features and Benefits</h2></div></div></div><p>
2
<a class="indexterm" name="id2659218"></a>
3
<a class="indexterm" name="id2659225"></a>
4
4
Integration of UNIX and Microsoft Windows NT through a unified logon has
5
been considered a “<span class="quote">holy grail</span>” in heterogeneous computing environments for
5
been considered a <span class="quote">“<span class="quote">holy grail</span>”</span> in heterogeneous computing environments for
8
<a class="indexterm" name="id2653149"></a>
9
<a class="indexterm" name="id2653156"></a>
10
<a class="indexterm" name="id2653163"></a>
11
<a class="indexterm" name="id2653170"></a>
8
<a class="indexterm" name="id2659242"></a>
9
<a class="indexterm" name="id2659248"></a>
10
<a class="indexterm" name="id2659255"></a>
11
<a class="indexterm" name="id2659262"></a>
12
12
There is one other facility without which UNIX and Microsoft Windows network
13
13
interoperability would suffer greatly. It is imperative that there be a
14
14
mechanism for sharing files across UNIX systems and to be able to assign
15
15
domain user and group ownerships with integrity.
17
<a class="indexterm" name="id2653185"></a>
18
<a class="indexterm" name="id2653194"></a>
19
<a class="indexterm" name="id2653201"></a>
20
<a class="indexterm" name="id2653207"></a>
17
<a class="indexterm" name="id2659277"></a>
18
<a class="indexterm" name="id2659286"></a>
19
<a class="indexterm" name="id2659293"></a>
20
<a class="indexterm" name="id2659300"></a>
21
21
<span class="emphasis"><em>winbind</em></span> is a component of the Samba suite of programs that
22
22
solves the unified logon problem. Winbind uses a UNIX implementation of Microsoft
23
23
RPC calls, Pluggable Authentication Modules (PAMs), and the name service switch (NSS) to
26
26
it provides, how it is configured, and how it works internally.
28
28
Winbind provides three separate functions:
29
</p><div class="itemizedlist"><ul type="disc"><li><p>
30
<a class="indexterm" name="id2653235"></a>
31
<a class="indexterm" name="id2653242"></a>
29
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
30
<a class="indexterm" name="id2659328"></a>
31
<a class="indexterm" name="id2659334"></a>
32
32
Authentication of user credentials (via PAM). This makes it possible to
33
33
log onto a UNIX/Linux system using user and group accounts from a Windows
34
34
NT4 (including a Samba domain) or an Active Directory domain.
36
<a class="indexterm" name="id2653257"></a>
37
<a class="indexterm" name="id2653264"></a>
35
</p></li><li class="listitem"><p>
36
<a class="indexterm" name="id2659349"></a>
37
<a class="indexterm" name="id2659356"></a>
38
38
Identity resolution (via NSS). This is the default when winbind is not used.
40
<a class="indexterm" name="id2653276"></a>
41
<a class="indexterm" name="id2653282"></a>
42
<a class="indexterm" name="id2653289"></a>
43
<a class="indexterm" name="id2653295"></a>
44
<a class="indexterm" name="id2653302"></a>
45
<a class="indexterm" name="id2653309"></a>
46
<a class="indexterm" name="id2653316"></a>
39
</p></li><li class="listitem"><p>
40
<a class="indexterm" name="id2659368"></a>
41
<a class="indexterm" name="id2659375"></a>
42
<a class="indexterm" name="id2659381"></a>
43
<a class="indexterm" name="id2659388"></a>
44
<a class="indexterm" name="id2659395"></a>
45
<a class="indexterm" name="id2659402"></a>
46
<a class="indexterm" name="id2659408"></a>
47
47
Winbind maintains a database called winbind_idmap.tdb in which it stores
48
48
mappings between UNIX UIDs, GIDs, and NT SIDs. This mapping is used only
49
49
for users and groups that do not have a local UID/GID. It stores the UID/GID
51
51
If <em class="parameter"><code>idmap backend</code></em> has been specified as <code class="constant">ldap:ldap://hostname[:389]</code>,
52
52
then instead of using a local mapping, Winbind will obtain this information
53
53
from the LDAP database.
54
</p></li></ul></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
55
<a class="indexterm" name="id2653346"></a>
56
<a class="indexterm" name="id2653352"></a>
57
<a class="indexterm" name="id2653362"></a>
58
<a class="indexterm" name="id2653368"></a>
59
<a class="indexterm" name="id2653375"></a>
60
<a class="indexterm" name="id2653382"></a>
54
</p></li></ul></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
55
<a class="indexterm" name="id2659438"></a>
56
<a class="indexterm" name="id2659445"></a>
57
<a class="indexterm" name="id2659454"></a>
58
<a class="indexterm" name="id2659461"></a>
59
<a class="indexterm" name="id2659468"></a>
60
<a class="indexterm" name="id2659475"></a>
61
61
If <code class="literal">winbindd</code> is not running, smbd (which calls <code class="literal">winbindd</code>) will fall back to
62
62
using purely local information from <code class="filename">/etc/passwd</code> and <code class="filename">/etc/group</code> and no dynamic
63
63
mapping will be used. On an operating system that has been enabled with the NSS,
64
64
the resolution of user and group information will be accomplished via NSS.
65
</p></div><div class="figure"><a name="winbind_idmap"></a><p class="title"><b>Figure�24.1.�Winbind Idmap</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/idmap_winbind_no_loop.png" width="243" alt="Winbind Idmap"></div></div></div><br class="figure-break"></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2653461"></a>Introduction</h2></div></div></div><p>It is well known that UNIX and Microsoft Windows NT have
65
</p></div><div class="figure"><a name="winbind_idmap"></a><p class="title"><b>Figure�24.1.�Winbind Idmap</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/idmap_winbind_no_loop.png" width="243" alt="Winbind Idmap"></div></div></div><br class="figure-break"></div><div class="sect1" title="Introduction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2659554"></a>Introduction</h2></div></div></div><p>It is well known that UNIX and Microsoft Windows NT have
66
66
different models for representing user and group information and
67
67
use different technologies for implementing them. This fact has
68
68
made it difficult to integrate the two systems in a satisfactory
70
<a class="indexterm" name="id2653477"></a>
71
<a class="indexterm" name="id2653484"></a>
70
<a class="indexterm" name="id2659569"></a>
71
<a class="indexterm" name="id2659576"></a>
72
72
One common solution in use today has been to create
73
73
identically named user accounts on both the UNIX and Windows systems
74
74
and use the Samba suite of programs to provide file and print services
77
77
and two sets of passwords are required both of which
78
78
can lead to synchronization problems between the UNIX and Windows
79
79
systems and confusion for users.</p><p>We divide the unified logon problem for UNIX machines into
80
three smaller problems:</p><div class="itemizedlist"><ul type="disc"><li><p>Obtaining Windows NT user and group information.
81
</p></li><li><p>Authenticating Windows NT users.
82
</p></li><li><p>Password changing for Windows NT users.
80
three smaller problems:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Obtaining Windows NT user and group information.
81
</p></li><li class="listitem"><p>Authenticating Windows NT users.
82
</p></li><li class="listitem"><p>Password changing for Windows NT users.
83
83
</p></li></ul></div><p>
84
<a class="indexterm" name="id2653528"></a>
85
<a class="indexterm" name="id2653535"></a>
84
<a class="indexterm" name="id2659620"></a>
85
<a class="indexterm" name="id2659627"></a>
86
86
Ideally, a prospective solution to the unified logon problem
87
87
would satisfy all the above components without duplication of
88
88
information on the UNIX machines and without creating additional
89
89
tasks for the system administrator when maintaining users and
90
90
groups on either system. The Winbind system provides a simple
91
91
and elegant solution to all three components of the unified logon
92
problem.</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2653551"></a>What Winbind Provides</h2></div></div></div><p>
93
<a class="indexterm" name="id2653559"></a>
94
<a class="indexterm" name="id2653566"></a>
95
<a class="indexterm" name="id2653572"></a>
96
<a class="indexterm" name="id2653579"></a>
92
problem.</p></div><div class="sect1" title="What Winbind Provides"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2659643"></a>What Winbind Provides</h2></div></div></div><p>
93
<a class="indexterm" name="id2659651"></a>
94
<a class="indexterm" name="id2659658"></a>
95
<a class="indexterm" name="id2659665"></a>
96
<a class="indexterm" name="id2659672"></a>
97
97
Winbind unifies UNIX and Windows NT account management by
98
98
allowing a UNIX box to become a full member of an NT domain. Once
99
99
this is done, the UNIX box will see NT users and groups as if
100
they were “<span class="quote">native</span>” UNIX users and groups, allowing the NT domain
100
they were <span class="quote">“<span class="quote">native</span>”</span> UNIX users and groups, allowing the NT domain
101
101
to be used in much the same manner that NIS+ is used within
102
102
UNIX-only environments.</p><p>
103
<a class="indexterm" name="id2653599"></a>
104
<a class="indexterm" name="id2653606"></a>
105
<a class="indexterm" name="id2653612"></a>
106
<a class="indexterm" name="id2653619"></a>
103
<a class="indexterm" name="id2659691"></a>
104
<a class="indexterm" name="id2659698"></a>
105
<a class="indexterm" name="id2659705"></a>
106
<a class="indexterm" name="id2659712"></a>
107
107
The end result is that whenever a
108
108
program on the UNIX machine asks the operating system to look up
109
109
a user or group name, the query will be resolved by asking the
112
112
(via the NSS name resolution modules in the C library), this
113
113
redirection to the NT domain controller is completely
114
114
transparent.</p><p>
115
<a class="indexterm" name="id2653636"></a>
116
<a class="indexterm" name="id2653643"></a>
115
<a class="indexterm" name="id2659729"></a>
116
<a class="indexterm" name="id2659736"></a>
117
117
Users on the UNIX machine can then use NT user and group
118
names as they would “<span class="quote">native</span>” UNIX names. They can chown files
118
names as they would <span class="quote">“<span class="quote">native</span>”</span> UNIX names. They can chown files
119
119
so they are owned by NT domain users or even login to the
120
120
UNIX machine and run a UNIX X-Window session as a domain user.</p><p>
121
<a class="indexterm" name="id2653661"></a>
121
<a class="indexterm" name="id2659753"></a>
122
122
The only obvious indication that Winbind is being used is
123
123
that user and group names take the form <code class="constant">DOMAIN\user</code> and
124
124
<code class="constant">DOMAIN\group</code>. This is necessary because it allows Winbind to determine
125
125
that redirection to a domain controller is wanted for a particular
126
126
lookup and which trusted domain is being referenced.</p><p>
127
<a class="indexterm" name="id2653683"></a>
128
<a class="indexterm" name="id2653690"></a>
127
<a class="indexterm" name="id2659776"></a>
128
<a class="indexterm" name="id2659783"></a>
129
129
Additionally, Winbind provides an authentication service that hooks into the PAM system
130
130
to provide authentication via an NT domain to any PAM-enabled
131
131
applications. This capability solves the problem of synchronizing
132
132
passwords between systems, since all passwords are stored in a single
133
location (on the domain controller).</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2653704"></a>Target Uses</h3></div></div></div><p>
134
<a class="indexterm" name="id2653712"></a>
133
location (on the domain controller).</p><div class="sect2" title="Target Uses"><div class="titlepage"><div><div><h3 class="title"><a name="id2659796"></a>Target Uses</h3></div></div></div><p>
134
<a class="indexterm" name="id2659804"></a>
135
135
Winbind is targeted at organizations that have an
136
136
existing NT-based domain infrastructure into which they wish
137
137
to put UNIX workstations or servers. Winbind will allow these
139
139
maintain a separate account infrastructure. This greatly
140
140
simplifies the administrative overhead of deploying UNIX
141
141
workstations into an NT-based organization.</p><p>
142
<a class="indexterm" name="id2653729"></a>
143
<a class="indexterm" name="id2653735"></a>
142
<a class="indexterm" name="id2659821"></a>
143
<a class="indexterm" name="id2659828"></a>
144
144
Another interesting way in which we expect Winbind to
145
145
be used is as a central part of UNIX-based appliances. Appliances
146
146
that provide file and print services to Microsoft-based networks
147
147
will be able to use Winbind to provide seamless integration of
148
the appliance into the domain.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2653749"></a>Handling of Foreign SIDs</h3></div></div></div><p>
149
<a class="indexterm" name="id2653757"></a>
148
the appliance into the domain.</p></div><div class="sect2" title="Handling of Foreign SIDs"><div class="titlepage"><div><div><h3 class="title"><a name="id2659842"></a>Handling of Foreign SIDs</h3></div></div></div><p>
149
<a class="indexterm" name="id2659850"></a>
150
150
The term <span class="emphasis"><em>foreign SID</em></span> is often met with the reaction that it
151
151
is not relevant to a particular environment. The following documents an interchange
152
152
that took place on the Samba mailing list. It is a good example of the confusion
153
153
often expressed regarding the use of winbind.
155
<a class="indexterm" name="id2653775"></a>
155
<a class="indexterm" name="id2659868"></a>
156
156
Fact: Winbind is needed to handle users who use workstations that are NOT part
157
157
of the local domain.
159
<a class="indexterm" name="id2653787"></a>
160
Response: “<span class="quote">Why? I've used Samba with workstations that are not part of my domains
159
<a class="indexterm" name="id2659880"></a>
160
Response: <span class="quote">“<span class="quote">Why? I've used Samba with workstations that are not part of my domains
161
161
lots of times without using winbind. I thought winbind was for using Samba as a member server
162
in a domain controlled by another Samba/Windows PDC.</span>”
162
in a domain controlled by another Samba/Windows PDC.</span>”</span>
164
<a class="indexterm" name="id2653804"></a>
165
<a class="indexterm" name="id2653811"></a>
166
<a class="indexterm" name="id2653818"></a>
164
<a class="indexterm" name="id2659897"></a>
165
<a class="indexterm" name="id2659904"></a>
166
<a class="indexterm" name="id2659910"></a>
167
167
If the Samba server will be accessed from a domain other than the local Samba domain, or
168
168
if there will be access from machines that are not local domain members, winbind will
169
169
permit the allocation of UIDs and GIDs from the assigned pool that will keep the identity
170
170
of the foreign user separate from users that are members of the Samba domain.
172
<a class="indexterm" name="id2653834"></a>
173
<a class="indexterm" name="id2653840"></a>
174
<a class="indexterm" name="id2653847"></a>
175
<a class="indexterm" name="id2653854"></a>
172
<a class="indexterm" name="id2659926"></a>
173
<a class="indexterm" name="id2659933"></a>
174
<a class="indexterm" name="id2659940"></a>
175
<a class="indexterm" name="id2659947"></a>
176
176
This means that winbind is eminently useful in cases where a single
177
177
Samba PDC on a local network is combined with both domain member and domain non-member workstations.
178
178
If winbind is not used, the user george on a Windows workstation that is not a domain
181
181
is that the local user george will be treated as the account DOMAIN\george and the
182
182
foreign (non-member of the domain) account will be treated as MACHINE\george because
183
183
each has a different SID.
184
</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2653875"></a>How Winbind Works</h2></div></div></div><p>
185
<a class="indexterm" name="id2653883"></a>
186
<a class="indexterm" name="id2653890"></a>
187
<a class="indexterm" name="id2653897"></a>
188
<a class="indexterm" name="id2653903"></a>
184
</p></div></div><div class="sect1" title="How Winbind Works"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2659968"></a>How Winbind Works</h2></div></div></div><p>
185
<a class="indexterm" name="id2659975"></a>
186
<a class="indexterm" name="id2659982"></a>
187
<a class="indexterm" name="id2659989"></a>
188
<a class="indexterm" name="id2659996"></a>
189
189
The Winbind system is designed around a client/server
190
190
architecture. A long-running <code class="literal">winbindd</code> daemon
191
191
listens on a UNIX domain socket waiting for requests
192
192
to arrive. These requests are generated by the NSS and PAM
193
193
clients and are processed sequentially.</p><p>The technologies used to implement Winbind are described
194
in detail below.</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2653925"></a>Microsoft Remote Procedure Calls</h3></div></div></div><p>
195
<a class="indexterm" name="id2653934"></a>
196
<a class="indexterm" name="id2653943"></a>
197
<a class="indexterm" name="id2653950"></a>
198
<a class="indexterm" name="id2653957"></a>
199
<a class="indexterm" name="id2653964"></a>
194
in detail below.</p><div class="sect2" title="Microsoft Remote Procedure Calls"><div class="titlepage"><div><div><h3 class="title"><a name="id2660018"></a>Microsoft Remote Procedure Calls</h3></div></div></div><p>
195
<a class="indexterm" name="id2660026"></a>
196
<a class="indexterm" name="id2660036"></a>
197
<a class="indexterm" name="id2660042"></a>
198
<a class="indexterm" name="id2660049"></a>
199
<a class="indexterm" name="id2660056"></a>
200
200
Over the last few years, efforts have been underway by various Samba Team members to implement various aspects of
201
201
the Microsoft Remote Procedure Call (MSRPC) system. This system is used for most network-related operations
202
202
between Windows NT machines, including remote management, user authentication, and print spooling. Although
203
203
initially this work was done to aid the implementation of Primary Domain Controller (PDC) functionality in
204
204
Samba, it has also yielded a body of code that can be used for other purposes.
206
<a class="indexterm" name="id2653983"></a>
207
<a class="indexterm" name="id2653989"></a>
208
<a class="indexterm" name="id2653996"></a>
206
<a class="indexterm" name="id2660075"></a>
207
<a class="indexterm" name="id2660082"></a>
208
<a class="indexterm" name="id2660089"></a>
209
209
Winbind uses various MSRPC calls to enumerate domain users and groups and to obtain detailed information about
210
210
individual users or groups. Other MSRPC calls can be used to authenticate NT domain users and to change user
211
211
passwords. By directly querying a Windows PDC for user and group information, Winbind maps the NT account
212
212
information onto UNIX user and group names.
213
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2654018"></a>Microsoft Active Directory Services</h3></div></div></div><p>
214
<a class="indexterm" name="id2654027"></a>
215
<a class="indexterm" name="id2654033"></a>
216
<a class="indexterm" name="id2654040"></a>
217
<a class="indexterm" name="id2654047"></a>
218
Since late 2001, Samba has gained the ability to interact with Microsoft Windows 2000 using its “<span class="quote">native
219
mode</span>” protocols rather than the NT4 RPC services. Using LDAP and Kerberos, a domain member running
213
</p></div><div class="sect2" title="Microsoft Active Directory Services"><div class="titlepage"><div><div><h3 class="title"><a name="id2660111"></a>Microsoft Active Directory Services</h3></div></div></div><p>
214
<a class="indexterm" name="id2660119"></a>
215
<a class="indexterm" name="id2660126"></a>
216
<a class="indexterm" name="id2660133"></a>
217
<a class="indexterm" name="id2660140"></a>
218
Since late 2001, Samba has gained the ability to interact with Microsoft Windows 2000 using its <span class="quote">“<span class="quote">native
219
mode</span>”</span> protocols rather than the NT4 RPC services. Using LDAP and Kerberos, a domain member running
220
220
Winbind can enumerate users and groups in exactly the same way as a Windows 200x client would, and in so doing
221
221
provide a much more efficient and effective Winbind implementation.
222
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2654066"></a>Name Service Switch</h3></div></div></div><p>
223
<a class="indexterm" name="id2654074"></a>
224
<a class="indexterm" name="id2654080"></a>
225
<a class="indexterm" name="id2654088"></a>
226
<a class="indexterm" name="id2654094"></a>
222
</p></div><div class="sect2" title="Name Service Switch"><div class="titlepage"><div><div><h3 class="title"><a name="id2660159"></a>Name Service Switch</h3></div></div></div><p>
223
<a class="indexterm" name="id2660166"></a>
224
<a class="indexterm" name="id2660173"></a>
225
<a class="indexterm" name="id2660180"></a>
226
<a class="indexterm" name="id2660187"></a>
227
227
The NSS is a feature that is present in many UNIX operating systems. It allows system
228
228
information such as hostnames, mail aliases, and user information
229
229
to be resolved from different sources. For example, a standalone
232
232
may first attempt to resolve system information from local files,
233
233
and then consult an NIS database for user information or a DNS server
234
234
for hostname information.</p><p>
235
<a class="indexterm" name="id2654113"></a>
236
<a class="indexterm" name="id2654119"></a>
237
<a class="indexterm" name="id2654126"></a>
238
<a class="indexterm" name="id2654133"></a>
239
<a class="indexterm" name="id2654140"></a>
235
<a class="indexterm" name="id2660205"></a>
236
<a class="indexterm" name="id2660212"></a>
237
<a class="indexterm" name="id2660219"></a>
238
<a class="indexterm" name="id2660226"></a>
239
<a class="indexterm" name="id2660232"></a>
240
240
The NSS application programming interface allows Winbind to present itself as a source of system
241
241
information when resolving UNIX usernames and groups. Winbind uses this interface and information obtained
242
242
from a Windows NT server using MSRPC calls to provide a new source of account enumeration. Using standard UNIX
243
243
library calls, you can enumerate the users and groups on a UNIX machine running Winbind and see all users and
244
244
groups in an NT domain plus any trusted domain as though they were local users and groups.
246
<a class="indexterm" name="id2654159"></a>
247
<a class="indexterm" name="id2654165"></a>
248
<a class="indexterm" name="id2654172"></a>
246
<a class="indexterm" name="id2660251"></a>
247
<a class="indexterm" name="id2660258"></a>
248
<a class="indexterm" name="id2660265"></a>
249
249
The primary control file for NSS is <code class="filename">/etc/nsswitch.conf</code>. When a UNIX application
250
250
makes a request to do a lookup, the C library looks in <code class="filename">/etc/nsswitch.conf</code> for a line that
251
matches the service type being requested; for example, the “<span class="quote">passwd</span>” service type is used when
251
matches the service type being requested; for example, the <span class="quote">“<span class="quote">passwd</span>”</span> service type is used when
252
252
user or group names are looked up. This config line specifies which implementations of that service should be
253
253
tried and in what order. If the passwd config line is:
254
254
</p><pre class="screen">
255
255
passwd: files example
257
<a class="indexterm" name="id2654208"></a>
258
<a class="indexterm" name="id2654215"></a>
259
<a class="indexterm" name="id2654222"></a>
257
<a class="indexterm" name="id2660300"></a>
258
<a class="indexterm" name="id2660307"></a>
259
<a class="indexterm" name="id2660314"></a>
260
260
then the C library will first load a module called <code class="filename">/lib/libnss_files.so</code> followed
261
261
by the module <code class="filename">/lib/libnss_example.so</code>. The C library will dynamically load each of these
262
262
modules in turn and call resolver functions within the modules to try to resolve the request. Once the request
263
263
is resolved, the C library returns the result to the application.
265
<a class="indexterm" name="id2654250"></a>
266
<a class="indexterm" name="id2654256"></a>
267
<a class="indexterm" name="id2654263"></a>
265
<a class="indexterm" name="id2660342"></a>
266
<a class="indexterm" name="id2660349"></a>
267
<a class="indexterm" name="id2660356"></a>
268
268
This NSS interface provides an easy way for Winbind to hook into the operating system. All that needs
269
269
to be done is to put <code class="filename">libnss_winbind.so</code> in <code class="filename">/lib/</code> then add
270
“<span class="quote">winbind</span>” into <code class="filename">/etc/nsswitch.conf</code> at the appropriate place. The C library
270
<span class="quote">“<span class="quote">winbind</span>”</span> into <code class="filename">/etc/nsswitch.conf</code> at the appropriate place. The C library
271
271
will then call Winbind to resolve user and group names.
272
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2654298"></a>Pluggable Authentication Modules</h3></div></div></div><p>
273
<a class="indexterm" name="id2654306"></a>
274
<a class="indexterm" name="id2654313"></a>
275
<a class="indexterm" name="id2654320"></a>
276
<a class="indexterm" name="id2654327"></a>
272
</p></div><div class="sect2" title="Pluggable Authentication Modules"><div class="titlepage"><div><div><h3 class="title"><a name="id2660391"></a>Pluggable Authentication Modules</h3></div></div></div><p>
273
<a class="indexterm" name="id2660399"></a>
274
<a class="indexterm" name="id2660405"></a>
275
<a class="indexterm" name="id2660412"></a>
276
<a class="indexterm" name="id2660419"></a>
277
277
PAMs provide a system for abstracting authentication and authorization technologies. With a PAM
278
278
module, it is possible to specify different authentication methods for different system applications without
279
279
having to recompile these applications. PAM is also useful for implementing a particular policy for
280
280
authorization. For example, a system administrator may only allow console logins from users stored in the
281
281
local password file but only allow users resolved from an NIS database to log in over the network.
283
<a class="indexterm" name="id2654346"></a>
284
<a class="indexterm" name="id2654352"></a>
285
<a class="indexterm" name="id2654359"></a>
286
<a class="indexterm" name="id2654366"></a>
287
<a class="indexterm" name="id2654373"></a>
283
<a class="indexterm" name="id2660438"></a>
284
<a class="indexterm" name="id2660445"></a>
285
<a class="indexterm" name="id2660452"></a>
286
<a class="indexterm" name="id2660459"></a>
287
<a class="indexterm" name="id2660466"></a>
288
288
Winbind uses the authentication management and password management PAM interface to integrate Windows
289
289
NT users into a UNIX system. This allows Windows NT users to log in to a UNIX machine and be authenticated
290
290
against a suitable PDC. These users can also change their passwords and have this change take effect directly
293
<a class="indexterm" name="id2654389"></a>
294
<a class="indexterm" name="id2654395"></a>
295
<a class="indexterm" name="id2654402"></a>
296
<a class="indexterm" name="id2654409"></a>
293
<a class="indexterm" name="id2660481"></a>
294
<a class="indexterm" name="id2660488"></a>
295
<a class="indexterm" name="id2660495"></a>
296
<a class="indexterm" name="id2660502"></a>
297
297
PAM is configured by providing control files in the directory <code class="filename">/etc/pam.d/</code> for
298
298
each of the services that require authentication. When an authentication request is made by an application,
299
299
the PAM code in the C library looks up this control file to determine what modules to load to do the
313
313
allocated the next UNIX ID from the range. The same process applies for Windows NT groups. Over time, Winbind
314
314
will have mapped all Windows NT users and groups to UNIX user IDs and group IDs.
316
<a class="indexterm" name="id2654497"></a>
317
<a class="indexterm" name="id2654504"></a>
318
<a class="indexterm" name="id2654510"></a>
319
<a class="indexterm" name="id2654517"></a>
316
<a class="indexterm" name="id2660590"></a>
317
<a class="indexterm" name="id2660596"></a>
318
<a class="indexterm" name="id2660603"></a>
319
<a class="indexterm" name="id2660610"></a>
320
320
The results of this mapping are stored persistently in an ID mapping database held in a tdb database.
321
321
This ensures that RIDs are mapped to UNIX IDs in a consistent way.
322
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2654529"></a>Result Caching</h3></div></div></div><p>
323
<a class="indexterm" name="id2654537"></a>
324
<a class="indexterm" name="id2654543"></a>
325
<a class="indexterm" name="id2654550"></a>
326
<a class="indexterm" name="id2654557"></a>
327
<a class="indexterm" name="id2654564"></a>
322
</p></div><div class="sect2" title="Result Caching"><div class="titlepage"><div><div><h3 class="title"><a name="id2660622"></a>Result Caching</h3></div></div></div><p>
323
<a class="indexterm" name="id2660629"></a>
324
<a class="indexterm" name="id2660636"></a>
325
<a class="indexterm" name="id2660643"></a>
326
<a class="indexterm" name="id2660650"></a>
327
<a class="indexterm" name="id2660656"></a>
328
328
An active directory system can generate a lot of user and group name lookups. To reduce the network
329
329
cost of these lookups, Winbind uses a caching scheme based on the SAM sequence number supplied by NT domain
330
330
controllers. User or group information returned by a PDC is cached by Winbind along with a sequence number
332
332
information is modified. If a cached entry has expired, the sequence number is requested from the PDC and
333
333
compared against the sequence number of the cached entry. If the sequence numbers do not match, then the
334
334
cached information is discarded and up-to-date information is requested directly from the PDC.
335
</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2654586"></a>Installation and Configuration</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2654592"></a>Introduction</h3></div></div></div><p>
336
<a class="indexterm" name="id2654600"></a>
337
<a class="indexterm" name="id2654607"></a>
338
<a class="indexterm" name="id2654613"></a>
335
</p></div></div><div class="sect1" title="Installation and Configuration"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2660678"></a>Installation and Configuration</h2></div></div></div><div class="sect2" title="Introduction"><div class="titlepage"><div><div><h3 class="title"><a name="id2660684"></a>Introduction</h3></div></div></div><p>
336
<a class="indexterm" name="id2660692"></a>
337
<a class="indexterm" name="id2660699"></a>
338
<a class="indexterm" name="id2660706"></a>
339
339
This section describes the procedures used to get Winbind up and running. Winbind is capable of providing
340
340
access and authentication control for Windows Domain users through an NT or Windows 200x PDC for regular
341
341
services, such as telnet and ftp, as well for Samba services.
342
</p><div class="itemizedlist"><ul type="disc"><li><p>
342
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
343
343
<span class="emphasis"><em>Why should I do this?</em></span>
345
<a class="indexterm" name="id2654639"></a>
346
<a class="indexterm" name="id2654646"></a>
347
<a class="indexterm" name="id2654653"></a>
348
<a class="indexterm" name="id2654660"></a>
345
<a class="indexterm" name="id2660732"></a>
346
<a class="indexterm" name="id2660739"></a>
347
<a class="indexterm" name="id2660746"></a>
348
<a class="indexterm" name="id2660753"></a>
349
349
This allows the Samba administrator to rely on the authentication mechanisms on the Windows NT/200x PDC
350
350
for the authentication of domain members. Windows NT/200x users no longer need to have separate accounts on
351
351
the Samba server.
352
</p></li><li class="listitem"><p>
353
353
<span class="emphasis"><em>Who should be reading this document?</em></span>
355
<a class="indexterm" name="id2654685"></a>
356
<a class="indexterm" name="id2654691"></a>
355
<a class="indexterm" name="id2660777"></a>
356
<a class="indexterm" name="id2660784"></a>
357
357
This document is designed for system administrators. If you are implementing Samba on a file server and wish
358
358
to (fairly easily) integrate existing Windows NT/200x users from your PDC onto the Samba server, this document
360
</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2654706"></a>Requirements</h3></div></div></div><p>
361
<a class="indexterm" name="id2654714"></a>
362
<a class="indexterm" name="id2654721"></a>
363
<a class="indexterm" name="id2654728"></a>
360
</p></li></ul></div></div><div class="sect2" title="Requirements"><div class="titlepage"><div><div><h3 class="title"><a name="id2660799"></a>Requirements</h3></div></div></div><p>
361
<a class="indexterm" name="id2660807"></a>
362
<a class="indexterm" name="id2660813"></a>
363
<a class="indexterm" name="id2660820"></a>
364
364
If you have a Samba configuration file that you are currently using, <span class="emphasis"><em>BACK IT UP!</em></span>
365
365
If your system already uses PAM, <span class="emphasis"><em>back up the <code class="filename">/etc/pam.d</code> directory
366
366
contents!</em></span> If you haven't already made a boot disk, <span class="emphasis"><em>MAKE ONE NOW!</em></span>
368
<a class="indexterm" name="id2654757"></a>
369
<a class="indexterm" name="id2654764"></a>
370
<a class="indexterm" name="id2654771"></a>
368
<a class="indexterm" name="id2660850"></a>
369
<a class="indexterm" name="id2660857"></a>
370
<a class="indexterm" name="id2660864"></a>
371
371
Messing with the PAM configuration files can make it nearly impossible to log in to your machine. That's
372
372
why you want to be able to boot back into your machine in single-user mode and restore your
373
373
<code class="filename">/etc/pam.d</code> to the original state it was in if you get frustrated with the
374
374
way things are going.
376
<a class="indexterm" name="id2654792"></a>
377
<a class="indexterm" name="id2654799"></a>
376
<a class="indexterm" name="id2660884"></a>
377
<a class="indexterm" name="id2660891"></a>
378
378
The latest version of Samba-3 includes a functioning winbindd daemon. Please refer to the <a class="ulink" href="http://samba.org/" target="_top">main Samba Web page</a>, or better yet, your closest Samba mirror site for
379
379
instructions on downloading the source code.
381
<a class="indexterm" name="id2654818"></a>
382
<a class="indexterm" name="id2654825"></a>
383
<a class="indexterm" name="id2654832"></a>
384
<a class="indexterm" name="id2654838"></a>
381
<a class="indexterm" name="id2660911"></a>
382
<a class="indexterm" name="id2660918"></a>
383
<a class="indexterm" name="id2660924"></a>
384
<a class="indexterm" name="id2660931"></a>
385
385
To allow domain users the ability to access Samba shares and files, as well as potentially other services
386
386
provided by your Samba machine, PAM must be set up properly on your
387
387
machine. In order to compile the Winbind modules, you should have at least the PAM development libraries installed
388
388
on your system. Please refer to the PAM Web site <a class="ulink" href="http://www.kernel.org/pub/linux/libs/pam/" target="_top">http://www.kernel.org/pub/linux/libs/pam/</a>.
389
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2654858"></a>Testing Things Out</h3></div></div></div><p>
390
<a class="indexterm" name="id2654866"></a>
391
<a class="indexterm" name="id2654873"></a>
392
<a class="indexterm" name="id2654880"></a>
393
<a class="indexterm" name="id2654887"></a>
394
<a class="indexterm" name="id2654893"></a>
389
</p></div><div class="sect2" title="Testing Things Out"><div class="titlepage"><div><div><h3 class="title"><a name="id2660951"></a>Testing Things Out</h3></div></div></div><p>
390
<a class="indexterm" name="id2660959"></a>
391
<a class="indexterm" name="id2660966"></a>
392
<a class="indexterm" name="id2660972"></a>
393
<a class="indexterm" name="id2660979"></a>
394
<a class="indexterm" name="id2660986"></a>
395
395
Before starting, it is probably best to kill off all the Samba-related daemons running on your server.
396
396
Kill off all <span class="application">smbd</span>, <span class="application">nmbd</span>, and <span class="application">winbindd</span> processes that may be running. To use PAM,
397
397
make sure that you have the standard PAM package that supplies the <code class="filename">/etc/pam.d</code>
399
399
and the <code class="filename">/usr/doc</code> and <code class="filename">/usr/man</code> entries for PAM. Winbind is built
400
400
better in Samba if the pam-devel package is also installed. This package includes the header files
401
401
needed to compile PAM-aware applications.
402
</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2654945"></a>Configure <code class="filename">nsswitch.conf</code> and the Winbind Libraries on Linux and Solaris</h4></div></div></div><p>
403
<a class="indexterm" name="id2654960"></a>
404
<a class="indexterm" name="id2654966"></a>
405
<a class="indexterm" name="id2654973"></a>
406
<a class="indexterm" name="id2654980"></a>
402
</p><div class="sect3" title="Configure nsswitch.conf and the Winbind Libraries on Linux and Solaris"><div class="titlepage"><div><div><h4 class="title"><a name="id2661038"></a>Configure <code class="filename">nsswitch.conf</code> and the Winbind Libraries on Linux and Solaris</h4></div></div></div><p>
403
<a class="indexterm" name="id2661052"></a>
404
<a class="indexterm" name="id2661059"></a>
405
<a class="indexterm" name="id2661066"></a>
406
<a class="indexterm" name="id2661072"></a>
407
407
PAM is a standard component of most current generation UNIX/Linux systems. Unfortunately, few systems install
408
408
the <code class="filename">pam-devel</code> libraries that are needed to build PAM-enabled Samba. Additionally, Samba-3
409
409
may auto-install the Winbind files into their correct locations on your system, so before you get too far down
481
481
From this it is apparent that the <code class="filename">/usr/local/lib</code> directory is included
482
482
in the search dynamic link libraries in order to satisfy object module dependencies.
483
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2655343"></a>NSS Winbind on AIX</h4></div></div></div><p>(This section is only for those running AIX.)</p><p>
484
<a class="indexterm" name="id2655355"></a>
485
<a class="indexterm" name="id2655362"></a>
486
<a class="indexterm" name="id2655369"></a>
487
<a class="indexterm" name="id2655376"></a>
488
<a class="indexterm" name="id2655383"></a>
489
<a class="indexterm" name="id2655390"></a>
483
</p></div><div class="sect3" title="NSS Winbind on AIX"><div class="titlepage"><div><div><h4 class="title"><a name="id2661436"></a>NSS Winbind on AIX</h4></div></div></div><p>(This section is only for those running AIX.)</p><p>
484
<a class="indexterm" name="id2661448"></a>
485
<a class="indexterm" name="id2661454"></a>
486
<a class="indexterm" name="id2661461"></a>
487
<a class="indexterm" name="id2661468"></a>
488
<a class="indexterm" name="id2661475"></a>
489
<a class="indexterm" name="id2661482"></a>
490
490
The Winbind AIX identification module gets built as <code class="filename">libnss_winbind.so</code> in the
491
491
nsswitch directory of the Samba source. This file can be copied to <code class="filename">/usr/lib/security</code>,
492
492
and the AIX naming convention would indicate that it should be named WINBIND. A stanza like the following:
499
499
identification, but there have been reports of success using the standard Winbind PAM module for
500
500
authentication. Use caution configuring loadable authentication modules, since misconfiguration can make
501
501
it impossible to log on to the system. Information regarding the AIX authentication module API can
502
be found in the “<span class="quote">Kernel Extensions and Device Support Programming Concepts for AIX</span>” document that
502
be found in the <span class="quote">“<span class="quote">Kernel Extensions and Device Support Programming Concepts for AIX</span>”</span> document that
503
503
describes the <a class="ulink" href="http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/kernextc/sec_load_mod.htm" target="_top">
504
504
Loadable Authentication Module Programming Interface</a> for AIX. Further information on administering the modules
505
505
can be found in the <a class="ulink" href="http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixbman/baseadmn/iandaadmin.htm" target="_top">System
506
506
Management Guide: Operating System and Devices.</a>
507
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2655457"></a>Configure smb.conf</h4></div></div></div><p>
508
<a class="indexterm" name="id2655465"></a>
509
<a class="indexterm" name="id2655471"></a>
510
<a class="indexterm" name="id2655478"></a>
507
</p></div><div class="sect3" title="Configure smb.conf"><div class="titlepage"><div><div><h4 class="title"><a name="id2661549"></a>Configure smb.conf</h4></div></div></div><p>
508
<a class="indexterm" name="id2661557"></a>
509
<a class="indexterm" name="id2661564"></a>
510
<a class="indexterm" name="id2661571"></a>
511
511
Several parameters are needed in the <code class="filename">smb.conf</code> file to control the behavior of <span class="application">winbindd</span>. These
512
512
are described in more detail in the <a class="citerefentry" href="winbindd.8.html"><span class="citerefentry"><span class="refentrytitle">winbindd</span>(8)</span></a> man page. My <code class="filename">smb.conf</code> file, as shown in <a class="link" href="winbind.html#winbindcfg" title="Example�24.1.�smb.conf for Winbind Setup">the smb.conf for Winbind Setup</a>, was modified to include the necessary entries in the [global] section.
513
</p><div class="example"><a name="winbindcfg"></a><p class="title"><b>Example�24.1.�smb.conf for Winbind Setup</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td># separate domain and username with '\', like DOMAIN\username</td></tr><tr><td><a class="indexterm" name="id2655552"></a><em class="parameter"><code>winbind separator = \</code></em></td></tr><tr><td># use uids from 10000 to 20000 for domain users</td></tr><tr><td><a class="indexterm" name="id2655568"></a><em class="parameter"><code>idmap uid = 10000-20000</code></em></td></tr><tr><td># use gids from 10000 to 20000 for domain groups</td></tr><tr><td><a class="indexterm" name="id2655584"></a><em class="parameter"><code>idmap gid = 10000-20000</code></em></td></tr><tr><td># allow enumeration of winbind users and groups</td></tr><tr><td><a class="indexterm" name="id2655599"></a><em class="parameter"><code>winbind enum users = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2655611"></a><em class="parameter"><code>winbind enum groups = yes</code></em></td></tr><tr><td># give winbind users a real shell (only needed if they have telnet access)</td></tr><tr><td><a class="indexterm" name="id2655628"></a><em class="parameter"><code>template homedir = /home/winnt/%D/%U</code></em></td></tr><tr><td><a class="indexterm" name="id2655640"></a><em class="parameter"><code>template shell = /bin/bash</code></em></td></tr></table></div></div><br class="example-break"></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2655654"></a>Join the Samba Server to the PDC Domain</h4></div></div></div><p>
514
<a class="indexterm" name="id2655662"></a>
515
<a class="indexterm" name="id2655669"></a>
516
<a class="indexterm" name="id2655676"></a>
513
</p><div class="example"><a name="winbindcfg"></a><p class="title"><b>Example�24.1.�smb.conf for Winbind Setup</b></p><div class="example-contents"><table border="0" summary="Simple list" class="simplelist"><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td># separate domain and username with '\', like DOMAIN\username</td></tr><tr><td><a class="indexterm" name="id2661644"></a><em class="parameter"><code>winbind separator = \</code></em></td></tr><tr><td># use uids from 10000 to 20000 for domain users</td></tr><tr><td><a class="indexterm" name="id2661660"></a><em class="parameter"><code>idmap uid = 10000-20000</code></em></td></tr><tr><td># use gids from 10000 to 20000 for domain groups</td></tr><tr><td><a class="indexterm" name="id2661676"></a><em class="parameter"><code>idmap gid = 10000-20000</code></em></td></tr><tr><td># allow enumeration of winbind users and groups</td></tr><tr><td><a class="indexterm" name="id2661692"></a><em class="parameter"><code>winbind enum users = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2661704"></a><em class="parameter"><code>winbind enum groups = yes</code></em></td></tr><tr><td># give winbind users a real shell (only needed if they have telnet access)</td></tr><tr><td><a class="indexterm" name="id2661720"></a><em class="parameter"><code>template homedir = /home/winnt/%D/%U</code></em></td></tr><tr><td><a class="indexterm" name="id2661732"></a><em class="parameter"><code>template shell = /bin/bash</code></em></td></tr></table></div></div><br class="example-break"></div><div class="sect3" title="Join the Samba Server to the PDC Domain"><div class="titlepage"><div><div><h4 class="title"><a name="id2661746"></a>Join the Samba Server to the PDC Domain</h4></div></div></div><p>
514
<a class="indexterm" name="id2661755"></a>
515
<a class="indexterm" name="id2661762"></a>
516
<a class="indexterm" name="id2661768"></a>
517
517
All machines that will participate in domain security should be members of
518
518
the domain. This applies also to the PDC and all BDCs.
520
<a class="indexterm" name="id2655688"></a>
521
<a class="indexterm" name="id2655694"></a>
522
<a class="indexterm" name="id2655701"></a>
523
<a class="indexterm" name="id2655712"></a>
524
<a class="indexterm" name="id2655719"></a>
525
<a class="indexterm" name="id2655726"></a>
526
<a class="indexterm" name="id2655733"></a>
527
<a class="indexterm" name="id2655739"></a>
528
<a class="indexterm" name="id2655746"></a>
520
<a class="indexterm" name="id2661780"></a>
521
<a class="indexterm" name="id2661787"></a>
522
<a class="indexterm" name="id2661794"></a>
523
<a class="indexterm" name="id2661805"></a>
524
<a class="indexterm" name="id2661812"></a>
525
<a class="indexterm" name="id2661818"></a>
526
<a class="indexterm" name="id2661825"></a>
527
<a class="indexterm" name="id2661832"></a>
528
<a class="indexterm" name="id2661839"></a>
529
529
The process of joining a domain requires the use of the <code class="literal">net rpc join</code>
530
530
command. This process communicates with the domain controller it will register with
531
531
(usually the PDC) via MS DCE RPC. This means, of course, that the <code class="literal">smbd</code>
532
532
process must be running on the target domain controller. It is therefore necessary to temporarily
533
533
start Samba on a PDC so that it can join its own domain.
535
<a class="indexterm" name="id2655774"></a>
536
<a class="indexterm" name="id2655781"></a>
537
<a class="indexterm" name="id2655788"></a>
535
<a class="indexterm" name="id2661867"></a>
536
<a class="indexterm" name="id2661873"></a>
537
<a class="indexterm" name="id2661880"></a>
538
538
Enter the following command to make the Samba server join the domain, where <em class="replaceable"><code>PDC</code></em> is
539
539
the name of your PDC and <em class="replaceable"><code>Administrator</code></em> is a domain user who has administrative
540
540
privileges in the domain.
541
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
542
<a class="indexterm" name="id2655809"></a>
543
<a class="indexterm" name="id2655816"></a>
544
<a class="indexterm" name="id2655822"></a>
545
<a class="indexterm" name="id2655829"></a>
541
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
542
<a class="indexterm" name="id2661902"></a>
543
<a class="indexterm" name="id2661908"></a>
544
<a class="indexterm" name="id2661915"></a>
545
<a class="indexterm" name="id2661922"></a>
546
546
Before attempting to join a machine to the domain, verify that Samba is running
547
547
on the target domain controller (usually PDC) and that it is capable of being reached via ports
548
548
137/udp, 135/tcp, 139/tcp, and 445/tcp (if Samba or Windows Server 2Kx).
550
<a class="indexterm" name="id2655844"></a>
550
<a class="indexterm" name="id2661936"></a>
551
551
The use of the <code class="literal">net rpc join</code> facility is shown here:
552
552
</p><pre class="screen">
553
553
<code class="prompt">root# </code><strong class="userinput"><code>/usr/local/samba/bin/net rpc join -S PDC -U Administrator</code></strong>
555
The proper response to the command should be “<span class="quote">Joined the domain
556
<em class="replaceable"><code>DOMAIN</code></em></span>” where <em class="replaceable"><code>DOMAIN</code></em>
555
The proper response to the command should be <span class="quote">“<span class="quote">Joined the domain
556
<em class="replaceable"><code>DOMAIN</code></em></span>”</span> where <em class="replaceable"><code>DOMAIN</code></em>
557
557
is your domain name.
558
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2655892"></a>Starting and Testing the <code class="literal">winbindd</code> Daemon</h4></div></div></div><p>
559
<a class="indexterm" name="id2655906"></a>
560
<a class="indexterm" name="id2655912"></a>
561
<a class="indexterm" name="id2655919"></a>
558
</p></div><div class="sect3" title="Starting and Testing the winbindd Daemon"><div class="titlepage"><div><div><h4 class="title"><a name="id2661984"></a>Starting and Testing the <code class="literal">winbindd</code> Daemon</h4></div></div></div><p>
559
<a class="indexterm" name="id2661998"></a>
560
<a class="indexterm" name="id2662005"></a>
561
<a class="indexterm" name="id2662012"></a>
562
562
Eventually, you will want to modify your Samba startup script to automatically invoke the winbindd daemon when
563
563
the other parts of Samba start, but it is possible to test out just the Winbind portion first. To start up
564
564
Winbind services, enter the following command as root:
566
566
<code class="prompt">root# </code><strong class="userinput"><code>/usr/local/samba/sbin/winbindd</code></strong>
568
568
Use the appropriate path to the location of the <code class="literal">winbindd</code> executable file.
569
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
570
<a class="indexterm" name="id2655959"></a>
571
<a class="indexterm" name="id2655965"></a>
569
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
570
<a class="indexterm" name="id2662051"></a>
571
<a class="indexterm" name="id2662058"></a>
572
572
The command to start up Winbind services assumes that Samba has been installed in the
573
573
<code class="filename">/usr/local/samba</code> directory tree. You may need to search for the location of Samba files
574
574
if this is not the location of <code class="literal">winbindd</code> on your system.
576
<a class="indexterm" name="id2655991"></a>
577
<a class="indexterm" name="id2655998"></a>
576
<a class="indexterm" name="id2662084"></a>
577
<a class="indexterm" name="id2662090"></a>
578
578
I'm always paranoid and like to make sure the daemon is really running.
579
579
</p><pre class="screen">
580
580
<code class="prompt">root# </code><strong class="userinput"><code>ps -ae | grep winbindd</code></strong>
583
<a class="indexterm" name="id2656026"></a>
583
<a class="indexterm" name="id2662118"></a>
584
584
This command should produce output like the following if the daemon is running.
585
585
</p><pre class="screen">
586
586
3025 ? 00:00:00 winbindd
589
<a class="indexterm" name="id2656043"></a>
590
<a class="indexterm" name="id2656050"></a>
589
<a class="indexterm" name="id2662136"></a>
590
<a class="indexterm" name="id2662142"></a>
591
591
Now, for the real test, try to get some information about the users on your PDC:
592
592
</p><pre class="screen">
593
593
<code class="prompt">root# </code><strong class="userinput"><code>/usr/local/samba/bin/wbinfo -u</code></strong>
640
640
</p><pre class="screen">
641
641
<code class="prompt">root# </code><strong class="userinput"><code>getent group</code></strong>
643
</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2656247"></a>Fix the init.d Startup Scripts</h4></div></div></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2656253"></a>Linux</h5></div></div></div><p>
644
<a class="indexterm" name="id2656260"></a>
645
<a class="indexterm" name="id2656267"></a>
646
<a class="indexterm" name="id2656274"></a>
647
<a class="indexterm" name="id2656281"></a>
648
<a class="indexterm" name="id2656288"></a>
649
<a class="indexterm" name="id2656295"></a>
650
<a class="indexterm" name="id2656302"></a>
651
<a class="indexterm" name="id2656307"></a>
652
<a class="indexterm" name="id2656313"></a>
643
</p></div><div class="sect3" title="Fix the init.d Startup Scripts"><div class="titlepage"><div><div><h4 class="title"><a name="id2662339"></a>Fix the init.d Startup Scripts</h4></div></div></div><div class="sect4" title="Linux"><div class="titlepage"><div><div><h5 class="title"><a name="id2662345"></a>Linux</h5></div></div></div><p>
644
<a class="indexterm" name="id2662352"></a>
645
<a class="indexterm" name="id2662359"></a>
646
<a class="indexterm" name="id2662366"></a>
647
<a class="indexterm" name="id2662373"></a>
648
<a class="indexterm" name="id2662380"></a>
649
<a class="indexterm" name="id2662387"></a>
650
<a class="indexterm" name="id2662394"></a>
651
<a class="indexterm" name="id2662399"></a>
652
<a class="indexterm" name="id2662405"></a>
653
653
The <span class="application">winbindd</span> daemon needs to start up after the <span class="application">smbd</span> and <span class="application">nmbd</span> daemons are running. To accomplish this
654
654
task, you need to modify the startup scripts of your system. They are located at
655
655
<code class="filename">/etc/init.d/smb</code> in Red Hat Linux and in <code class="filename">/etc/init.d/samba</code> in Debian
713
</pre></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2656458"></a>Solaris</h5></div></div></div><p>
713
</pre></div><div class="sect4" title="Solaris"><div class="titlepage"><div><div><h5 class="title"><a name="id2662551"></a>Solaris</h5></div></div></div><p>
714
714
Winbind does not work on Solaris 9; see <a class="link" href="Portability.html#winbind-solaris9" title="Winbind on Solaris 9">Winbind on Solaris 9 section</a>
717
<a class="indexterm" name="id2656479"></a>
718
<a class="indexterm" name="id2656486"></a>
719
<a class="indexterm" name="id2656493"></a>
720
<a class="indexterm" name="id2656500"></a>
721
<a class="indexterm" name="id2656507"></a>
722
<a class="indexterm" name="id2656514"></a>
717
<a class="indexterm" name="id2662572"></a>
718
<a class="indexterm" name="id2662578"></a>
719
<a class="indexterm" name="id2662586"></a>
720
<a class="indexterm" name="id2662593"></a>
721
<a class="indexterm" name="id2662599"></a>
722
<a class="indexterm" name="id2662606"></a>
723
723
On Solaris, you need to modify the <code class="filename">/etc/init.d/samba.server</code> startup script. It
724
724
usually only starts smbd and nmbd but should now start winbindd, too. If you have Samba installed in
725
725
<code class="filename">/usr/local/samba/bin</code>, the file could contains something like this:
780
780
</p><pre class="programlisting">
781
781
/usr/local/samba/sbin/winbindd -D
783
</p></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2656602"></a>Restarting</h5></div></div></div><p>
784
<a class="indexterm" name="id2656610"></a>
785
<a class="indexterm" name="id2656617"></a>
783
</p></div><div class="sect4" title="Restarting"><div class="titlepage"><div><div><h5 class="title"><a name="id2662695"></a>Restarting</h5></div></div></div><p>
784
<a class="indexterm" name="id2662703"></a>
785
<a class="indexterm" name="id2662710"></a>
786
786
If you restart the <span class="application">smbd</span>, <span class="application">nmbd</span>, and <span class="application">winbindd</span> daemons at this point, you
787
787
should be able to connect to the Samba server as a domain member just as
788
788
if you were a local user.
789
</p></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2656647"></a>Configure Winbind and PAM</h4></div></div></div><p>
790
<a class="indexterm" name="id2656655"></a>
791
<a class="indexterm" name="id2656662"></a>
792
<a class="indexterm" name="id2656669"></a>
793
<a class="indexterm" name="id2656675"></a>
789
</p></div></div><div class="sect3" title="Configure Winbind and PAM"><div class="titlepage"><div><div><h4 class="title"><a name="id2662740"></a>Configure Winbind and PAM</h4></div></div></div><p>
790
<a class="indexterm" name="id2662748"></a>
791
<a class="indexterm" name="id2662755"></a>
792
<a class="indexterm" name="id2662762"></a>
793
<a class="indexterm" name="id2662768"></a>
794
794
If you have made it this far, you know that <code class="literal">winbindd</code> and Samba are working together. If you
795
795
want to use Winbind to provide authentication for other services, keep reading. The PAM configuration files
796
796
need to be altered in this step. (Did you remember to make backups of your original
797
797
<code class="filename">/etc/pam.d</code> files? If not, do it now.)
799
<a class="indexterm" name="id2656702"></a>
800
<a class="indexterm" name="id2656709"></a>
801
<a class="indexterm" name="id2656716"></a>
802
<a class="indexterm" name="id2656723"></a>
803
<a class="indexterm" name="id2656730"></a>
804
<a class="indexterm" name="id2656737"></a>
799
<a class="indexterm" name="id2662795"></a>
800
<a class="indexterm" name="id2662802"></a>
801
<a class="indexterm" name="id2662809"></a>
802
<a class="indexterm" name="id2662816"></a>
803
<a class="indexterm" name="id2662822"></a>
804
<a class="indexterm" name="id2662829"></a>
805
805
You will need a PAM module to use winbindd with these other services. This module will be compiled in the
806
806
<code class="filename">../source/nsswitch</code> directory by invoking the command:
807
807
</p><pre class="screen">
814
814
</p><pre class="screen">
815
815
<code class="prompt">root# </code><strong class="userinput"><code>cp ../samba/source/nsswitch/pam_winbind.so /lib/security</code></strong>
817
</p><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2656813"></a>Linux/FreeBSD-Specific PAM Configuration</h5></div></div></div><p>
818
<a class="indexterm" name="id2656822"></a>
817
</p><div class="sect4" title="Linux/FreeBSD-Specific PAM Configuration"><div class="titlepage"><div><div><h5 class="title"><a name="id2662906"></a>Linux/FreeBSD-Specific PAM Configuration</h5></div></div></div><p>
818
<a class="indexterm" name="id2662914"></a>
819
819
The <code class="filename">/etc/pam.d/samba</code> file does not need to be changed. I just left this file as it was:
820
820
</p><pre class="programlisting">
821
821
auth required /lib/security/pam_stack.so service=system-auth
822
822
account required /lib/security/pam_stack.so service=system-auth
824
<a class="indexterm" name="id2656846"></a>
825
<a class="indexterm" name="id2656853"></a>
826
<a class="indexterm" name="id2656860"></a>
827
<a class="indexterm" name="id2656867"></a>
828
<a class="indexterm" name="id2656874"></a>
829
<a class="indexterm" name="id2656880"></a>
830
<a class="indexterm" name="id2656887"></a>
831
<a class="indexterm" name="id2656894"></a>
832
<a class="indexterm" name="id2656901"></a>
824
<a class="indexterm" name="id2662939"></a>
825
<a class="indexterm" name="id2662946"></a>
826
<a class="indexterm" name="id2662953"></a>
827
<a class="indexterm" name="id2662959"></a>
828
<a class="indexterm" name="id2662966"></a>
829
<a class="indexterm" name="id2662973"></a>
830
<a class="indexterm" name="id2662980"></a>
831
<a class="indexterm" name="id2662987"></a>
832
<a class="indexterm" name="id2662994"></a>
833
833
The other services that I modified to allow the use of Winbind as an authentication service were the normal
834
834
login on the console (or a terminal session), telnet logins, and ftp service. In order to enable these
835
835
services, you may first need to change the entries in <code class="filename">/etc/xinetd.d</code> (or
843
843
</p><pre class="programlisting">
846
<a class="indexterm" name="id2656954"></a>
847
<a class="indexterm" name="id2656961"></a>
848
<a class="indexterm" name="id2656968"></a>
846
<a class="indexterm" name="id2663046"></a>
847
<a class="indexterm" name="id2663053"></a>
848
<a class="indexterm" name="id2663060"></a>
849
849
For ftp services to work properly, you will also need to either have individual directories for the domain
850
850
users already present on the server or change the home directory template to a general directory for all
851
851
domain users. These can be easily set using the <code class="filename">smb.conf</code> global entry <a class="link" href="smb.conf.5.html#TEMPLATEHOMEDIR" target="_top">template homedir</a>.
852
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
853
<a class="indexterm" name="id2657004"></a>
852
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
853
<a class="indexterm" name="id2663096"></a>
854
854
The directory in <a class="link" href="smb.conf.5.html#TEMPLATEHOMEDIR" target="_top">template homedir</a> is not created automatically! Use pam_mkhomedir or
855
855
pre-create the directories of users to make sure users can log in on UNIX with their own home directory.
857
<a class="indexterm" name="id2657028"></a>
858
<a class="indexterm" name="id2657035"></a>
859
<a class="indexterm" name="id2657041"></a>
857
<a class="indexterm" name="id2663121"></a>
858
<a class="indexterm" name="id2663127"></a>
859
<a class="indexterm" name="id2663134"></a>
860
860
The <code class="filename">/etc/pam.d/ftp</code> file can be changed to allow Winbind ftp access in a manner similar to
861
861
the samba file. My <code class="filename">/etc/pam.d/ftp</code> file was changed to look like this:
862
862
</p><pre class="programlisting">
883
883
session required /lib/security/pam_stack.so service=system-auth
884
884
session optional /lib/security/pam_console.so
886
<a class="indexterm" name="id2657108"></a>
887
<a class="indexterm" name="id2657115"></a>
888
<a class="indexterm" name="id2657122"></a>
886
<a class="indexterm" name="id2663201"></a>
887
<a class="indexterm" name="id2663208"></a>
888
<a class="indexterm" name="id2663215"></a>
889
889
In this case, I added the </p><pre class="programlisting">auth sufficient /lib/security/pam_winbind.so</pre><p> lines
890
890
as before, but also added the </p><pre class="programlisting">required pam_securetty.so</pre><p> above it to disallow
891
891
root logins over the network. I also added a </p><pre class="programlisting">sufficient /lib/security/pam_unix.so
892
892
use_first_pass</pre><p> line after the <code class="literal">winbind.so</code> line to get rid of annoying
893
893
double prompts for passwords.
894
</p></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2657160"></a>Solaris-Specific Configuration</h5></div></div></div><p>
895
<a class="indexterm" name="id2657168"></a>
896
<a class="indexterm" name="id2657175"></a>
894
</p></div><div class="sect4" title="Solaris-Specific Configuration"><div class="titlepage"><div><div><h5 class="title"><a name="id2663252"></a>Solaris-Specific Configuration</h5></div></div></div><p>
895
<a class="indexterm" name="id2663261"></a>
896
<a class="indexterm" name="id2663268"></a>
897
897
The <code class="filename">/etc/pam.conf</code> needs to be changed. I changed this file so my Domain
898
898
users can log on both locally as well as with telnet. The following are the changes
899
899
that I made. You can customize the <code class="filename">pam.conf</code> file as per your requirements, but
960
960
#other session optional /usr/lib/security/$ISA/pam_krb5.so.1
961
961
#other password optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
963
<a class="indexterm" name="id2657287"></a>
963
<a class="indexterm" name="id2663339"></a>
964
964
I also added a <em class="parameter"><code>try_first_pass</code></em> line after the <code class="filename">winbind.so</code>
965
965
line to get rid of annoying double prompts for passwords.
967
967
Now restart your Samba and try connecting through your application that you
968
968
configured in the pam.conf.
969
</p></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2657317"></a>Conclusion</h2></div></div></div><p>
970
<a class="indexterm" name="id2657325"></a>
971
<a class="indexterm" name="id2657332"></a>
972
<a class="indexterm" name="id2657338"></a>
973
<a class="indexterm" name="id2657345"></a>
974
<a class="indexterm" name="id2657352"></a>
969
</p></div></div></div></div><div class="sect1" title="Conclusion"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2663370"></a>Conclusion</h2></div></div></div><p>
970
<a class="indexterm" name="id2663377"></a>
971
<a class="indexterm" name="id2663384"></a>
972
<a class="indexterm" name="id2663391"></a>
973
<a class="indexterm" name="id2663397"></a>
974
<a class="indexterm" name="id2663404"></a>
975
975
The Winbind system, through the use of the NSS, PAMs, and appropriate Microsoft RPC calls, have allowed us to
976
976
provide seamless integration of Microsoft Windows NT domain users on a UNIX system. The result is a great
977
977
reduction in the administrative cost of running a mixed UNIX and NT network.
978
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2657366"></a>Common Errors</h2></div></div></div><p>
978
</p></div><div class="sect1" title="Common Errors"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2663418"></a>Common Errors</h2></div></div></div><p>
979
979
Winbind has a number of limitations in its current released version that we hope to overcome in future releases:
980
</p><div class="itemizedlist"><ul type="disc"><li><p>
980
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
981
981
Winbind is currently only available for the Linux, Solaris, AIX, and IRIX operating systems, although
982
982
ports to other operating systems are certainly possible. For such ports to be feasible, we require the C
983
983
library of the target operating system to support the NSS and PAM systems. This is becoming more common as NSS
984
984
and PAM gain support among UNIX vendors.
985
</p></li><li class="listitem"><p>
986
986
The mappings of Windows NT RIDs to UNIX IDs is not made algorithmically and depends on the order in
987
987
which unmapped users or groups are seen by Winbind. It may be difficult to recover the mappings of RID to UNIX
988
988
ID if the file containing this information is corrupted or destroyed.
989
</p></li><li class="listitem"><p>
990
990
Currently the Winbind PAM module does not take into account possible workstation and logon time
991
991
restrictions that may be set for Windows NT users; this is instead up to the PDC to enforce.
992
</p></li></ul></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2657408"></a>NSCD Problem Warning</h3></div></div></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>
992
</p></li></ul></div><div class="sect2" title="NSCD Problem Warning"><div class="titlepage"><div><div><h3 class="title"><a name="id2663460"></a>NSCD Problem Warning</h3></div></div></div><div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>
993
993
Do not under any circumstances run <code class="literal">nscd</code> on any system
994
994
on which <code class="literal">winbindd</code> is running.
996
996
If <code class="literal">nscd</code> is running on the UNIX/Linux system, then
997
997
even though NSSWITCH is correctly configured, it will not be possible to resolve
998
998
domain users and groups for file and directory controls.
999
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2657444"></a>Winbind Is Not Resolving Users and Groups</h3></div></div></div><p>“<span class="quote">
999
</p></div><div class="sect2" title="Winbind Is Not Resolving Users and Groups"><div class="titlepage"><div><div><h3 class="title"><a name="id2663497"></a>Winbind Is Not Resolving Users and Groups</h3></div></div></div><p><span class="quote">“<span class="quote">
1000
1000
My <code class="filename">smb.conf</code> file is correctly configured. I have specified <a class="link" href="smb.conf.5.html#IDMAPUID" target="_top">idmap uid = 12000</a>,
1001
1001
and <a class="link" href="smb.conf.5.html#IDMAPGID" target="_top">idmap gid = 3000-3500</a> and <code class="literal">winbind</code> is running.
1002
1002
When I do the following, it all works fine.
1003
</span>”</p><pre class="screen">
1003
</span>”</span></p><pre class="screen">
1004
1004
<code class="prompt">root# </code><strong class="userinput"><code>wbinfo -u</code></strong>