- Timestamp:
- Mar 1, 2010, 3:05:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/docs/htmldocs/Samba3-HOWTO/winbind.html
r368 r411 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.7 5.2"><link rel="home" href="index.html" title="The Official Samba 3.3.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="id265 9218"></a>3 <a class="indexterm" name="id265 9225"></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.74.0"><link rel="home" href="index.html" title="The Official Samba 3.3.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#id2653125">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="winbind.html#id2653468">Introduction</a></span></dt><dt><span class="sect1"><a href="winbind.html#id2653558">What Winbind Provides</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id2653711">Target Uses</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2653756">Handling of Foreign SIDs</a></span></dt></dl></dd><dt><span class="sect1"><a href="winbind.html#id2653882">How Winbind Works</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id2653932">Microsoft Remote Procedure Calls</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2654026">Microsoft Active Directory Services</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2654073">Name Service Switch</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2654305">Pluggable Authentication Modules</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2654460">User and Group ID Allocation</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2654536">Result Caching</a></span></dt></dl></dd><dt><span class="sect1"><a href="winbind.html#id2654593">Installation and Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id2654599">Introduction</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2654713">Requirements</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2654865">Testing Things Out</a></span></dt></dl></dd><dt><span class="sect1"><a href="winbind.html#id2657284">Conclusion</a></span></dt><dt><span class="sect1"><a href="winbind.html#id2657333">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id2657374">NSCD Problem Warning</a></span></dt><dt><span class="sect2"><a href="winbind.html#id2657411">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="id2653125"></a>Features and Benefits</h2></div></div></div><p> 2 <a class="indexterm" name="id2653133"></a> 3 <a class="indexterm" name="id2653139"></a> 4 4 Integration of UNIX and Microsoft Windows NT through a unified logon has 5 been considered a <span class="quote">“<span class="quote">holy grail</span>”</span>in heterogeneous computing environments for5 been considered a “<span class="quote">holy grail</span>” in heterogeneous computing environments for 6 6 a long time. 7 7 </p><p> 8 <a class="indexterm" name="id265 9242"></a>9 <a class="indexterm" name="id265 9248"></a>10 <a class="indexterm" name="id265 9255"></a>11 <a class="indexterm" name="id265 9262"></a>8 <a class="indexterm" name="id2653156"></a> 9 <a class="indexterm" name="id2653163"></a> 10 <a class="indexterm" name="id2653170"></a> 11 <a class="indexterm" name="id2653177"></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 … … 15 15 domain user and group ownerships with integrity. 16 16 </p><p> 17 <a class="indexterm" name="id265 9277"></a>18 <a class="indexterm" name="id265 9286"></a>19 <a class="indexterm" name="id265 9293"></a>20 <a class="indexterm" name="id265 9300"></a>17 <a class="indexterm" name="id2653192"></a> 18 <a class="indexterm" name="id2653201"></a> 19 <a class="indexterm" name="id2653208"></a> 20 <a class="indexterm" name="id2653214"></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 … … 27 27 </p><p> 28 28 Winbind provides three separate functions: 29 </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>30 <a class="indexterm" name="id265 9328"></a>31 <a class="indexterm" name="id265 9334"></a>29 </p><div class="itemizedlist"><ul type="disc"><li><p> 30 <a class="indexterm" name="id2653242"></a> 31 <a class="indexterm" name="id2653249"></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. 35 </p></li><li class="listitem"><p>36 <a class="indexterm" name="id265 9349"></a>37 <a class="indexterm" name="id265 9356"></a>35 </p></li><li><p> 36 <a class="indexterm" name="id2653264"></a> 37 <a class="indexterm" name="id2653271"></a> 38 38 Identity resolution (via NSS). This is the default when winbind is not used. 39 </p></li><li class="listitem"><p>40 <a class="indexterm" name="id265 9368"></a>41 <a class="indexterm" name="id265 9375"></a>42 <a class="indexterm" name="id265 9381"></a>43 <a class="indexterm" name="id265 9388"></a>44 <a class="indexterm" name="id265 9395"></a>45 <a class="indexterm" name="id265 9402"></a>46 <a class="indexterm" name="id265 9408"></a>39 </p></li><li><p> 40 <a class="indexterm" name="id2653283"></a> 41 <a class="indexterm" name="id2653289"></a> 42 <a class="indexterm" name="id2653296"></a> 43 <a class="indexterm" name="id2653302"></a> 44 <a class="indexterm" name="id2653309"></a> 45 <a class="indexterm" name="id2653316"></a> 46 <a class="indexterm" name="id2653323"></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 … … 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" title="Note"style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>55 <a class="indexterm" name="id265 9438"></a>56 <a class="indexterm" name="id265 9445"></a>57 <a class="indexterm" name="id265 9454"></a>58 <a class="indexterm" name="id265 9461"></a>59 <a class="indexterm" name="id265 9468"></a>60 <a class="indexterm" name="id265 9475"></a>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="id2653353"></a> 56 <a class="indexterm" name="id2653359"></a> 57 <a class="indexterm" name="id2653369"></a> 58 <a class="indexterm" name="id2653376"></a> 59 <a class="indexterm" name="id2653382"></a> 60 <a class="indexterm" name="id2653389"></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" 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 have65 </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="id2653468"></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 69 69 manner.</p><p> 70 <a class="indexterm" name="id265 9569"></a>71 <a class="indexterm" name="id265 9576"></a>70 <a class="indexterm" name="id2653484"></a> 71 <a class="indexterm" name="id2653491"></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 … … 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 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.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. 83 83 </p></li></ul></div><p> 84 <a class="indexterm" name="id265 9620"></a>85 <a class="indexterm" name="id265 9627"></a>84 <a class="indexterm" name="id2653535"></a> 85 <a class="indexterm" name="id2653542"></a> 86 86 Ideally, a prospective solution to the unified logon problem 87 87 would satisfy all the above components without duplication of … … 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" 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="id265 9651"></a>94 <a class="indexterm" name="id265 9658"></a>95 <a class="indexterm" name="id265 9665"></a>96 <a class="indexterm" name="id265 9672"></a>92 problem.</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2653558"></a>What Winbind Provides</h2></div></div></div><p> 93 <a class="indexterm" name="id2653566"></a> 94 <a class="indexterm" name="id2653573"></a> 95 <a class="indexterm" name="id2653580"></a> 96 <a class="indexterm" name="id2653586"></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">“<span class="quote">native</span>”</span>UNIX users and groups, allowing the NT domain100 they were “<span class="quote">native</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="id265 9691"></a>104 <a class="indexterm" name="id265 9698"></a>105 <a class="indexterm" name="id265 9705"></a>106 <a class="indexterm" name="id265 9712"></a>103 <a class="indexterm" name="id2653606"></a> 104 <a class="indexterm" name="id2653613"></a> 105 <a class="indexterm" name="id2653620"></a> 106 <a class="indexterm" name="id2653626"></a> 107 107 The end result is that whenever a 108 108 program on the UNIX machine asks the operating system to look up … … 113 113 redirection to the NT domain controller is completely 114 114 transparent.</p><p> 115 <a class="indexterm" name="id265 9729"></a>116 <a class="indexterm" name="id265 9736"></a>115 <a class="indexterm" name="id2653643"></a> 116 <a class="indexterm" name="id2653650"></a> 117 117 Users on the UNIX machine can then use NT user and group 118 names as they would <span class="quote">“<span class="quote">native</span>”</span>UNIX names. They can chown files118 names as they would “<span class="quote">native</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="id265 9753"></a>121 <a class="indexterm" name="id2653668"></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 … … 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="id265 9776"></a>128 <a class="indexterm" name="id265 9783"></a>127 <a class="indexterm" name="id2653690"></a> 128 <a class="indexterm" name="id2653697"></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" 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="id265 9804"></a>133 location (on the domain controller).</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2653711"></a>Target Uses</h3></div></div></div><p> 134 <a class="indexterm" name="id2653719"></a> 135 135 Winbind is targeted at organizations that have an 136 136 existing NT-based domain infrastructure into which they wish … … 140 140 simplifies the administrative overhead of deploying UNIX 141 141 workstations into an NT-based organization.</p><p> 142 <a class="indexterm" name="id265 9821"></a>143 <a class="indexterm" name="id265 9828"></a>142 <a class="indexterm" name="id2653736"></a> 143 <a class="indexterm" name="id2653742"></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" 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="id265 9850"></a>148 the appliance into the domain.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2653756"></a>Handling of Foreign SIDs</h3></div></div></div><p> 149 <a class="indexterm" name="id2653764"></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 … … 153 153 often expressed regarding the use of winbind. 154 154 </p><p> 155 <a class="indexterm" name="id265 9868"></a>155 <a class="indexterm" name="id2653782"></a> 156 156 Fact: Winbind is needed to handle users who use workstations that are NOT part 157 157 of the local domain. 158 158 </p><p> 159 <a class="indexterm" name="id265 9880"></a>160 Response: <span class="quote">“<span class="quote">Why? I've used Samba with workstations that are not part of my domains159 <a class="indexterm" name="id2653794"></a> 160 Response: “<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>” </span>162 in a domain controlled by another Samba/Windows PDC.</span>” 163 163 </p><p> 164 <a class="indexterm" name="id265 9897"></a>165 <a class="indexterm" name="id265 9904"></a>166 <a class="indexterm" name="id265 9910"></a>164 <a class="indexterm" name="id2653812"></a> 165 <a class="indexterm" name="id2653818"></a> 166 <a class="indexterm" name="id2653825"></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 … … 170 170 of the foreign user separate from users that are members of the Samba domain. 171 171 </p><p> 172 <a class="indexterm" name="id265 9926"></a>173 <a class="indexterm" name="id265 9933"></a>174 <a class="indexterm" name="id265 9940"></a>175 <a class="indexterm" name="id265 9947"></a>172 <a class="indexterm" name="id2653841"></a> 173 <a class="indexterm" name="id2653847"></a> 174 <a class="indexterm" name="id2653854"></a> 175 <a class="indexterm" name="id2653861"></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. … … 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" 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="id265 9975"></a>186 <a class="indexterm" name="id265 9982"></a>187 <a class="indexterm" name="id265 9989"></a>188 <a class="indexterm" name="id265 9996"></a>184 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2653882"></a>How Winbind Works</h2></div></div></div><p> 185 <a class="indexterm" name="id2653890"></a> 186 <a class="indexterm" name="id2653897"></a> 187 <a class="indexterm" name="id2653904"></a> 188 <a class="indexterm" name="id2653910"></a> 189 189 The Winbind system is designed around a client/server 190 190 architecture. A long-running <code class="literal">winbindd</code> daemon … … 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" 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="id26 60026"></a>196 <a class="indexterm" name="id26 60036"></a>197 <a class="indexterm" name="id26 60042"></a>198 <a class="indexterm" name="id26 60049"></a>199 <a class="indexterm" name="id26 60056"></a>194 in detail below.</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2653932"></a>Microsoft Remote Procedure Calls</h3></div></div></div><p> 195 <a class="indexterm" name="id2653941"></a> 196 <a class="indexterm" name="id2653950"></a> 197 <a class="indexterm" name="id2653957"></a> 198 <a class="indexterm" name="id2653964"></a> 199 <a class="indexterm" name="id2653971"></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 … … 204 204 Samba, it has also yielded a body of code that can be used for other purposes. 205 205 </p><p> 206 <a class="indexterm" name="id26 60075"></a>207 <a class="indexterm" name="id26 60082"></a>208 <a class="indexterm" name="id26 60089"></a>206 <a class="indexterm" name="id2653990"></a> 207 <a class="indexterm" name="id2653996"></a> 208 <a class="indexterm" name="id2654004"></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" 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="id26 60119"></a>215 <a class="indexterm" name="id26 60126"></a>216 <a class="indexterm" name="id26 60133"></a>217 <a class="indexterm" name="id26 60140"></a>218 Since late 2001, Samba has gained the ability to interact with Microsoft Windows 2000 using its <span class="quote">“<span class="quote">native219 mode</span>” </span>protocols rather than the NT4 RPC services. Using LDAP and Kerberos, a domain member running213 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2654026"></a>Microsoft Active Directory Services</h3></div></div></div><p> 214 <a class="indexterm" name="id2654034"></a> 215 <a class="indexterm" name="id2654040"></a> 216 <a class="indexterm" name="id2654047"></a> 217 <a class="indexterm" name="id2654054"></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 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" 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="id26 60166"></a>224 <a class="indexterm" name="id26 60173"></a>225 <a class="indexterm" name="id26 60180"></a>226 <a class="indexterm" name="id26 60187"></a>222 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2654073"></a>Name Service Switch</h3></div></div></div><p> 223 <a class="indexterm" name="id2654081"></a> 224 <a class="indexterm" name="id2654088"></a> 225 <a class="indexterm" name="id2654095"></a> 226 <a class="indexterm" name="id2654101"></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 … … 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="id26 60205"></a>236 <a class="indexterm" name="id26 60212"></a>237 <a class="indexterm" name="id26 60219"></a>238 <a class="indexterm" name="id26 60226"></a>239 <a class="indexterm" name="id26 60232"></a>235 <a class="indexterm" name="id2654120"></a> 236 <a class="indexterm" name="id2654126"></a> 237 <a class="indexterm" name="id2654133"></a> 238 <a class="indexterm" name="id2654140"></a> 239 <a class="indexterm" name="id2654147"></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 … … 244 244 groups in an NT domain plus any trusted domain as though they were local users and groups. 245 245 </p><p> 246 <a class="indexterm" name="id26 60251"></a>247 <a class="indexterm" name="id26 60258"></a>248 <a class="indexterm" name="id26 60265"></a>246 <a class="indexterm" name="id2654166"></a> 247 <a class="indexterm" name="id2654172"></a> 248 <a class="indexterm" name="id2654179"></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">“<span class="quote">passwd</span>”</span>service type is used when251 matches the service type being requested; for example, the “<span class="quote">passwd</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: … … 255 255 passwd: files example 256 256 </pre><p> 257 <a class="indexterm" name="id26 60300"></a>258 <a class="indexterm" name="id26 60307"></a>259 <a class="indexterm" name="id26 60314"></a>257 <a class="indexterm" name="id2654215"></a> 258 <a class="indexterm" name="id2654222"></a> 259 <a class="indexterm" name="id2654229"></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 … … 263 263 is resolved, the C library returns the result to the application. 264 264 </p><p> 265 <a class="indexterm" name="id26 60342"></a>266 <a class="indexterm" name="id26 60349"></a>267 <a class="indexterm" name="id26 60356"></a>265 <a class="indexterm" name="id2654257"></a> 266 <a class="indexterm" name="id2654263"></a> 267 <a class="indexterm" name="id2654270"></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">“<span class="quote">winbind</span>”</span>into <code class="filename">/etc/nsswitch.conf</code> at the appropriate place. The C library270 “<span class="quote">winbind</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" 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="id26 60399"></a>274 <a class="indexterm" name="id26 60405"></a>275 <a class="indexterm" name="id26 60412"></a>276 <a class="indexterm" name="id26 60419"></a>272 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2654305"></a>Pluggable Authentication Modules</h3></div></div></div><p> 273 <a class="indexterm" name="id2654313"></a> 274 <a class="indexterm" name="id2654320"></a> 275 <a class="indexterm" name="id2654327"></a> 276 <a class="indexterm" name="id2654334"></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 … … 281 281 local password file but only allow users resolved from an NIS database to log in over the network. 282 282 </p><p> 283 <a class="indexterm" name="id26 60438"></a>284 <a class="indexterm" name="id26 60445"></a>285 <a class="indexterm" name="id26 60452"></a>286 <a class="indexterm" name="id26 60459"></a>287 <a class="indexterm" name="id26 60466"></a>283 <a class="indexterm" name="id2654353"></a> 284 <a class="indexterm" name="id2654359"></a> 285 <a class="indexterm" name="id2654366"></a> 286 <a class="indexterm" name="id2654373"></a> 287 <a class="indexterm" name="id2654380"></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 … … 291 291 on the PDC. 292 292 </p><p> 293 <a class="indexterm" name="id26 60481"></a>294 <a class="indexterm" name="id26 60488"></a>295 <a class="indexterm" name="id26 60495"></a>296 <a class="indexterm" name="id26 60502"></a>293 <a class="indexterm" name="id2654396"></a> 294 <a class="indexterm" name="id2654402"></a> 295 <a class="indexterm" name="id2654409"></a> 296 <a class="indexterm" name="id2654416"></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, … … 302 302 and the PAM control files for relevant services are updated to allow authentication via Winbind. See the PAM 303 303 documentation in <a class="link" href="pam.html" title="Chapter 28. PAM-Based Distributed Authentication">PAM-Based Distributed Authentication</a>, for more information. 304 </p></div><div class="sect2" title="User and Group ID Allocation"><div class="titlepage"><div><div><h3 class="title"><a name="id2660546"></a>User and Group ID Allocation</h3></div></div></div><p>305 <a class="indexterm" name="id26 60554"></a>306 <a class="indexterm" name="id26 60560"></a>307 <a class="indexterm" name="id26 60567"></a>304 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2654460"></a>User and Group ID Allocation</h3></div></div></div><p> 305 <a class="indexterm" name="id2654468"></a> 306 <a class="indexterm" name="id2654475"></a> 307 <a class="indexterm" name="id2654482"></a> 308 308 When a user or group is created under Windows NT/200x, it is allocated a numerical relative identifier 309 309 (RID). This is slightly different from UNIX, which has a range of numbers that are used to identify users and … … 314 314 will have mapped all Windows NT users and groups to UNIX user IDs and group IDs. 315 315 </p><p> 316 <a class="indexterm" name="id26 60590"></a>317 <a class="indexterm" name="id26 60596"></a>318 <a class="indexterm" name="id26 60603"></a>319 <a class="indexterm" name="id26 60610"></a>316 <a class="indexterm" name="id2654504"></a> 317 <a class="indexterm" name="id2654511"></a> 318 <a class="indexterm" name="id2654518"></a> 319 <a class="indexterm" name="id2654524"></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" 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="id26 60629"></a>324 <a class="indexterm" name="id26 60636"></a>325 <a class="indexterm" name="id26 60643"></a>326 <a class="indexterm" name="id26 60650"></a>327 <a class="indexterm" name="id26 60656"></a>322 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2654536"></a>Result Caching</h3></div></div></div><p> 323 <a class="indexterm" name="id2654544"></a> 324 <a class="indexterm" name="id2654550"></a> 325 <a class="indexterm" name="id2654557"></a> 326 <a class="indexterm" name="id2654564"></a> 327 <a class="indexterm" name="id2654571"></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 … … 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" 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="id26 60692"></a>337 <a class="indexterm" name="id26 60699"></a>338 <a class="indexterm" name="id26 60706"></a>335 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2654593"></a>Installation and Configuration</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2654599"></a>Introduction</h3></div></div></div><p> 336 <a class="indexterm" name="id2654607"></a> 337 <a class="indexterm" name="id2654614"></a> 338 <a class="indexterm" name="id2654620"></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 class="itemizedlist" type="disc"><li class="listitem"><p>342 </p><div class="itemizedlist"><ul type="disc"><li><p> 343 343 <span class="emphasis"><em>Why should I do this?</em></span> 344 344 </p><p> 345 <a class="indexterm" name="id26 60732"></a>346 <a class="indexterm" name="id26 60739"></a>347 <a class="indexterm" name="id26 60746"></a>348 <a class="indexterm" name="id26 60753"></a>345 <a class="indexterm" name="id2654646"></a> 346 <a class="indexterm" name="id2654653"></a> 347 <a class="indexterm" name="id2654660"></a> 348 <a class="indexterm" name="id2654667"></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>352 </p></li><li><p> 353 353 <span class="emphasis"><em>Who should be reading this document?</em></span> 354 354 </p><p> 355 <a class="indexterm" name="id26 60777"></a>356 <a class="indexterm" name="id26 60784"></a>355 <a class="indexterm" name="id2654692"></a> 356 <a class="indexterm" name="id2654698"></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 359 359 is for you. 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="id26 60807"></a>362 <a class="indexterm" name="id26 60813"></a>363 <a class="indexterm" name="id26 60820"></a>360 </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2654713"></a>Requirements</h3></div></div></div><p> 361 <a class="indexterm" name="id2654721"></a> 362 <a class="indexterm" name="id2654728"></a> 363 <a class="indexterm" name="id2654735"></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> 367 367 </p><p> 368 <a class="indexterm" name="id26 60850"></a>369 <a class="indexterm" name="id26 60857"></a>370 <a class="indexterm" name="id26 60864"></a>368 <a class="indexterm" name="id2654764"></a> 369 <a class="indexterm" name="id2654771"></a> 370 <a class="indexterm" name="id2654778"></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 … … 374 374 way things are going. 375 375 </p><p> 376 <a class="indexterm" name="id26 60884"></a>377 <a class="indexterm" name="id26 60891"></a>376 <a class="indexterm" name="id2654799"></a> 377 <a class="indexterm" name="id2654806"></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. 380 380 </p><p> 381 <a class="indexterm" name="id26 60911"></a>382 <a class="indexterm" name="id26 60918"></a>383 <a class="indexterm" name="id26 60924"></a>384 <a class="indexterm" name="id26 60931"></a>381 <a class="indexterm" name="id2654825"></a> 382 <a class="indexterm" name="id2654832"></a> 383 <a class="indexterm" name="id2654839"></a> 384 <a class="indexterm" name="id2654846"></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" 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="id26 60959"></a>391 <a class="indexterm" name="id26 60966"></a>392 <a class="indexterm" name="id26 60972"></a>393 <a class="indexterm" name="id26 60979"></a>394 <a class="indexterm" name="id26 60986"></a>389 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2654865"></a>Testing Things Out</h3></div></div></div><p> 390 <a class="indexterm" name="id2654873"></a> 391 <a class="indexterm" name="id2654880"></a> 392 <a class="indexterm" name="id2654887"></a> 393 <a class="indexterm" name="id2654894"></a> 394 <a class="indexterm" name="id2654900"></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, … … 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" 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="id26 61052"></a>404 <a class="indexterm" name="id26 61059"></a>405 <a class="indexterm" name="id26 61066"></a>406 <a class="indexterm" name="id26 61072"></a>402 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2654952"></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="id2654967"></a> 404 <a class="indexterm" name="id2654973"></a> 405 <a class="indexterm" name="id2654980"></a> 406 <a class="indexterm" name="id2654987"></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 … … 414 414 The libraries needed to run the <span class="application">winbindd</span> daemon through nsswitch need to be copied to their proper locations: 415 415 </p><p> 416 <a class="indexterm" name="id26 61112"></a>416 <a class="indexterm" name="id2655027"></a> 417 417 </p><pre class="screen"> 418 418 <code class="prompt">root# </code><strong class="userinput"><code>cp ../samba/source/nsswitch/libnss_winbind.so /lib</code></strong> … … 423 423 <code class="prompt">root# </code> <strong class="userinput"><code>ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2</code></strong> 424 424 </p><p>And, in the case of Sun Solaris: 425 <a class="indexterm" name="id26 61160"></a>425 <a class="indexterm" name="id2655074"></a> 426 426 </p><pre class="screen"> 427 427 <code class="prompt">root# </code><strong class="userinput"><code>ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1</code></strong> … … 430 430 </pre><p> 431 431 </p><p> 432 <a class="indexterm" name="id26 61209"></a>432 <a class="indexterm" name="id2655124"></a> 433 433 As root, edit <code class="filename">/etc/nsswitch.conf</code> to allow user and group entries to be visible from the 434 434 <span class="application">winbindd</span> daemon. My <code class="filename">/etc/nsswitch.conf</code> file looked like this after editing: … … 438 438 group: files winbind 439 439 </pre><p> 440 <a class="indexterm" name="id26 61245"></a>441 <a class="indexterm" name="id26 61252"></a>442 <a class="indexterm" name="id26 61259"></a>443 <a class="indexterm" name="id26 61266"></a>444 <a class="indexterm" name="id26 61272"></a>440 <a class="indexterm" name="id2655160"></a> 441 <a class="indexterm" name="id2655166"></a> 442 <a class="indexterm" name="id2655173"></a> 443 <a class="indexterm" name="id2655180"></a> 444 <a class="indexterm" name="id2655187"></a> 445 445 The libraries needed by the <code class="literal">winbindd</code> daemon will be automatically 446 446 entered into the <code class="literal">ldconfig</code> cache the next time … … 454 454 this library is indeed recognized by the dynamic link loader. 455 455 </p><p> 456 <a class="indexterm" name="id26 61336"></a>457 <a class="indexterm" name="id26 61343"></a>458 <a class="indexterm" name="id26 61350"></a>459 <a class="indexterm" name="id26 61357"></a>460 <a class="indexterm" name="id26 61364"></a>456 <a class="indexterm" name="id2655251"></a> 457 <a class="indexterm" name="id2655258"></a> 458 <a class="indexterm" name="id2655264"></a> 459 <a class="indexterm" name="id2655271"></a> 460 <a class="indexterm" name="id2655278"></a> 461 461 The Sun Solaris dynamic link loader management tool is called <code class="literal">crle</code>. The 462 462 use of this tool is necessary to instruct the dynamic link loader to search directories that … … 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" 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="id26 61448"></a>485 <a class="indexterm" name="id26 61454"></a>486 <a class="indexterm" name="id26 61461"></a>487 <a class="indexterm" name="id26 61468"></a>488 <a class="indexterm" name="id26 61475"></a>489 <a class="indexterm" name="id26 61482"></a>483 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2655350"></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="id2655362"></a> 485 <a class="indexterm" name="id2655369"></a> 486 <a class="indexterm" name="id2655376"></a> 487 <a class="indexterm" name="id2655383"></a> 488 <a class="indexterm" name="id2655390"></a> 489 <a class="indexterm" name="id2655397"></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>, … … 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">“<span class="quote">Kernel Extensions and Device Support Programming Concepts for AIX</span>”</span>document that502 be found in the “<span class="quote">Kernel Extensions and Device Support Programming Concepts for AIX</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" 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="id26 61557"></a>509 <a class="indexterm" name="id26 61564"></a>510 <a class="indexterm" name="id26 61571"></a>507 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2655464"></a>Configure smb.conf</h4></div></div></div><p> 508 <a class="indexterm" name="id2655472"></a> 509 <a class="indexterm" name="id2655478"></a> 510 <a class="indexterm" name="id2655485"></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 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="id26 61755"></a>515 <a class="indexterm" name="id26 61762"></a>516 <a class="indexterm" name="id26 61768"></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 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="id2655559"></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="id2655575"></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="id2655591"></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="id2655606"></a><em class="parameter"><code>winbind enum users = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2655618"></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="id2655635"></a><em class="parameter"><code>template homedir = /home/winnt/%D/%U</code></em></td></tr><tr><td><a class="indexterm" name="id2655647"></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="id2655661"></a>Join the Samba Server to the PDC Domain</h4></div></div></div><p> 514 <a class="indexterm" name="id2655669"></a> 515 <a class="indexterm" name="id2655676"></a> 516 <a class="indexterm" name="id2655683"></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. 519 519 </p><p> 520 <a class="indexterm" name="id26 61780"></a>521 <a class="indexterm" name="id26 61787"></a>522 <a class="indexterm" name="id26 61794"></a>523 <a class="indexterm" name="id26 61805"></a>524 <a class="indexterm" name="id26 61812"></a>525 <a class="indexterm" name="id26 61818"></a>526 <a class="indexterm" name="id26 61825"></a>527 <a class="indexterm" name="id26 61832"></a>528 <a class="indexterm" name="id26 61839"></a>520 <a class="indexterm" name="id2655695"></a> 521 <a class="indexterm" name="id2655702"></a> 522 <a class="indexterm" name="id2655708"></a> 523 <a class="indexterm" name="id2655719"></a> 524 <a class="indexterm" name="id2655726"></a> 525 <a class="indexterm" name="id2655733"></a> 526 <a class="indexterm" name="id2655740"></a> 527 <a class="indexterm" name="id2655746"></a> 528 <a class="indexterm" name="id2655753"></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 … … 533 533 start Samba on a PDC so that it can join its own domain. 534 534 </p><p> 535 <a class="indexterm" name="id26 61867"></a>536 <a class="indexterm" name="id26 61873"></a>537 <a class="indexterm" name="id26 61880"></a>535 <a class="indexterm" name="id2655781"></a> 536 <a class="indexterm" name="id2655788"></a> 537 <a class="indexterm" name="id2655795"></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" title="Note"style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>542 <a class="indexterm" name="id26 61902"></a>543 <a class="indexterm" name="id26 61908"></a>544 <a class="indexterm" name="id26 61915"></a>545 <a class="indexterm" name="id26 61922"></a>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="id2655816"></a> 543 <a class="indexterm" name="id2655823"></a> 544 <a class="indexterm" name="id2655830"></a> 545 <a class="indexterm" name="id2655836"></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). 549 549 </p></div><p> 550 <a class="indexterm" name="id26 61936"></a>550 <a class="indexterm" name="id2655851"></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> 554 554 </pre><p> 555 The proper response to the command should be <span class="quote">“<span class="quote">Joined the domain556 <em class="replaceable"><code>DOMAIN</code></em></span>” </span>where <em class="replaceable"><code>DOMAIN</code></em>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> 557 557 is your domain name. 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="id26 61998"></a>560 <a class="indexterm" name="id26 62005"></a>561 <a class="indexterm" name="id26 62012"></a>558 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2655899"></a>Starting and Testing the <code class="literal">winbindd</code> Daemon</h4></div></div></div><p> 559 <a class="indexterm" name="id2655913"></a> 560 <a class="indexterm" name="id2655920"></a> 561 <a class="indexterm" name="id2655926"></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 … … 567 567 </pre><p> 568 568 Use the appropriate path to the location of the <code class="literal">winbindd</code> executable file. 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="id26 62051"></a>571 <a class="indexterm" name="id26 62058"></a>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="id2655966"></a> 571 <a class="indexterm" name="id2655972"></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. 575 575 </p></div><p> 576 <a class="indexterm" name="id26 62084"></a>577 <a class="indexterm" name="id26 62090"></a>576 <a class="indexterm" name="id2655998"></a> 577 <a class="indexterm" name="id2656005"></a> 578 578 I'm always paranoid and like to make sure the daemon is really running. 579 579 </p><pre class="screen"> … … 581 581 </pre><p> 582 582 </p><p> 583 <a class="indexterm" name="id26 62118"></a>583 <a class="indexterm" name="id2656033"></a> 584 584 This command should produce output like the following if the daemon is running. 585 585 </p><pre class="screen"> … … 587 587 </pre><p> 588 588 </p><p> 589 <a class="indexterm" name="id26 62136"></a>590 <a class="indexterm" name="id26 62142"></a>589 <a class="indexterm" name="id2656050"></a> 590 <a class="indexterm" name="id2656057"></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"> … … 603 603 CEO\TsInternetUser 604 604 </pre><p> 605 Obviously, I have named my domain <span class="quote">“<span class="quote">CEO</span>”</span>and my <a class="link" href="smb.conf.5.html#WINBINDSEPARATOR" target="_top">winbind separator</a> is606 <span class="quote">“<span class="quote">\</span>”</span>.607 </p><p> 608 <a class="indexterm" name="id26 62201"></a>609 <a class="indexterm" name="id26 62207"></a>605 Obviously, I have named my domain “<span class="quote">CEO</span>” and my <a class="link" href="smb.conf.5.html#WINBINDSEPARATOR" target="_top">winbind separator</a> is 606 “<span class="quote">\</span>”. 607 </p><p> 608 <a class="indexterm" name="id2656115"></a> 609 <a class="indexterm" name="id2656122"></a> 610 610 You can do the same sort of thing to get group information from the PDC: 611 611 </p><pre class="screen"> … … 621 621 CEO\Group Policy Creator Owners 622 622 </pre><p> 623 <a class="indexterm" name="id26 62237"></a>624 <a class="indexterm" name="id26 62244"></a>625 <a class="indexterm" name="id26 62250"></a>626 <a class="indexterm" name="id26 62257"></a>627 <a class="indexterm" name="id26 62264"></a>628 <a class="indexterm" name="id26 62270"></a>629 <a class="indexterm" name="id26 62277"></a>623 <a class="indexterm" name="id2656152"></a> 624 <a class="indexterm" name="id2656158"></a> 625 <a class="indexterm" name="id2656165"></a> 626 <a class="indexterm" name="id2656172"></a> 627 <a class="indexterm" name="id2656178"></a> 628 <a class="indexterm" name="id2656185"></a> 629 <a class="indexterm" name="id2656191"></a> 630 630 The function <code class="literal">getent</code> can now be used to get unified lists of both local and PDC users and 631 631 groups. Try the following command: … … 641 641 <code class="prompt">root# </code><strong class="userinput"><code>getent group</code></strong> 642 642 </pre><p> 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="id26 62352"></a>645 <a class="indexterm" name="id26 62359"></a>646 <a class="indexterm" name="id26 62366"></a>647 <a class="indexterm" name="id26 62373"></a>648 <a class="indexterm" name="id26 62380"></a>649 <a class="indexterm" name="id26 62387"></a>650 <a class="indexterm" name="id26 62394"></a>651 <a class="indexterm" name="id26 62399"></a>652 <a class="indexterm" name="id26 62405"></a>643 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2656253"></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="id2656259"></a>Linux</h5></div></div></div><p> 644 <a class="indexterm" name="id2656267"></a> 645 <a class="indexterm" name="id2656274"></a> 646 <a class="indexterm" name="id2656281"></a> 647 <a class="indexterm" name="id2656287"></a> 648 <a class="indexterm" name="id2656294"></a> 649 <a class="indexterm" name="id2656301"></a> 650 <a class="indexterm" name="id2656308"></a> 651 <a class="indexterm" name="id2656314"></a> 652 <a class="indexterm" name="id2656319"></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 … … 711 711 return $RETVAL 712 712 } 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>713 </pre></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2656465"></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> 715 715 for details. 716 716 </p><p> 717 <a class="indexterm" name="id26 62572"></a>718 <a class="indexterm" name="id26 62578"></a>719 <a class="indexterm" name="id26 62586"></a>720 <a class="indexterm" name="id26 62593"></a>721 <a class="indexterm" name="id26 62599"></a>722 <a class="indexterm" name="id26 62606"></a>717 <a class="indexterm" name="id2656486"></a> 718 <a class="indexterm" name="id2656493"></a> 719 <a class="indexterm" name="id2656500"></a> 720 <a class="indexterm" name="id2656507"></a> 721 <a class="indexterm" name="id2656514"></a> 722 <a class="indexterm" name="id2656521"></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 … … 781 781 /usr/local/samba/sbin/winbindd -D 782 782 </pre><p> 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="id26 62703"></a>785 <a class="indexterm" name="id26 62710"></a>783 </p></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2656610"></a>Restarting</h5></div></div></div><p> 784 <a class="indexterm" name="id2656617"></a> 785 <a class="indexterm" name="id2656624"></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" 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="id26 62748"></a>791 <a class="indexterm" name="id26 62755"></a>792 <a class="indexterm" name="id26 62762"></a>793 <a class="indexterm" name="id26 62768"></a>789 </p></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2656654"></a>Configure Winbind and PAM</h4></div></div></div><p> 790 <a class="indexterm" name="id2656662"></a> 791 <a class="indexterm" name="id2656669"></a> 792 <a class="indexterm" name="id2656676"></a> 793 <a class="indexterm" name="id2656683"></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 … … 797 797 <code class="filename">/etc/pam.d</code> files? If not, do it now.) 798 798 </p><p> 799 <a class="indexterm" name="id26 62795"></a>800 <a class="indexterm" name="id26 62802"></a>801 <a class="indexterm" name="id26 62809"></a>802 <a class="indexterm" name="id26 62816"></a>803 <a class="indexterm" name="id26 62822"></a>804 <a class="indexterm" name="id26 62829"></a>799 <a class="indexterm" name="id2656710"></a> 800 <a class="indexterm" name="id2656716"></a> 801 <a class="indexterm" name="id2656723"></a> 802 <a class="indexterm" name="id2656730"></a> 803 <a class="indexterm" name="id2656737"></a> 804 <a class="indexterm" name="id2656744"></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: … … 815 815 <code class="prompt">root# </code><strong class="userinput"><code>cp ../samba/source/nsswitch/pam_winbind.so /lib/security</code></strong> 816 816 </pre><p> 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="id26 62914"></a>817 </p><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2656821"></a>Linux/FreeBSD-Specific PAM Configuration</h5></div></div></div><p> 818 <a class="indexterm" name="id2656829"></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"> … … 822 822 account required /lib/security/pam_stack.so service=system-auth 823 823 </pre><p> 824 <a class="indexterm" name="id26 62939"></a>825 <a class="indexterm" name="id26 62946"></a>826 <a class="indexterm" name="id26 62953"></a>827 <a class="indexterm" name="id26 62959"></a>828 <a class="indexterm" name="id26 62966"></a>829 <a class="indexterm" name="id26 62973"></a>830 <a class="indexterm" name="id26 62980"></a>831 <a class="indexterm" name="id26 62987"></a>832 <a class="indexterm" name="id26 62994"></a>824 <a class="indexterm" name="id2656853"></a> 825 <a class="indexterm" name="id2656860"></a> 826 <a class="indexterm" name="id2656867"></a> 827 <a class="indexterm" name="id2656874"></a> 828 <a class="indexterm" name="id2656881"></a> 829 <a class="indexterm" name="id2656888"></a> 830 <a class="indexterm" name="id2656894"></a> 831 <a class="indexterm" name="id2656901"></a> 832 <a class="indexterm" name="id2656908"></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 … … 844 844 enable = yes 845 845 </pre><p> 846 <a class="indexterm" name="id26 63046"></a>847 <a class="indexterm" name="id26 63053"></a>848 <a class="indexterm" name="id26 63060"></a>846 <a class="indexterm" name="id2656961"></a> 847 <a class="indexterm" name="id2656968"></a> 848 <a class="indexterm" name="id2656975"></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" title="Note"style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>853 <a class="indexterm" name="id26 63096"></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="id2657011"></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. 856 856 </p></div><p> 857 <a class="indexterm" name="id26 63121"></a>858 <a class="indexterm" name="id26 63127"></a>859 <a class="indexterm" name="id26 63134"></a>857 <a class="indexterm" name="id2657035"></a> 858 <a class="indexterm" name="id2657042"></a> 859 <a class="indexterm" name="id2657048"></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: … … 870 870 session required /lib/security/pam_stack.so service=system-auth 871 871 </pre><p> 872 <a class="indexterm" name="id26 63170"></a>872 <a class="indexterm" name="id2657085"></a> 873 873 The <code class="filename">/etc/pam.d/login</code> file can be changed in nearly the same way. It now looks like this: 874 874 </p><pre class="programlisting"> … … 884 884 session optional /lib/security/pam_console.so 885 885 </pre><p> 886 <a class="indexterm" name="id26 63201"></a>887 <a class="indexterm" name="id26 63208"></a>888 <a class="indexterm" name="id26 63215"></a>886 <a class="indexterm" name="id2657115"></a> 887 <a class="indexterm" name="id2657122"></a> 888 <a class="indexterm" name="id2657129"></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 … … 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" 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="id26 63261"></a>896 <a class="indexterm" name="id26 63268"></a>894 </p></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2657167"></a>Solaris-Specific Configuration</h5></div></div></div><p> 895 <a class="indexterm" name="id2657175"></a> 896 <a class="indexterm" name="id2657182"></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 … … 961 961 #other password optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass 962 962 </pre><p> 963 <a class="indexterm" name="id26 63339"></a>963 <a class="indexterm" name="id2657253"></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" 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="id26 63377"></a>971 <a class="indexterm" name="id26 63384"></a>972 <a class="indexterm" name="id26 63391"></a>973 <a class="indexterm" name="id26 63397"></a>974 <a class="indexterm" name="id26 63404"></a>969 </p></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2657284"></a>Conclusion</h2></div></div></div><p> 970 <a class="indexterm" name="id2657292"></a> 971 <a class="indexterm" name="id2657299"></a> 972 <a class="indexterm" name="id2657305"></a> 973 <a class="indexterm" name="id2657312"></a> 974 <a class="indexterm" name="id2657318"></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" 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>978 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2657333"></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 class="itemizedlist" type="disc"><li class="listitem"><p>980 </p><div class="itemizedlist"><ul type="disc"><li><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>985 </p></li><li><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>989 </p></li><li><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" 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>992 </p></li></ul></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2657374"></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> 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. … … 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" 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">999 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2657411"></a>Winbind Is Not Resolving Users and Groups</h3></div></div></div><p>“<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>”</ span></p><pre class="screen">1003 </span>”</p><pre class="screen"> 1004 1004 <code class="prompt">root# </code><strong class="userinput"><code>wbinfo -u</code></strong> 1005 1005 MIDEARTH\maryo … … 1021 1021 ... 1022 1022 maryo:x:15000:15003:Mary Orville:/home/MIDEARTH/maryo:/bin/false 1023 </pre><p> <span class="quote">“<span class="quote">1023 </pre><p>“<span class="quote"> 1024 1024 But the following command just fails: 1025 </span>” </span>1025 </span>” 1026 1026 </p><pre class="screen"> 1027 1027 <code class="prompt">root# </code><strong class="userinput"><code>chown maryo a_file</code></strong> 1028 1028 chown: `maryo': invalid user 1029 1029 </pre><p> 1030 <span class="quote">“<span class="quote">1030 “<span class="quote"> 1031 1031 This is driving me nuts! What can be wrong? 1032 </span>”</ span></p><p>1032 </span>”</p><p> 1033 1033 Same problem as the one above. 1034 1034 Your system is likely running <code class="literal">nscd</code>, the name service
Note:
See TracChangeset
for help on using the changeset viewer.