- Timestamp:
- May 23, 2008, 6:56:41 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/docs/htmldocs/Samba3-HOWTO/winbind.html
r44 r134 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.71.0"><link rel="start" href="index.html" title="The Official Samba-3 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="surname">Potter</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a 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 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 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 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 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 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#id411256">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="winbind.html#id411579">Introduction</a></span></dt><dt><span class="sect1"><a href="winbind.html#id411657">What Winbind Provides</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id411796">Target Uses</a></span></dt><dt><span class="sect2"><a href="winbind.html#id411839">Handling of Foreign SIDs</a></span></dt></dl></dd><dt><span class="sect1"><a href="winbind.html#id411950">How Winbind Works</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id411998">Microsoft Remote Procedure Calls</a></span></dt><dt><span class="sect2"><a href="winbind.html#id412076">Microsoft Active Directory Services</a></span></dt><dt><span class="sect2"><a href="winbind.html#id412120">Name Service Switch</a></span></dt><dt><span class="sect2"><a href="winbind.html#id412336">Pluggable Authentication Modules</a></span></dt><dt><span class="sect2"><a href="winbind.html#id412481">User and Group ID Allocation</a></span></dt><dt><span class="sect2"><a href="winbind.html#id412549">Result Caching</a></span></dt></dl></dd><dt><span class="sect1"><a href="winbind.html#id412600">Installation and Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id412605">Introduction</a></span></dt><dt><span class="sect2"><a href="winbind.html#id412712">Requirements</a></span></dt><dt><span class="sect2"><a href="winbind.html#id412857">Testing Things Out</a></span></dt></dl></dd><dt><span class="sect1"><a href="winbind.html#id415146">Conclusion</a></span></dt><dt><span class="sect1"><a href="winbind.html#id415192">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id415226">NSCD Problem Warning</a></span></dt><dt><span class="sect2"><a href="winbind.html#id415261">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="id411256"></a>Features and Benefits</h2></div></div></div><p>2 <a class="indexterm" name="id4 11264"></a>3 <a class="indexterm" name="id4 11270"></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.73.2"><link rel="start" href="index.html" title="The Official Samba 3.2.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="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#id434945">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="winbind.html#id435268">Introduction</a></span></dt><dt><span class="sect1"><a href="winbind.html#id435346">What Winbind Provides</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id435485">Target Uses</a></span></dt><dt><span class="sect2"><a href="winbind.html#id435524">Handling of Foreign SIDs</a></span></dt></dl></dd><dt><span class="sect1"><a href="winbind.html#id435636">How Winbind Works</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id435683">Microsoft Remote Procedure Calls</a></span></dt><dt><span class="sect2"><a href="winbind.html#id435761">Microsoft Active Directory Services</a></span></dt><dt><span class="sect2"><a href="winbind.html#id435805">Name Service Switch</a></span></dt><dt><span class="sect2"><a href="winbind.html#id436017">Pluggable Authentication Modules</a></span></dt><dt><span class="sect2"><a href="winbind.html#id436158">User and Group ID Allocation</a></span></dt><dt><span class="sect2"><a href="winbind.html#id436226">Result Caching</a></span></dt></dl></dd><dt><span class="sect1"><a href="winbind.html#id436276">Installation and Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id436282">Introduction</a></span></dt><dt><span class="sect2"><a href="winbind.html#id436389">Requirements</a></span></dt><dt><span class="sect2"><a href="winbind.html#id436531">Testing Things Out</a></span></dt></dl></dd><dt><span class="sect1"><a href="winbind.html#id438782">Conclusion</a></span></dt><dt><span class="sect1"><a href="winbind.html#id438828">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="winbind.html#id438861">NSCD Problem Warning</a></span></dt><dt><span class="sect2"><a href="winbind.html#id438895">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="id434945"></a>Features and Benefits</h2></div></div></div><p> 2 <a class="indexterm" name="id434953"></a> 3 <a class="indexterm" name="id434960"></a> 4 4 Integration of UNIX and Microsoft Windows NT through a unified logon has 5 5 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="id4 11285"></a>9 <a class="indexterm" name="id4 11292"></a>10 <a class="indexterm" name="id4 11299"></a>11 <a class="indexterm" name="id4 11306"></a>8 <a class="indexterm" name="id434975"></a> 9 <a class="indexterm" name="id434981"></a> 10 <a class="indexterm" name="id434988"></a> 11 <a class="indexterm" name="id434995"></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="id4 11318"></a>18 <a class="indexterm" name="id4 11327"></a>19 <a class="indexterm" name="id4 11334"></a>20 <a class="indexterm" name="id4 11341"></a>17 <a class="indexterm" name="id435007"></a> 18 <a class="indexterm" name="id435016"></a> 19 <a class="indexterm" name="id435023"></a> 20 <a class="indexterm" name="id435030"></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 … … 28 28 Winbind provides three separate functions: 29 29 </p><div class="itemizedlist"><ul type="disc"><li><p> 30 <a class="indexterm" name="id4 11364"></a>31 <a class="indexterm" name="id4 11371"></a>30 <a class="indexterm" name="id435054"></a> 31 <a class="indexterm" name="id435060"></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 35 </p></li><li><p> 36 <a class="indexterm" name="id4 11384"></a>37 <a class="indexterm" name="id4 11391"></a>36 <a class="indexterm" name="id435073"></a> 37 <a class="indexterm" name="id435080"></a> 38 38 Identity resolution (via NSS). This is the default when winbind is not used. 39 39 </p></li><li><p> 40 <a class="indexterm" name="id4 11402"></a>41 <a class="indexterm" name="id4 11409"></a>42 <a class="indexterm" name="id4 11416"></a>43 <a class="indexterm" name="id4 11422"></a>44 <a class="indexterm" name="id4 11429"></a>45 <a class="indexterm" name="id4 11436"></a>46 <a class="indexterm" name="id4 11442"></a>40 <a class="indexterm" name="id435092"></a> 41 <a class="indexterm" name="id435098"></a> 42 <a class="indexterm" name="id435105"></a> 43 <a class="indexterm" name="id435111"></a> 44 <a class="indexterm" name="id435118"></a> 45 <a class="indexterm" name="id435125"></a> 46 <a class="indexterm" name="id435132"></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 … … 53 53 from the LDAP database. 54 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="id4 11468"></a>56 <a class="indexterm" name="id4 11475"></a>57 <a class="indexterm" name="id4 11484"></a>58 <a class="indexterm" name="id4 11491"></a>59 <a class="indexterm" name="id4 11498"></a>60 <a class="indexterm" name="id4 11504"></a>55 <a class="indexterm" name="id435157"></a> 56 <a class="indexterm" name="id435164"></a> 57 <a class="indexterm" name="id435173"></a> 58 <a class="indexterm" name="id435180"></a> 59 <a class="indexterm" name="id435187"></a> 60 <a class="indexterm" name="id435194"></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="id4 11579"></a>Introduction</h2></div></div></div><p>It is well known that UNIX and Microsoft Windows NT have66 different models for representing user and group information and 67 use different technologies for implementing them. This fact has 68 made it difficult to integrate the two systems in a satisfactory 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="id435268"></a>Introduction</h2></div></div></div><p>It is well known that UNIX and Microsoft Windows NT have 66 different models for representing user and group information and 67 use different technologies for implementing them. This fact has 68 made it difficult to integrate the two systems in a satisfactory 69 69 manner.</p><p> 70 <a class="indexterm" name="id4 11593"></a>71 <a class="indexterm" name="id4 11600"></a>72 One common solution in use today has been to create 73 identically named user accounts on both the UNIX and Windows systems 74 and use the Samba suite of programs to provide file and print services 75 between the two. This solution is far from perfect, however, because 76 adding and deleting users on both sets of machines becomes a chore, 70 <a class="indexterm" name="id435282"></a> 71 <a class="indexterm" name="id435289"></a> 72 One common solution in use today has been to create 73 identically named user accounts on both the UNIX and Windows systems 74 and use the Samba suite of programs to provide file and print services 75 between the two. This solution is far from perfect, however, because 76 adding and deleting users on both sets of machines becomes a chore, 77 77 and two sets of passwords are required both of which 78 can lead to synchronization problems between the UNIX and Windows 79 systems and confusion for users.</p><p>We divide the unified logon problem for UNIX machines into 78 can lead to synchronization problems between the UNIX and Windows 79 systems and confusion for users.</p><p>We divide the unified logon problem for UNIX machines into 80 80 three smaller problems:</p><div class="itemizedlist"><ul type="disc"><li><p>Obtaining Windows NT user and group information. 81 81 </p></li><li><p>Authenticating Windows NT users. 82 82 </p></li><li><p>Password changing for Windows NT users. 83 83 </p></li></ul></div><p> 84 <a class="indexterm" name="id4 11638"></a>85 <a class="indexterm" name="id4 11645"></a>86 Ideally, a prospective solution to the unified logon problem 87 would satisfy all the above components without duplication of 88 information on the UNIX machines and without creating additional 89 tasks for the system administrator when maintaining users and 90 groups on either system. The Winbind system provides a simple 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="id4 11657"></a>What Winbind Provides</h2></div></div></div><p>93 <a class="indexterm" name="id4 11665"></a>94 <a class="indexterm" name="id4 11672"></a>95 <a class="indexterm" name="id4 11679"></a>96 <a class="indexterm" name="id4 11686"></a>97 Winbind unifies UNIX and Windows NT account management by 98 allowing a UNIX box to become a full member of an NT domain. Once 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 101 to be used in much the same manner that NIS+ is used within 84 <a class="indexterm" name="id435327"></a> 85 <a class="indexterm" name="id435334"></a> 86 Ideally, a prospective solution to the unified logon problem 87 would satisfy all the above components without duplication of 88 information on the UNIX machines and without creating additional 89 tasks for the system administrator when maintaining users and 90 groups on either system. The Winbind system provides a simple 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="id435346"></a>What Winbind Provides</h2></div></div></div><p> 93 <a class="indexterm" name="id435354"></a> 94 <a class="indexterm" name="id435361"></a> 95 <a class="indexterm" name="id435368"></a> 96 <a class="indexterm" name="id435374"></a> 97 Winbind unifies UNIX and Windows NT account management by 98 allowing a UNIX box to become a full member of an NT domain. Once 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 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="id4 11702"></a>104 <a class="indexterm" name="id4 11709"></a>105 <a class="indexterm" name="id4 11716"></a>106 <a class="indexterm" name="id4 11722"></a>103 <a class="indexterm" name="id435391"></a> 104 <a class="indexterm" name="id435398"></a> 105 <a class="indexterm" name="id435405"></a> 106 <a class="indexterm" name="id435411"></a> 107 107 The end result is that whenever a 108 program on the UNIX machine asks the operating system to look up 109 a user or group name, the query will be resolved by asking the 108 program on the UNIX machine asks the operating system to look up 109 a user or group name, the query will be resolved by asking the 110 110 NT domain controller for the specified domain to do the lookup. 111 Because Winbind hooks into the operating system at a low level 112 (via the NSS name resolution modules in the C library), this 113 redirection to the NT domain controller is completely 111 Because Winbind hooks into the operating system at a low level 112 (via the NSS name resolution modules in the C library), this 113 redirection to the NT domain controller is completely 114 114 transparent.</p><p> 115 <a class="indexterm" name="id4 11736"></a>116 <a class="indexterm" name="id4 11743"></a>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 119 so they are owned by NT domain users or even login to the 115 <a class="indexterm" name="id435425"></a> 116 <a class="indexterm" name="id435432"></a> 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 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="id4 11758"></a>122 The only obvious indication that Winbind is being used is 123 that user and group names take the form <code class="constant">DOMAIN\user</code> and 124 <code class="constant">DOMAIN\group</code>. This is necessary because it allows Winbind to determine 125 that redirection to a domain controller is wanted for a particular 121 <a class="indexterm" name="id435447"></a> 122 The only obvious indication that Winbind is being used is 123 that user and group names take the form <code class="constant">DOMAIN\user</code> and 124 <code class="constant">DOMAIN\group</code>. This is necessary because it allows Winbind to determine 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="id4 11778"></a>128 <a class="indexterm" name="id4 11785"></a>129 Additionally, Winbind provides an authentication service that hooks into the PAM system 130 to provide authentication via an NT domain to any PAM-enabled 131 applications. This capability solves the problem of synchronizing 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="id4 11796"></a>Target Uses</h3></div></div></div><p>134 <a class="indexterm" name="id4 11804"></a>135 Winbind is targeted at organizations that have an 136 existing NT-based domain infrastructure into which they wish 137 to put UNIX workstations or servers. Winbind will allow these 138 organizations to deploy UNIX workstations without having to 139 maintain a separate account infrastructure. This greatly 140 simplifies the administrative overhead of deploying UNIX 127 <a class="indexterm" name="id435467"></a> 128 <a class="indexterm" name="id435474"></a> 129 Additionally, Winbind provides an authentication service that hooks into the PAM system 130 to provide authentication via an NT domain to any PAM-enabled 131 applications. This capability solves the problem of synchronizing 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="id435485"></a>Target Uses</h3></div></div></div><p> 134 <a class="indexterm" name="id435492"></a> 135 Winbind is targeted at organizations that have an 136 existing NT-based domain infrastructure into which they wish 137 to put UNIX workstations or servers. Winbind will allow these 138 organizations to deploy UNIX workstations without having to 139 maintain a separate account infrastructure. This greatly 140 simplifies the administrative overhead of deploying UNIX 141 141 workstations into an NT-based organization.</p><p> 142 <a class="indexterm" name="id4 11820"></a>143 <a class="indexterm" name="id4 11827"></a>144 Another interesting way in which we expect Winbind to 145 be used is as a central part of UNIX-based appliances. Appliances 146 that provide file and print services to Microsoft-based networks 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="id4 11839"></a>Handling of Foreign SIDs</h3></div></div></div><p>149 <a class="indexterm" name="id4 11847"></a>142 <a class="indexterm" name="id435506"></a> 143 <a class="indexterm" name="id435513"></a> 144 Another interesting way in which we expect Winbind to 145 be used is as a central part of UNIX-based appliances. Appliances 146 that provide file and print services to Microsoft-based networks 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="id435524"></a>Handling of Foreign SIDs</h3></div></div></div><p> 149 <a class="indexterm" name="id435532"></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="id4 11863"></a>156 Fact: Winbind is needed to handle users who use workstations that are NOT part 155 <a class="indexterm" name="id435548"></a> 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="id4 11874"></a>159 <a class="indexterm" name="id435559"></a> 160 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 162 in a domain controlled by another Samba/Windows PDC.</span>” 163 163 </p><p> 164 <a class="indexterm" name="id4 11889"></a>165 <a class="indexterm" name="id4 11895"></a>166 <a class="indexterm" name="id4 11902"></a>164 <a class="indexterm" name="id435574"></a> 165 <a class="indexterm" name="id435581"></a> 166 <a class="indexterm" name="id435587"></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="id4 11915"></a>173 <a class="indexterm" name="id4 11922"></a>174 <a class="indexterm" name="id4 11928"></a>175 <a class="indexterm" name="id4 11935"></a>172 <a class="indexterm" name="id435600"></a> 173 <a class="indexterm" name="id435607"></a> 174 <a class="indexterm" name="id435614"></a> 175 <a class="indexterm" name="id435621"></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" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id4 11950"></a>How Winbind Works</h2></div></div></div><p>185 <a class="indexterm" name="id4 11958"></a>186 <a class="indexterm" name="id4 11965"></a>187 <a class="indexterm" name="id4 11972"></a>188 <a class="indexterm" name="id4 11978"></a>189 The Winbind system is designed around a client/server 190 architecture. A long-running <code class="literal">winbindd</code> daemon 184 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id435636"></a>How Winbind Works</h2></div></div></div><p> 185 <a class="indexterm" name="id435644"></a> 186 <a class="indexterm" name="id435650"></a> 187 <a class="indexterm" name="id435657"></a> 188 <a class="indexterm" name="id435664"></a> 189 The Winbind system is designed around a client/server 190 architecture. A long-running <code class="literal">winbindd</code> daemon 191 191 listens on a UNIX domain socket waiting for requests 192 to arrive. These requests are generated by the NSS and PAM 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="id4 11998"></a>Microsoft Remote Procedure Calls</h3></div></div></div><p>195 <a class="indexterm" name="id4 12006"></a>196 <a class="indexterm" name="id4 12015"></a>197 <a class="indexterm" name="id4 12022"></a>198 <a class="indexterm" name="id4 12028"></a>199 <a class="indexterm" name="id4 12035"></a>192 to arrive. These requests are generated by the NSS and PAM 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="id435683"></a>Microsoft Remote Procedure Calls</h3></div></div></div><p> 195 <a class="indexterm" name="id435691"></a> 196 <a class="indexterm" name="id435700"></a> 197 <a class="indexterm" name="id435707"></a> 198 <a class="indexterm" name="id435714"></a> 199 <a class="indexterm" name="id435721"></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="id4 12050"></a>207 <a class="indexterm" name="id4 12056"></a>208 <a class="indexterm" name="id4 12063"></a>206 <a class="indexterm" name="id435735"></a> 207 <a class="indexterm" name="id435742"></a> 208 <a class="indexterm" name="id435749"></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="id4 12076"></a>Microsoft Active Directory Services</h3></div></div></div><p>214 <a class="indexterm" name="id4 12083"></a>215 <a class="indexterm" name="id4 12090"></a>216 <a class="indexterm" name="id4 12097"></a>217 <a class="indexterm" name="id4 12104"></a>213 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id435761"></a>Microsoft Active Directory Services</h3></div></div></div><p> 214 <a class="indexterm" name="id435769"></a> 215 <a class="indexterm" name="id435776"></a> 216 <a class="indexterm" name="id435782"></a> 217 <a class="indexterm" name="id435789"></a> 218 218 Since late 2001, Samba has gained the ability to interact with Microsoft Windows 2000 using its “<span class="quote">native 219 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 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="id4 12120"></a>Name Service Switch</h3></div></div></div><p>223 <a class="indexterm" name="id4 12127"></a>224 <a class="indexterm" name="id4 12134"></a>225 <a class="indexterm" name="id4 12141"></a>226 <a class="indexterm" name="id4 12147"></a>227 The NSS is a feature that is present in many UNIX operating systems. It allows system 228 information such as hostnames, mail aliases, and user information 229 to be resolved from different sources. For example, a standalone 230 UNIX workstation may resolve system information from a series of 231 flat files stored on the local file system. A networked workstation 232 may first attempt to resolve system information from local files, 233 and then consult an NIS database for user information or a DNS server 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="id435805"></a>Name Service Switch</h3></div></div></div><p> 223 <a class="indexterm" name="id435813"></a> 224 <a class="indexterm" name="id435819"></a> 225 <a class="indexterm" name="id435826"></a> 226 <a class="indexterm" name="id435833"></a> 227 The NSS is a feature that is present in many UNIX operating systems. It allows system 228 information such as hostnames, mail aliases, and user information 229 to be resolved from different sources. For example, a standalone 230 UNIX workstation may resolve system information from a series of 231 flat files stored on the local file system. A networked workstation 232 may first attempt to resolve system information from local files, 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="id412162"></a> 236 <a class="indexterm" name="id412168"></a> 237 <a class="indexterm" name="id412175"></a> 238 <a class="indexterm" name="id412182"></a> 239 <a class="indexterm" name="id412188"></a> 240 The NSS application programming interface allows Winbind 241 to present itself as a source of system information when 242 resolving UNIX usernames and groups. Winbind uses this interface 243 and information obtained from a Windows NT server using MSRPC 244 calls to provide a new source of account enumeration. Using standard 245 UNIX library calls, you can enumerate the users and groups on 246 a UNIX machine running Winbind and see all users and groups in 247 an NT domain plus any trusted domain as though they were local 248 users and groups.</p><p> 249 <a class="indexterm" name="id412208"></a> 250 <a class="indexterm" name="id412214"></a> 251 <a class="indexterm" name="id412221"></a> 252 The primary control file for NSS is <code class="filename">/etc/nsswitch.conf</code>. 253 When a UNIX application makes a request to do a lookup, 254 the C library looks in <code class="filename">/etc/nsswitch.conf</code> 255 for a line that matches the service type being requested; for 256 example, the “<span class="quote">passwd</span>” service type is used when user or group names 257 are looked up. This config line specifies which implementations 258 of that service should be tried and in what order. If the passwd 259 config line is: 235 <a class="indexterm" name="id435847"></a> 236 <a class="indexterm" name="id435854"></a> 237 <a class="indexterm" name="id435860"></a> 238 <a class="indexterm" name="id435867"></a> 239 <a class="indexterm" name="id435874"></a> 240 The NSS application programming interface allows Winbind to present itself as a source of system 241 information when resolving UNIX usernames and groups. Winbind uses this interface and information obtained 242 from a Windows NT server using MSRPC calls to provide a new source of account enumeration. Using standard UNIX 243 library calls, you can enumerate the users and groups on a UNIX machine running Winbind and see all users and 244 groups in an NT domain plus any trusted domain as though they were local users and groups. 245 </p><p> 246 <a class="indexterm" name="id435888"></a> 247 <a class="indexterm" name="id435895"></a> 248 <a class="indexterm" name="id435902"></a> 249 The primary control file for NSS is <code class="filename">/etc/nsswitch.conf</code>. When a UNIX application 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 252 user or group names are looked up. This config line specifies which implementations of that service should be 253 tried and in what order. If the passwd config line is: 260 254 </p><pre class="screen"> 261 255 passwd: files example 262 256 </pre><p> 263 <a class="indexterm" name="id412252"></a> 264 <a class="indexterm" name="id412259"></a> 265 <a class="indexterm" name="id412266"></a> 266 then the C library will first load a module called 267 <code class="filename">/lib/libnss_files.so</code> followed by 268 the module <code class="filename">/lib/libnss_example.so</code>. The 269 C library will dynamically load each of these modules in turn 270 and call resolver functions within the modules to try to resolve 271 the request. Once the request is resolved, the C library returns the 272 result to the application.</p><p> 273 <a class="indexterm" name="id412291"></a> 274 <a class="indexterm" name="id412297"></a> 275 <a class="indexterm" name="id412304"></a> 276 This NSS interface provides an easy way for Winbind 277 to hook into the operating system. All that needs to be done 278 is to put <code class="filename">libnss_winbind.so</code> in <code class="filename">/lib/</code> 279 then add “<span class="quote">winbind</span>” into <code class="filename">/etc/nsswitch.conf</code> at 280 the appropriate place. The C library will then call Winbind to 281 resolve user and group names.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id412336"></a>Pluggable Authentication Modules</h3></div></div></div><p> 282 <a class="indexterm" name="id412344"></a> 283 <a class="indexterm" name="id412351"></a> 284 <a class="indexterm" name="id412358"></a> 285 <a class="indexterm" name="id412364"></a> 286 PAMs provide a system for abstracting authentication and authorization 287 technologies. With a PAM module, it is possible to specify different 288 authentication methods for different system applications without 289 having to recompile these applications. PAM is also useful 290 for implementing a particular policy for authorization. For example, 291 a system administrator may only allow console logins from users 292 stored in the local password file but only allow users resolved from 293 an NIS database to log in over the network.</p><p> 294 <a class="indexterm" name="id412379"></a> 295 <a class="indexterm" name="id412386"></a> 296 <a class="indexterm" name="id412392"></a> 297 <a class="indexterm" name="id412399"></a> 298 <a class="indexterm" name="id412406"></a> 299 Winbind uses the authentication management and password 300 management PAM interface to integrate Windows NT users into a 301 UNIX system. This allows Windows NT users to log in to a UNIX 302 machine and be authenticated against a suitable PDC. 303 These users can also change their passwords and have 304 this change take effect directly on the PDC. 257 <a class="indexterm" name="id435933"></a> 258 <a class="indexterm" name="id435940"></a> 259 <a class="indexterm" name="id435947"></a> 260 then the C library will first load a module called <code class="filename">/lib/libnss_files.so</code> followed 261 by the module <code class="filename">/lib/libnss_example.so</code>. The C library will dynamically load each of these 262 modules in turn and call resolver functions within the modules to try to resolve the request. Once the request 263 is resolved, the C library returns the result to the application. 305 264 </p><p> 306 <a class="indexterm" name="id412422"></a> 307 <a class="indexterm" name="id412428"></a> 308 <a class="indexterm" name="id412435"></a> 309 <a class="indexterm" name="id412442"></a> 310 PAM is configured by providing control files in the directory 311 <code class="filename">/etc/pam.d/</code> for each of the services that 312 require authentication. When an authentication request is made 313 by an application, the PAM code in the C library looks up this 314 control file to determine what modules to load to do the 315 authentication check and in what order. This interface makes adding 316 a new authentication service for Winbind very easy: simply copy 317 the <code class="filename">pam_winbind.so</code> module 318 to <code class="filename">/lib/security/</code>, and the PAM 319 control files for relevant services are updated to allow 320 authentication via Winbind. See the PAM documentation 321 in <a href="pam.html" title="Chapter 28. PAM-Based Distributed Authentication">PAM-Based Distributed Authentication</a>, for more information.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id412481"></a>User and Group ID Allocation</h3></div></div></div><p> 322 <a class="indexterm" name="id412488"></a> 323 <a class="indexterm" name="id412495"></a> 324 <a class="indexterm" name="id412502"></a> 325 When a user or group is created under Windows NT/200x, 326 it is allocated a numerical relative identifier (RID). This is 327 slightly different from UNIX, which has a range of numbers that are 328 used to identify users and the same range used to identify 329 groups. It is Winbind's job to convert RIDs to UNIX ID numbers and 330 vice versa. When Winbind is configured, it is given part of the UNIX 331 user ID space and a part of the UNIX group ID space in which to 332 store Windows NT users and groups. If a Windows NT user is 333 resolved for the first time, it is allocated the next UNIX ID from 334 the range. The same process applies for Windows NT groups. Over 335 time, Winbind will have mapped all Windows NT users and groups 336 to UNIX user IDs and group IDs.</p><p> 337 <a class="indexterm" name="id412518"></a> 338 <a class="indexterm" name="id412525"></a> 339 <a class="indexterm" name="id412532"></a> 340 <a class="indexterm" name="id412539"></a> 341 The results of this mapping are stored persistently in 342 an ID mapping database held in a tdb database. This ensures that 343 RIDs are mapped to UNIX IDs in a consistent way.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id412549"></a>Result Caching</h3></div></div></div><p> 344 <a class="indexterm" name="id412557"></a> 345 <a class="indexterm" name="id412563"></a> 346 <a class="indexterm" name="id412570"></a> 347 <a class="indexterm" name="id412577"></a> 348 <a class="indexterm" name="id412583"></a> 349 An active directory system can generate a lot of user and group 350 name lookups. To reduce the network cost of these lookups, Winbind 351 uses a caching scheme based on the SAM sequence number supplied 352 by NT domain controllers. User or group information returned 353 by a PDC is cached by Winbind along with a sequence number also 354 returned by the PDC. This sequence number is incremented by 355 Windows NT whenever any user or group information is modified. If 356 a cached entry has expired, the sequence number is requested from 357 the PDC and compared against the sequence number of the cached entry. 358 If the sequence numbers do not match, then the cached information 359 is discarded and up-to-date information is requested directly 360 from the PDC.</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id412600"></a>Installation and Configuration</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id412605"></a>Introduction</h3></div></div></div><p> 361 <a class="indexterm" name="id412613"></a> 362 <a class="indexterm" name="id412620"></a> 363 <a class="indexterm" name="id412626"></a> 364 This section describes the procedures used to get Winbind up and 365 running. Winbind is capable of providing access 366 and authentication control for Windows Domain users through an NT 367 or Windows 200x PDC for regular services, such as telnet and ftp, as 368 well for Samba services. 265 <a class="indexterm" name="id435971"></a> 266 <a class="indexterm" name="id435978"></a> 267 <a class="indexterm" name="id435984"></a> 268 This NSS interface provides an easy way for Winbind to hook into the operating system. All that needs 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 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="id436017"></a>Pluggable Authentication Modules</h3></div></div></div><p> 273 <a class="indexterm" name="id436025"></a> 274 <a class="indexterm" name="id436031"></a> 275 <a class="indexterm" name="id436038"></a> 276 <a class="indexterm" name="id436045"></a> 277 PAMs provide a system for abstracting authentication and authorization technologies. With a PAM 278 module, it is possible to specify different authentication methods for different system applications without 279 having to recompile these applications. PAM is also useful for implementing a particular policy for 280 authorization. For example, a system administrator may only allow console logins from users stored in the 281 local password file but only allow users resolved from an NIS database to log in over the network. 282 </p><p> 283 <a class="indexterm" name="id436060"></a> 284 <a class="indexterm" name="id436066"></a> 285 <a class="indexterm" name="id436073"></a> 286 <a class="indexterm" name="id436080"></a> 287 <a class="indexterm" name="id436087"></a> 288 Winbind uses the authentication management and password management PAM interface to integrate Windows 289 NT users into a UNIX system. This allows Windows NT users to log in to a UNIX machine and be authenticated 290 against a suitable PDC. These users can also change their passwords and have this change take effect directly 291 on the PDC. 292 </p><p> 293 <a class="indexterm" name="id436099"></a> 294 <a class="indexterm" name="id436106"></a> 295 <a class="indexterm" name="id436113"></a> 296 <a class="indexterm" name="id436119"></a> 297 PAM is configured by providing control files in the directory <code class="filename">/etc/pam.d/</code> for 298 each of the services that require authentication. When an authentication request is made by an application, 299 the PAM code in the C library looks up this control file to determine what modules to load to do the 300 authentication check and in what order. This interface makes adding a new authentication service for Winbind 301 very easy: simply copy the <code class="filename">pam_winbind.so</code> module to <code class="filename">/lib/security/</code>, 302 and the PAM control files for relevant services are updated to allow authentication via Winbind. See the PAM 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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id436158"></a>User and Group ID Allocation</h3></div></div></div><p> 305 <a class="indexterm" name="id436166"></a> 306 <a class="indexterm" name="id436172"></a> 307 <a class="indexterm" name="id436179"></a> 308 When a user or group is created under Windows NT/200x, it is allocated a numerical relative identifier 309 (RID). This is slightly different from UNIX, which has a range of numbers that are used to identify users and 310 the same range used to identify groups. It is Winbind's job to convert RIDs to UNIX ID numbers and vice versa. 311 When Winbind is configured, it is given part of the UNIX user ID space and a part of the UNIX group ID space 312 in which to store Windows NT users and groups. If a Windows NT user is resolved for the first time, it is 313 allocated the next UNIX ID from the range. The same process applies for Windows NT groups. Over time, Winbind 314 will have mapped all Windows NT users and groups to UNIX user IDs and group IDs. 315 </p><p> 316 <a class="indexterm" name="id436195"></a> 317 <a class="indexterm" name="id436202"></a> 318 <a class="indexterm" name="id436209"></a> 319 <a class="indexterm" name="id436216"></a> 320 The results of this mapping are stored persistently in an ID mapping database held in a tdb database. 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="id436226"></a>Result Caching</h3></div></div></div><p> 323 <a class="indexterm" name="id436234"></a> 324 <a class="indexterm" name="id436240"></a> 325 <a class="indexterm" name="id436247"></a> 326 <a class="indexterm" name="id436254"></a> 327 <a class="indexterm" name="id436260"></a> 328 An active directory system can generate a lot of user and group name lookups. To reduce the network 329 cost of these lookups, Winbind uses a caching scheme based on the SAM sequence number supplied by NT domain 330 controllers. User or group information returned by a PDC is cached by Winbind along with a sequence number 331 also returned by the PDC. This sequence number is incremented by Windows NT whenever any user or group 332 information is modified. If a cached entry has expired, the sequence number is requested from the PDC and 333 compared against the sequence number of the cached entry. If the sequence numbers do not match, then the 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="id436276"></a>Installation and Configuration</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id436282"></a>Introduction</h3></div></div></div><p> 336 <a class="indexterm" name="id436290"></a> 337 <a class="indexterm" name="id436297"></a> 338 <a class="indexterm" name="id436303"></a> 339 This section describes the procedures used to get Winbind up and running. Winbind is capable of providing 340 access and authentication control for Windows Domain users through an NT or Windows 200x PDC for regular 341 services, such as telnet and ftp, as well for Samba services. 369 342 </p><div class="itemizedlist"><ul type="disc"><li><p> 370 343 <span class="emphasis"><em>Why should I do this?</em></span> 371 344 </p><p> 372 <a class="indexterm" name="id412650"></a> 373 <a class="indexterm" name="id412657"></a> 374 <a class="indexterm" name="id412664"></a> 375 <a class="indexterm" name="id412670"></a> 376 This allows the Samba administrator to rely on the 377 authentication mechanisms on the Windows NT/200x PDC for the authentication 378 of domain members. Windows NT/200x users no longer need to have separate 379 accounts on the Samba server. 345 <a class="indexterm" name="id436326"></a> 346 <a class="indexterm" name="id436333"></a> 347 <a class="indexterm" name="id436340"></a> 348 <a class="indexterm" name="id436347"></a> 349 This allows the Samba administrator to rely on the authentication mechanisms on the Windows NT/200x PDC 350 for the authentication of domain members. Windows NT/200x users no longer need to have separate accounts on 351 the Samba server. 380 352 </p></li><li><p> 381 353 <span class="emphasis"><em>Who should be reading this document?</em></span> 382 354 </p><p> 383 <a class="indexterm" name="id412692"></a> 384 <a class="indexterm" name="id412699"></a> 385 This document is designed for system administrators. If you are 386 implementing Samba on a file server and wish to (fairly easily) 387 integrate existing Windows NT/200x users from your PDC onto the 388 Samba server, this document is for you. 389 </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id412712"></a>Requirements</h3></div></div></div><p> 390 <a class="indexterm" name="id412720"></a> 391 <a class="indexterm" name="id412726"></a> 392 <a class="indexterm" name="id412733"></a> 355 <a class="indexterm" name="id436369"></a> 356 <a class="indexterm" name="id436376"></a> 357 This document is designed for system administrators. If you are implementing Samba on a file server and wish 358 to (fairly easily) integrate existing Windows NT/200x users from your PDC onto the Samba server, this document 359 is for you. 360 </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id436389"></a>Requirements</h3></div></div></div><p> 361 <a class="indexterm" name="id436397"></a> 362 <a class="indexterm" name="id436403"></a> 363 <a class="indexterm" name="id436410"></a> 393 364 If you have a Samba configuration file that you are currently using, <span class="emphasis"><em>BACK IT UP!</em></span> 394 365 If your system already uses PAM, <span class="emphasis"><em>back up the <code class="filename">/etc/pam.d</code> directory 395 366 contents!</em></span> If you haven't already made a boot disk, <span class="emphasis"><em>MAKE ONE NOW!</em></span> 396 367 </p><p> 397 <a class="indexterm" name="id4 12761"></a>398 <a class="indexterm" name="id4 12768"></a>399 <a class="indexterm" name="id4 12775"></a>368 <a class="indexterm" name="id436438"></a> 369 <a class="indexterm" name="id436445"></a> 370 <a class="indexterm" name="id436452"></a> 400 371 Messing with the PAM configuration files can make it nearly impossible to log in to your machine. That's 401 372 why you want to be able to boot back into your machine in single-user mode and restore your … … 403 374 way things are going. 404 375 </p><p> 405 <a class="indexterm" name="id4 12793"></a>406 <a class="indexterm" name="id4 12800"></a>407 The latest version of Samba-3 includes a functioning winbindd daemon. Please refer to the <a href="http://samba.org/" target="_top">main Samba Web page</a>, or better yet, your closest Samba mirror site for376 <a class="indexterm" name="id436470"></a> 377 <a class="indexterm" name="id436477"></a> 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 408 379 instructions on downloading the source code. 409 380 </p><p> 410 <a class="indexterm" name="id4 12818"></a>411 <a class="indexterm" name="id4 12824"></a>412 <a class="indexterm" name="id4 12831"></a>413 <a class="indexterm" name="id4 12838"></a>381 <a class="indexterm" name="id436494"></a> 382 <a class="indexterm" name="id436501"></a> 383 <a class="indexterm" name="id436508"></a> 384 <a class="indexterm" name="id436514"></a> 414 385 To allow domain users the ability to access Samba shares and files, as well as potentially other services 415 386 provided by your Samba machine, PAM must be set up properly on your 416 387 machine. In order to compile the Winbind modules, you should have at least the PAM development libraries installed 417 on your system. Please refer to the PAM Web site <a href="http://www.kernel.org/pub/linux/libs/pam/" target="_top">http://www.kernel.org/pub/linux/libs/pam/</a>.418 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id4 12857"></a>Testing Things Out</h3></div></div></div><p>419 <a class="indexterm" name="id4 12865"></a>420 <a class="indexterm" name="id4 12872"></a>421 <a class="indexterm" name="id4 12878"></a>422 <a class="indexterm" name="id4 12885"></a>423 <a class="indexterm" name="id4 12892"></a>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="id436531"></a>Testing Things Out</h3></div></div></div><p> 390 <a class="indexterm" name="id436539"></a> 391 <a class="indexterm" name="id436545"></a> 392 <a class="indexterm" name="id436552"></a> 393 <a class="indexterm" name="id436559"></a> 394 <a class="indexterm" name="id436566"></a> 424 395 Before starting, it is probably best to kill off all the Samba-related daemons running on your server. 425 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, … … 429 400 better in Samba if the pam-devel package is also installed. This package includes the header files 430 401 needed to compile PAM-aware applications. 431 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id4 12939"></a>Configure <code class="filename">nsswitch.conf</code> and the Winbind Libraries on Linux and Solaris</h4></div></div></div><p>432 <a class="indexterm" name="id4 12953"></a>433 <a class="indexterm" name="id4 12960"></a>434 <a class="indexterm" name="id4 12967"></a>435 <a class="indexterm" name="id4 12973"></a>402 </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id436613"></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="id436627"></a> 404 <a class="indexterm" name="id436634"></a> 405 <a class="indexterm" name="id436640"></a> 406 <a class="indexterm" name="id436647"></a> 436 407 PAM is a standard component of most current generation UNIX/Linux systems. Unfortunately, few systems install 437 408 the <code class="filename">pam-devel</code> libraries that are needed to build PAM-enabled Samba. Additionally, Samba-3 … … 443 414 The libraries needed to run the <span class="application">winbindd</span> daemon through nsswitch need to be copied to their proper locations: 444 415 </p><p> 445 <a class="indexterm" name="id4 13009"></a>416 <a class="indexterm" name="id436682"></a> 446 417 </p><pre class="screen"> 447 418 <code class="prompt">root# </code><strong class="userinput"><code>cp ../samba/source/nsswitch/libnss_winbind.so /lib</code></strong> … … 452 423 <code class="prompt">root# </code> <strong class="userinput"><code>ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2</code></strong> 453 424 </p><p>And, in the case of Sun Solaris: 454 <a class="indexterm" name="id4 13054"></a>425 <a class="indexterm" name="id436728"></a> 455 426 </p><pre class="screen"> 456 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> … … 459 430 </pre><p> 460 431 </p><p> 461 <a class="indexterm" name="id413102"></a> 462 As root, edit <code class="filename">/etc/nsswitch.conf</code> to 463 allow user and group entries to be visible from the <span class="application">winbindd</span> 464 daemon. My <code class="filename">/etc/nsswitch.conf</code> file looked like 465 this after editing: 432 <a class="indexterm" name="id436776"></a> 433 As root, edit <code class="filename">/etc/nsswitch.conf</code> to allow user and group entries to be visible from the 434 <span class="application">winbindd</span> daemon. My <code class="filename">/etc/nsswitch.conf</code> file looked like this after editing: 466 435 </p><pre class="programlisting"> 467 436 passwd: files winbind 468 shadow: files 437 shadow: files 469 438 group: files winbind 470 </pre><p> 471 <a class="indexterm" name="id4 13136"></a>472 <a class="indexterm" name="id4 13143"></a>473 <a class="indexterm" name="id4 13149"></a>474 <a class="indexterm" name="id4 13156"></a>475 <a class="indexterm" name="id4 13163"></a>476 The libraries needed by the <code class="literal">winbindd</code> daemon will be automatically 477 entered into the <code class="literal">ldconfig</code> cache the next time 439 </pre><p> 440 <a class="indexterm" name="id436810"></a> 441 <a class="indexterm" name="id436816"></a> 442 <a class="indexterm" name="id436823"></a> 443 <a class="indexterm" name="id436830"></a> 444 <a class="indexterm" name="id436837"></a> 445 The libraries needed by the <code class="literal">winbindd</code> daemon will be automatically 446 entered into the <code class="literal">ldconfig</code> cache the next time 478 447 your system reboots, but it is faster (and you do not need to reboot) if you do it manually: 479 448 </p><pre class="screen"> … … 485 454 this library is indeed recognized by the dynamic link loader. 486 455 </p><p> 487 <a class="indexterm" name="id4 13222"></a>488 <a class="indexterm" name="id4 13229"></a>489 <a class="indexterm" name="id4 13236"></a>490 <a class="indexterm" name="id4 13243"></a>491 <a class="indexterm" name="id4 13250"></a>492 The Sun Solaris dynamic link loader management tool is called <code class="literal">crle</code>. The 456 <a class="indexterm" name="id436896"></a> 457 <a class="indexterm" name="id436903"></a> 458 <a class="indexterm" name="id436910"></a> 459 <a class="indexterm" name="id436916"></a> 460 <a class="indexterm" name="id436923"></a> 461 The Sun Solaris dynamic link loader management tool is called <code class="literal">crle</code>. The 493 462 use of this tool is necessary to instruct the dynamic link loader to search directories that 494 463 contain library files that were not supplied as part of the original operating system platform. … … 498 467 <code class="prompt">root# </code> crle -u -l /usr/lib:/usr/local/lib 499 468 </pre><p> 500 When executed without arguments, <code class="literal">crle</code> reports the current dynamic 469 When executed without arguments, <code class="literal">crle</code> reports the current dynamic 501 470 link loader configuration. This is demonstrated here: 502 471 </p><pre class="screen"> … … 512 481 From this it is apparent that the <code class="filename">/usr/local/lib</code> directory is included 513 482 in the search dynamic link libraries in order to satisfy object module dependencies. 514 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id4 13313"></a>NSS Winbind on AIX</h4></div></div></div><p>(This section is only for those running AIX.)</p><p>515 <a class="indexterm" name="id4 13325"></a>516 <a class="indexterm" name="id4 13331"></a>517 <a class="indexterm" name="id4 13338"></a>518 <a class="indexterm" name="id4 13345"></a>519 <a class="indexterm" name="id4 13352"></a>520 <a class="indexterm" name="id4 13359"></a>483 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id436987"></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="id436998"></a> 485 <a class="indexterm" name="id437005"></a> 486 <a class="indexterm" name="id437012"></a> 487 <a class="indexterm" name="id437018"></a> 488 <a class="indexterm" name="id437025"></a> 489 <a class="indexterm" name="id437032"></a> 521 490 The Winbind AIX identification module gets built as <code class="filename">libnss_winbind.so</code> in the 522 491 nsswitch directory of the Samba source. This file can be copied to <code class="filename">/usr/lib/security</code>, … … 532 501 it impossible to log on to the system. Information regarding the AIX authentication module API can 533 502 be found in the “<span class="quote">Kernel Extensions and Device Support Programming Concepts for AIX</span>” document that 534 describes the <a href="http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/kernextc/sec_load_mod.htm" target="_top">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"> 535 504 Loadable Authentication Module Programming Interface</a> for AIX. Further information on administering the modules 536 can be found in the <a href="http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixbman/baseadmn/iandaadmin.htm" target="_top">System505 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 537 506 Management Guide: Operating System and Devices.</a> 538 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id4 13415"></a>Configure smb.conf</h4></div></div></div><p>539 <a class="indexterm" name="id4 13423"></a>540 <a class="indexterm" name="id4 13430"></a>541 <a class="indexterm" name="id4 13436"></a>507 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id437089"></a>Configure smb.conf</h4></div></div></div><p> 508 <a class="indexterm" name="id437097"></a> 509 <a class="indexterm" name="id437103"></a> 510 <a class="indexterm" name="id437110"></a> 542 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 543 are described in more detail in the <a 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 <ahref="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.544 </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="id4 13507"></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="id413523"></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="id413539"></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="id413556"></a><em class="parameter"><code>winbind enum users = yes</code></em></td></tr><tr><td><a class="indexterm" name="id413568"></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="id413585"></a><em class="parameter"><code>template homedir = /home/winnt/%D/%U</code></em></td></tr><tr><td><a class="indexterm" name="id413598"></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="id413612"></a>Join the Samba Server to the PDC Domain</h4></div></div></div><p>545 <a class="indexterm" name="id4 13620"></a>546 <a class="indexterm" name="id4 13627"></a>547 <a class="indexterm" name="id4 13634"></a>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="id437181"></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="id437196"></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="id437212"></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="id437227"></a><em class="parameter"><code>winbind enum users = yes</code></em></td></tr><tr><td><a class="indexterm" name="id437238"></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="id437254"></a><em class="parameter"><code>template homedir = /home/winnt/%D/%U</code></em></td></tr><tr><td><a class="indexterm" name="id437266"></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="id437279"></a>Join the Samba Server to the PDC Domain</h4></div></div></div><p> 514 <a class="indexterm" name="id437287"></a> 515 <a class="indexterm" name="id437294"></a> 516 <a class="indexterm" name="id437300"></a> 548 517 All machines that will participate in domain security should be members of 549 518 the domain. This applies also to the PDC and all BDCs. 550 519 </p><p> 551 <a class="indexterm" name="id4 13645"></a>552 <a class="indexterm" name="id4 13651"></a>553 <a class="indexterm" name="id4 13658"></a>554 <a class="indexterm" name="id4 13669"></a>555 <a class="indexterm" name="id4 13676"></a>556 <a class="indexterm" name="id4 13683"></a>557 <a class="indexterm" name="id4 13689"></a>558 <a class="indexterm" name="id4 13696"></a>559 <a class="indexterm" name="id4 13703"></a>520 <a class="indexterm" name="id437311"></a> 521 <a class="indexterm" name="id437318"></a> 522 <a class="indexterm" name="id437325"></a> 523 <a class="indexterm" name="id437336"></a> 524 <a class="indexterm" name="id437343"></a> 525 <a class="indexterm" name="id437349"></a> 526 <a class="indexterm" name="id437356"></a> 527 <a class="indexterm" name="id437363"></a> 528 <a class="indexterm" name="id437370"></a> 560 529 The process of joining a domain requires the use of the <code class="literal">net rpc join</code> 561 530 command. This process communicates with the domain controller it will register with … … 564 533 start Samba on a PDC so that it can join its own domain. 565 534 </p><p> 566 <a class="indexterm" name="id413728"></a> 567 <a class="indexterm" name="id413734"></a> 568 <a class="indexterm" name="id413741"></a> 569 Enter the following command to make the Samba server join the 570 domain, where <em class="replaceable"><code>PDC</code></em> is the name of 571 your PDC and <em class="replaceable"><code>Administrator</code></em> is 572 a domain user who has administrative privileges in the domain. 535 <a class="indexterm" name="id437394"></a> 536 <a class="indexterm" name="id437401"></a> 537 <a class="indexterm" name="id437408"></a> 538 Enter the following command to make the Samba server join the domain, where <em class="replaceable"><code>PDC</code></em> is 539 the name of your PDC and <em class="replaceable"><code>Administrator</code></em> is a domain user who has administrative 540 privileges in the domain. 573 541 </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> 574 <a class="indexterm" name="id4 13761"></a>575 <a class="indexterm" name="id4 13768"></a>576 <a class="indexterm" name="id4 13774"></a>577 <a class="indexterm" name="id4 13781"></a>542 <a class="indexterm" name="id437428"></a> 543 <a class="indexterm" name="id437434"></a> 544 <a class="indexterm" name="id437441"></a> 545 <a class="indexterm" name="id437448"></a> 578 546 Before attempting to join a machine to the domain, verify that Samba is running 579 547 on the target domain controller (usually PDC) and that it is capable of being reached via ports 580 548 137/udp, 135/tcp, 139/tcp, and 445/tcp (if Samba or Windows Server 2Kx). 581 549 </p></div><p> 582 <a class="indexterm" name="id4 13793"></a>550 <a class="indexterm" name="id437460"></a> 583 551 The use of the <code class="literal">net rpc join</code> facility is shown here: 584 552 </p><pre class="screen"> 585 553 <code class="prompt">root# </code><strong class="userinput"><code>/usr/local/samba/bin/net rpc join -S PDC -U Administrator</code></strong> 586 554 </pre><p> 587 The proper response to the command should be “<span class="quote">Joined the domain 588 <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">Joined the domain 556 <em class="replaceable"><code>DOMAIN</code></em></span>” where <em class="replaceable"><code>DOMAIN</code></em> 589 557 is your domain name. 590 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id413839"></a>Starting and Testing the <code class="literal">winbindd</code> Daemon</h4></div></div></div><p> 591 <a class="indexterm" name="id413853"></a> 592 <a class="indexterm" name="id413860"></a> 593 <a class="indexterm" name="id413867"></a> 594 Eventually, you will want to modify your Samba startup script to 595 automatically invoke the winbindd daemon when the other parts of 596 Samba start, but it is possible to test out just the Winbind 597 portion first. To start up Winbind services, enter the following 598 command as root: 558 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id437506"></a>Starting and Testing the <code class="literal">winbindd</code> Daemon</h4></div></div></div><p> 559 <a class="indexterm" name="id437520"></a> 560 <a class="indexterm" name="id437527"></a> 561 <a class="indexterm" name="id437534"></a> 562 Eventually, you will want to modify your Samba startup script to automatically invoke the winbindd daemon when 563 the other parts of Samba start, but it is possible to test out just the Winbind portion first. To start up 564 Winbind services, enter the following command as root: 599 565 </p><pre class="screen"> 600 566 <code class="prompt">root# </code><strong class="userinput"><code>/usr/local/samba/sbin/winbindd</code></strong> … … 602 568 Use the appropriate path to the location of the <code class="literal">winbindd</code> executable file. 603 569 </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> 604 <a class="indexterm" name="id4 13903"></a>605 <a class="indexterm" name="id4 13910"></a>606 The command to start up Winbind services assumes that Samba has been installed in the <code class="filename">/usr/local/samba</code>607 directory tree. You may need to search for the location of Samba files if this is not the 608 location of <code class="literal">winbindd</code> on your system.570 <a class="indexterm" name="id437570"></a> 571 <a class="indexterm" name="id437576"></a> 572 The command to start up Winbind services assumes that Samba has been installed in the 573 <code class="filename">/usr/local/samba</code> directory tree. You may need to search for the location of Samba files 574 if this is not the location of <code class="literal">winbindd</code> on your system. 609 575 </p></div><p> 610 <a class="indexterm" name="id413933"></a> 611 <a class="indexterm" name="id413940"></a> 612 Winbindd can now also run in “<span class="quote">dual daemon mode</span>”. This will make it 613 run as two processes. The first will answer all requests from the cache, 614 thus making responses to clients faster. The other will 615 update the cache for the query to which the first has just responded. 616 The advantage of this is that responses stay accurate and are faster. 617 You can enable dual daemon mode by adding <code class="option">-B</code> to the command line: 618 </p><pre class="screen"> 619 <code class="prompt">root# </code><strong class="userinput"><code>/usr/local/samba/sbin/winbindd -B</code></strong> 620 </pre><p> 621 </p><p> 622 <a class="indexterm" name="id413976"></a> 623 <a class="indexterm" name="id413983"></a> 576 <a class="indexterm" name="id437600"></a> 577 <a class="indexterm" name="id437607"></a> 624 578 I'm always paranoid and like to make sure the daemon is really running. 625 579 </p><pre class="screen"> … … 627 581 </pre><p> 628 582 </p><p> 629 <a class="indexterm" name="id4 14010"></a>583 <a class="indexterm" name="id437633"></a> 630 584 This command should produce output like the following if the daemon is running. 631 585 </p><pre class="screen"> … … 633 587 </pre><p> 634 588 </p><p> 635 <a class="indexterm" name="id4 14026"></a>636 <a class="indexterm" name="id4 14033"></a>589 <a class="indexterm" name="id437650"></a> 590 <a class="indexterm" name="id437657"></a> 637 591 Now, for the real test, try to get some information about the users on your PDC: 638 592 </p><pre class="screen"> 639 593 <code class="prompt">root# </code><strong class="userinput"><code>/usr/local/samba/bin/wbinfo -u</code></strong> 640 594 </pre><p> 641 This should echo back a list of users on your Windows users on 642 your PDC. For example, I get the followingresponse:595 This should echo back a list of users on your Windows users on your PDC. For example, I get the following 596 response: 643 597 </p><pre class="screen"> 644 598 CEO\Administrator … … 649 603 CEO\TsInternetUser 650 604 </pre><p> 651 Obviously, I have named my domain “<span class="quote">CEO</span>” and my <a class="indexterm" name="id414068"></a>winbind separator is “<span class="quote">\</span>”. 652 </p><p> 653 <a class="indexterm" name="id414081"></a> 654 <a class="indexterm" name="id414088"></a> 605 Obviously, I have named my domain “<span class="quote">CEO</span>” and my <a class="link" href="smb.conf.5.html#WINBINDSEPARATOR">winbind separator</a> is 606 “<span class="quote">\</span>”. 607 </p><p> 608 <a class="indexterm" name="id437710"></a> 609 <a class="indexterm" name="id437716"></a> 655 610 You can do the same sort of thing to get group information from the PDC: 656 611 </p><pre class="screen"> … … 666 621 CEO\Group Policy Creator Owners 667 622 </pre><p> 668 <a class="indexterm" name="id4 14115"></a>669 <a class="indexterm" name="id4 14122"></a>670 <a class="indexterm" name="id4 14128"></a>671 <a class="indexterm" name="id4 14135"></a>672 <a class="indexterm" name="id4 14142"></a>673 <a class="indexterm" name="id4 14148"></a>674 <a class="indexterm" name="id4 14155"></a>675 The function <code class="literal">getent</code> can now be used to get unified 676 lists of both local and PDC users andgroups. Try the following command:623 <a class="indexterm" name="id437744"></a> 624 <a class="indexterm" name="id437750"></a> 625 <a class="indexterm" name="id437757"></a> 626 <a class="indexterm" name="id437764"></a> 627 <a class="indexterm" name="id437770"></a> 628 <a class="indexterm" name="id437777"></a> 629 <a class="indexterm" name="id437784"></a> 630 The function <code class="literal">getent</code> can now be used to get unified lists of both local and PDC users and 631 groups. Try the following command: 677 632 </p><pre class="screen"> 678 633 <code class="prompt">root# </code><strong class="userinput"><code>getent passwd</code></strong> 679 634 </pre><p> 680 You should get a list that looks like your <code class="filename">/etc/passwd</code> 681 list followed by the domain users with their new UIDs, GIDs, home 635 You should get a list that looks like your <code class="filename">/etc/passwd</code> 636 list followed by the domain users with their new UIDs, GIDs, home 682 637 directories, and default shells. 683 638 </p><p> … … 686 641 <code class="prompt">root# </code><strong class="userinput"><code>getent group</code></strong> 687 642 </pre><p> 688 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id414214"></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="id414220"></a>Linux</h5></div></div></div><p> 689 <a class="indexterm" name="id414227"></a> 690 <a class="indexterm" name="id414234"></a> 691 <a class="indexterm" name="id414241"></a> 692 <a class="indexterm" name="id414248"></a> 693 <a class="indexterm" name="id414255"></a> 694 <a class="indexterm" name="id414261"></a> 695 <a class="indexterm" name="id414268"></a> 696 <a class="indexterm" name="id414274"></a> 697 <a class="indexterm" name="id414279"></a> 698 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. 699 To accomplish this task, you need to modify the startup scripts of your system. 700 They are located at <code class="filename">/etc/init.d/smb</code> in Red Hat Linux and in 701 <code class="filename">/etc/init.d/samba</code> in Debian Linux. Edit your 702 script to add commands to invoke this daemon in the proper sequence. My 703 startup script starts up <span class="application">smbd</span>, <span class="application">nmbd</span>, and <span class="application">winbindd</span> from the 704 <code class="filename">/usr/local/samba/bin</code> directory directly. The <code class="literal">start</code> 705 function in the script looks like this: 643 </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id437842"></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="id437848"></a>Linux</h5></div></div></div><p> 644 <a class="indexterm" name="id437856"></a> 645 <a class="indexterm" name="id437863"></a> 646 <a class="indexterm" name="id437870"></a> 647 <a class="indexterm" name="id437876"></a> 648 <a class="indexterm" name="id437883"></a> 649 <a class="indexterm" name="id437890"></a> 650 <a class="indexterm" name="id437897"></a> 651 <a class="indexterm" name="id437902"></a> 652 <a class="indexterm" name="id437908"></a> 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 task, you need to modify the startup scripts of your system. They are located at 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 656 Linux. Edit your script to add commands to invoke this daemon in the proper sequence. My startup script starts 657 up <span class="application">smbd</span>, <span class="application">nmbd</span>, and <span class="application">winbindd</span> from the <code class="filename">/usr/local/samba/bin</code> directory directly. The 658 <code class="literal">start</code> function in the script looks like this: 706 659 </p><pre class="programlisting"> 707 660 start() { … … 725 678 return $RETVAL 726 679 } 727 </pre><p>If you would like to run winbindd in dual daemon mode, replace 728 the line: 680 </pre><p>If you would like to run winbindd in dual daemon mode, replace the line: 729 681 </p><pre class="programlisting"> 730 682 daemon /usr/local/samba/sbin/winbindd … … 737 689 </pre><p>. 738 690 </p><p> 739 The <code class="literal">stop</code> function has a corresponding entry to shut down the 740 services and looks like this: 691 The <code class="literal">stop</code> function has a corresponding entry to shut down the services and looks like this: 741 692 </p><pre class="programlisting"> 742 693 stop() { … … 760 711 return $RETVAL 761 712 } 762 </pre></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id4 14403"></a>Solaris</h5></div></div></div><p>763 Winbind does not work on Solaris 9; see <a href="Portability.html#winbind-solaris9" title="Winbind on Solaris 9">Winbind on Solaris 9 section</a>713 </pre></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id438031"></a>Solaris</h5></div></div></div><p> 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> 764 715 for details. 765 716 </p><p> 766 <a class="indexterm" name="id4 14422"></a>767 <a class="indexterm" name="id4 14429"></a>768 <a class="indexterm" name="id4 14436"></a>769 <a class="indexterm" name="id4 14443"></a>770 <a class="indexterm" name="id4 14450"></a>771 <a class="indexterm" name="id4 14456"></a>717 <a class="indexterm" name="id438051"></a> 718 <a class="indexterm" name="id438057"></a> 719 <a class="indexterm" name="id438064"></a> 720 <a class="indexterm" name="id438071"></a> 721 <a class="indexterm" name="id438078"></a> 722 <a class="indexterm" name="id438085"></a> 772 723 On Solaris, you need to modify the <code class="filename">/etc/init.d/samba.server</code> startup script. It 773 724 usually only starts smbd and nmbd but should now start winbindd, too. If you have Samba installed in … … 790 741 [ "$pid" != "" ] && kill $pid 791 742 } 792 743 793 744 # Start/stop processes required for Samba server 794 745 … … 830 781 /usr/local/samba/sbin/winbindd -B 831 782 </pre><p> 832 </p></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id4 14522"></a>Restarting</h5></div></div></div><p>833 <a class="indexterm" name="id4 14530"></a>834 <a class="indexterm" name="id4 14537"></a>783 </p></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id438150"></a>Restarting</h5></div></div></div><p> 784 <a class="indexterm" name="id438158"></a> 785 <a class="indexterm" name="id438165"></a> 835 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 836 787 should be able to connect to the Samba server as a domain member just as 837 788 if you were a local user. 838 </p></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id414566"></a>Configure Winbind and PAM</h4></div></div></div><p> 839 <a class="indexterm" name="id414573"></a> 840 <a class="indexterm" name="id414580"></a> 841 <a class="indexterm" name="id414587"></a> 842 <a class="indexterm" name="id414594"></a> 843 If you have made it this far, you know that <code class="literal">winbindd</code> and Samba are working 844 together. If you want to use Winbind to provide authentication for other 845 services, keep reading. The PAM configuration files need to be altered in 846 this step. (Did you remember to make backups of your original 789 </p></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id438194"></a>Configure Winbind and PAM</h4></div></div></div><p> 790 <a class="indexterm" name="id438202"></a> 791 <a class="indexterm" name="id438209"></a> 792 <a class="indexterm" name="id438215"></a> 793 <a class="indexterm" name="id438222"></a> 794 If you have made it this far, you know that <code class="literal">winbindd</code> and Samba are working together. If you 795 want to use Winbind to provide authentication for other services, keep reading. The PAM configuration files 796 need to be altered in this step. (Did you remember to make backups of your original 847 797 <code class="filename">/etc/pam.d</code> files? If not, do it now.) 848 798 </p><p> 849 <a class="indexterm" name="id414618"></a> 850 <a class="indexterm" name="id414625"></a> 851 <a class="indexterm" name="id414631"></a> 852 <a class="indexterm" name="id414638"></a> 853 <a class="indexterm" name="id414645"></a> 854 <a class="indexterm" name="id414652"></a> 855 You will need a PAM module to use winbindd with these other services. This 856 module will be compiled in the <code class="filename">../source/nsswitch</code> directory 857 by invoking the command: 799 <a class="indexterm" name="id438246"></a> 800 <a class="indexterm" name="id438253"></a> 801 <a class="indexterm" name="id438260"></a> 802 <a class="indexterm" name="id438267"></a> 803 <a class="indexterm" name="id438273"></a> 804 <a class="indexterm" name="id438280"></a> 805 You will need a PAM module to use winbindd with these other services. This module will be compiled in the 806 <code class="filename">../source/nsswitch</code> directory by invoking the command: 858 807 </p><pre class="screen"> 859 808 <code class="prompt">root# </code><strong class="userinput"><code>make nsswitch/pam_winbind.so</code></strong> 860 809 </pre><p> 861 from the <code class="filename">../source</code> directory. The 862 <code class="filename">pam_winbind.so</code> file should be copied to the location of 863 your other PAM security modules. On my Red Hat system, this was the 864 <code class="filename">/lib/security</code> directory. On Solaris, the PAM security 865 modules reside in <code class="filename">/usr/lib/security</code>. 810 from the <code class="filename">../source</code> directory. The <code class="filename">pam_winbind.so</code> file should be 811 copied to the location of your other PAM security modules. On my Red Hat system, this was the 812 <code class="filename">/lib/security</code> directory. On Solaris, the PAM security modules reside in 813 <code class="filename">/usr/lib/security</code>. 866 814 </p><pre class="screen"> 867 815 <code class="prompt">root# </code><strong class="userinput"><code>cp ../samba/source/nsswitch/pam_winbind.so /lib/security</code></strong> 868 816 </pre><p> 869 </p><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id414724"></a>Linux/FreeBSD-Specific PAM Configuration</h5></div></div></div><p> 870 <a class="indexterm" name="id414732"></a> 871 The <code class="filename">/etc/pam.d/samba</code> file does not need to be changed. I 872 just left this file as it was: 817 </p><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id438353"></a>Linux/FreeBSD-Specific PAM Configuration</h5></div></div></div><p> 818 <a class="indexterm" name="id438361"></a> 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: 873 820 </p><pre class="programlisting"> 874 821 auth required /lib/security/pam_stack.so service=system-auth 875 822 account required /lib/security/pam_stack.so service=system-auth 876 </pre><p> 877 <a class="indexterm" name="id414755"></a> 878 <a class="indexterm" name="id414761"></a> 879 <a class="indexterm" name="id414768"></a> 880 <a class="indexterm" name="id414775"></a> 881 <a class="indexterm" name="id414782"></a> 882 <a class="indexterm" name="id414789"></a> 883 <a class="indexterm" name="id414795"></a> 884 <a class="indexterm" name="id414802"></a> 885 <a class="indexterm" name="id414809"></a> 886 The other services that I modified to allow the use of Winbind 887 as an authentication service were the normal login on the console (or a terminal 888 session), telnet logins, and ftp service. In order to enable these 889 services, you may first need to change the entries in 890 <code class="filename">/etc/xinetd.d</code> (or <code class="filename">/etc/inetd.conf</code>). 891 Red Hat Linux 7.1 and later uses the new xinetd.d structure, in this case you need 892 to change the lines in <code class="filename">/etc/xinetd.d/telnet</code> 893 and <code class="filename">/etc/xinetd.d/wu-ftp</code> from 823 </pre><p> 824 <a class="indexterm" name="id438383"></a> 825 <a class="indexterm" name="id438390"></a> 826 <a class="indexterm" name="id438397"></a> 827 <a class="indexterm" name="id438403"></a> 828 <a class="indexterm" name="id438410"></a> 829 <a class="indexterm" name="id438417"></a> 830 <a class="indexterm" name="id438424"></a> 831 <a class="indexterm" name="id438431"></a> 832 <a class="indexterm" name="id438437"></a> 833 The other services that I modified to allow the use of Winbind as an authentication service were the normal 834 login on the console (or a terminal session), telnet logins, and ftp service. In order to enable these 835 services, you may first need to change the entries in <code class="filename">/etc/xinetd.d</code> (or 836 <code class="filename">/etc/inetd.conf</code>). Red Hat Linux 7.1 and later uses the new xinetd.d structure, in this 837 case you need to change the lines in <code class="filename">/etc/xinetd.d/telnet</code> and 838 <code class="filename">/etc/xinetd.d/wu-ftp</code> from: 894 839 </p><pre class="programlisting"> 895 840 enable = no … … 898 843 </p><pre class="programlisting"> 899 844 enable = yes 900 </pre><p> 901 <a class="indexterm" name="id414857"></a> 902 <a class="indexterm" name="id414864"></a> 903 <a class="indexterm" name="id414870"></a> 904 For ftp services to work properly, you will also need to either 905 have individual directories for the domain users already present on 906 the server or change the home directory template to a general 907 directory for all domain users. These can be easily set using 908 the <code class="filename">smb.conf</code> global entry 909 <a class="indexterm" name="id414886"></a>template homedir. 845 </pre><p> 846 <a class="indexterm" name="id438485"></a> 847 <a class="indexterm" name="id438492"></a> 848 <a class="indexterm" name="id438499"></a> 849 For ftp services to work properly, you will also need to either have individual directories for the domain 850 users already present on the server or change the home directory template to a general directory for all 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">template homedir</a>. 910 852 </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> 911 <a class="indexterm" name="id4 14897"></a>912 The directory in <a class=" indexterm" name="id414904"></a>template homediris not created automatically! Use pam_mkhomedir or853 <a class="indexterm" name="id438530"></a> 854 The directory in <a class="link" href="smb.conf.5.html#TEMPLATEHOMEDIR">template homedir</a> is not created automatically! Use pam_mkhomedir or 913 855 pre-create the directories of users to make sure users can log in on UNIX with their own home directory. 914 856 </p></div><p> 915 <a class="indexterm" name="id414916"></a> 916 <a class="indexterm" name="id414922"></a> 917 <a class="indexterm" name="id414929"></a> 918 The <code class="filename">/etc/pam.d/ftp</code> file can be changed 919 to allow Winbind ftp access in a manner similar to the 920 samba file. My <code class="filename">/etc/pam.d/ftp</code> file was 921 changed to look like this: 857 <a class="indexterm" name="id438552"></a> 858 <a class="indexterm" name="id438558"></a> 859 <a class="indexterm" name="id438565"></a> 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 the samba file. My <code class="filename">/etc/pam.d/ftp</code> file was changed to look like this: 922 862 </p><pre class="programlisting"> 923 863 auth required /lib/security/pam_listfile.so item=user sense=deny \ … … 930 870 session required /lib/security/pam_stack.so service=system-auth 931 871 </pre><p> 932 <a class="indexterm" name="id414961"></a> 933 The <code class="filename">/etc/pam.d/login</code> file can be changed in nearly the 934 same way. It now looks like this: 872 <a class="indexterm" name="id438597"></a> 873 The <code class="filename">/etc/pam.d/login</code> file can be changed in nearly the same way. It now looks like this: 935 874 </p><pre class="programlisting"> 936 875 auth required /lib/security/pam_securetty.so … … 945 884 session optional /lib/security/pam_console.so 946 885 </pre><p> 947 <a class="indexterm" name="id414985"></a> 948 <a class="indexterm" name="id414992"></a> 949 <a class="indexterm" name="id414999"></a> 950 In this case, I added the </p><pre class="programlisting">auth sufficient /lib/security/pam_winbind.so</pre><p> 951 lines as before, but also added the </p><pre class="programlisting">required pam_securetty.so</pre><p> 952 above it to disallow root logins over the network. I also added a 953 </p><pre class="programlisting">sufficient /lib/security/pam_unix.so use_first_pass</pre><p> 954 line after the <code class="literal">winbind.so</code> line to get rid of annoying 886 <a class="indexterm" name="id438621"></a> 887 <a class="indexterm" name="id438628"></a> 888 <a class="indexterm" name="id438635"></a> 889 In this case, I added the </p><pre class="programlisting">auth sufficient /lib/security/pam_winbind.so</pre><p> lines 890 as before, but also added the </p><pre class="programlisting">required pam_securetty.so</pre><p> above it to disallow 891 root logins over the network. I also added a </p><pre class="programlisting">sufficient /lib/security/pam_unix.so 892 use_first_pass</pre><p> line after the <code class="literal">winbind.so</code> line to get rid of annoying 955 893 double prompts for passwords. 956 </p></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id4 15034"></a>Solaris-Specific Configuration</h5></div></div></div><p>957 <a class="indexterm" name="id4 15042"></a>958 <a class="indexterm" name="id4 15048"></a>894 </p></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id438670"></a>Solaris-Specific Configuration</h5></div></div></div><p> 895 <a class="indexterm" name="id438677"></a> 896 <a class="indexterm" name="id438684"></a> 959 897 The <code class="filename">/etc/pam.conf</code> needs to be changed. I changed this file so my Domain 960 898 users can log on both locally as well as with telnet. The following are the changes … … 974 912 # 975 913 login auth required /usr/lib/security/pam_winbind.so 976 login auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass 977 login auth required /usr/lib/security/$ISA/pam_dial_auth.so.1 try_first_pass 914 login auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass 915 login auth required /usr/lib/security/$ISA/pam_dial_auth.so.1 try_first_pass 978 916 # 979 917 rlogin auth sufficient /usr/lib/security/pam_winbind.so … … 991 929 # 992 930 login account sufficient /usr/lib/security/pam_winbind.so 993 login account requisite /usr/lib/security/$ISA/pam_roles.so.1 994 login account required /usr/lib/security/$ISA/pam_unix.so.1 931 login account requisite /usr/lib/security/$ISA/pam_roles.so.1 932 login account required /usr/lib/security/$ISA/pam_unix.so.1 995 933 # 996 934 dtlogin account sufficient /usr/lib/security/pam_winbind.so 997 dtlogin account requisite /usr/lib/security/$ISA/pam_roles.so.1 998 dtlogin account required /usr/lib/security/$ISA/pam_unix.so.1 935 dtlogin account requisite /usr/lib/security/$ISA/pam_roles.so.1 936 dtlogin account required /usr/lib/security/$ISA/pam_unix.so.1 999 937 # 1000 938 other account sufficient /usr/lib/security/pam_winbind.so 1001 other account requisite /usr/lib/security/$ISA/pam_roles.so.1 1002 other account required /usr/lib/security/$ISA/pam_unix.so.1 939 other account requisite /usr/lib/security/$ISA/pam_roles.so.1 940 other account required /usr/lib/security/$ISA/pam_unix.so.1 1003 941 # 1004 942 # Session management 1005 943 # 1006 other session required /usr/lib/security/$ISA/pam_unix.so.1 944 other session required /usr/lib/security/$ISA/pam_unix.so.1 1007 945 # 1008 946 # Password management 1009 947 # 1010 948 #other password sufficient /usr/lib/security/pam_winbind.so 1011 other password required /usr/lib/security/$ISA/pam_unix.so.1 949 other password required /usr/lib/security/$ISA/pam_unix.so.1 1012 950 dtsession auth required /usr/lib/security/$ISA/pam_unix.so.1 1013 951 # … … 1023 961 #other password optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass 1024 962 </pre><p> 1025 <a class="indexterm" name="id4 15117"></a>963 <a class="indexterm" name="id438753"></a> 1026 964 I also added a <em class="parameter"><code>try_first_pass</code></em> line after the <code class="filename">winbind.so</code> 1027 965 line to get rid of annoying double prompts for passwords. … … 1029 967 Now restart your Samba and try connecting through your application that you 1030 968 configured in the pam.conf. 1031 </p></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id415146"></a>Conclusion</h2></div></div></div><p> 1032 <a class="indexterm" name="id415154"></a> 1033 <a class="indexterm" name="id415160"></a> 1034 <a class="indexterm" name="id415167"></a> 1035 <a class="indexterm" name="id415174"></a> 1036 <a class="indexterm" name="id415180"></a> 1037 The Winbind system, through the use of the NSS, PAMs, and appropriate 1038 Microsoft RPC calls, have allowed us to provide seamless 1039 integration of Microsoft Windows NT domain users on a 1040 UNIX system. The result is a great reduction in the administrative 1041 cost of running a mixed UNIX and NT network.</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id415192"></a>Common Errors</h2></div></div></div><p>Winbind has a number of limitations in its current 1042 released version that we hope to overcome in future 1043 releases:</p><div class="itemizedlist"><ul type="disc"><li><p>Winbind is currently only available for 1044 the Linux, Solaris, AIX, and IRIX operating systems, although ports to other operating 1045 systems are certainly possible. For such ports to be feasible, 1046 we require the C library of the target operating system to 1047 support the NSS and PAM 1048 systems. This is becoming more common as NSS and 1049 PAM gain support among UNIX vendors.</p></li><li><p>The mappings of Windows NT RIDs to UNIX IDs 1050 is not made algorithmically and depends on the order in which 1051 unmapped users or groups are seen by Winbind. It may be difficult 1052 to recover the mappings of RID to UNIX ID if the file 1053 containing this information is corrupted or destroyed.</p></li><li><p>Currently the Winbind PAM module does not take 1054 into account possible workstation and logon time restrictions 1055 that may be set for Windows NT users; this is 1056 instead up to the PDC to enforce.</p></li></ul></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id415226"></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> 969 </p></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id438782"></a>Conclusion</h2></div></div></div><p> 970 <a class="indexterm" name="id438789"></a> 971 <a class="indexterm" name="id438796"></a> 972 <a class="indexterm" name="id438803"></a> 973 <a class="indexterm" name="id438809"></a> 974 <a class="indexterm" name="id438816"></a> 975 The Winbind system, through the use of the NSS, PAMs, and appropriate Microsoft RPC calls, have allowed us to 976 provide seamless integration of Microsoft Windows NT domain users on a UNIX system. The result is a great 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="id438828"></a>Common Errors</h2></div></div></div><p> 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> 981 Winbind is currently only available for the Linux, Solaris, AIX, and IRIX operating systems, although 982 ports to other operating systems are certainly possible. For such ports to be feasible, we require the C 983 library of the target operating system to support the NSS and PAM systems. This is becoming more common as NSS 984 and PAM gain support among UNIX vendors. 985 </p></li><li><p> 986 The mappings of Windows NT RIDs to UNIX IDs is not made algorithmically and depends on the order in 987 which unmapped users or groups are seen by Winbind. It may be difficult to recover the mappings of RID to UNIX 988 ID if the file containing this information is corrupted or destroyed. 989 </p></li><li><p> 990 Currently the Winbind PAM module does not take into account possible workstation and logon time 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="id438861"></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> 1057 993 Do not under any circumstances run <code class="literal">nscd</code> on any system 1058 994 on which <code class="literal">winbindd</code> is running. … … 1061 997 even though NSSWITCH is correctly configured, it will not be possible to resolve 1062 998 domain users and groups for file and directory controls. 1063 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id415261"></a>Winbind Is Not Resolving Users and Groups</h3></div></div></div><p>“<span class="quote"> 1064 My <code class="filename">smb.conf</code> file is correctly configured. I have specified 1065 <a class="indexterm" name="id415276"></a>idmap uid = 12000, 1066 and <a class="indexterm" name="id415284"></a>idmap gid = 3000-3500 1067 and <code class="literal">winbind</code> is running. When I do the following, it all works fine. 999 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id438895"></a>Winbind Is Not Resolving Users and Groups</h3></div></div></div><p>“<span class="quote"> 1000 My <code class="filename">smb.conf</code> file is correctly configured. I have specified <a class="link" href="smb.conf.5.html#IDMAPUID">idmap uid = 12000</a>, 1001 and <a class="link" href="smb.conf.5.html#IDMAPGID">idmap gid = 3000-3500</a> and <code class="literal">winbind</code> is running. 1002 When I do the following, it all works fine. 1068 1003 </span>”</p><pre class="screen"> 1069 1004 <code class="prompt">root# </code><strong class="userinput"><code>wbinfo -u</code></strong> … … 1099 1034 Your system is likely running <code class="literal">nscd</code>, the name service 1100 1035 caching daemon. Shut it down, do not restart it! You will find your problem resolved. 1036 Alternately, fix the operation of nscd to resolve the problem. 1101 1037 </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="VFS.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="optional.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="AdvancedNetworkManagement.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 23. Stackable VFS modules </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 25. Advanced Network Management</td></tr></table></div></body></html>
Note:
See TracChangeset
for help on using the changeset viewer.