summaryrefslogtreecommitdiff
path: root/docs/htmldocs/Samba3-HOWTO/passdb.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/htmldocs/Samba3-HOWTO/passdb.html')
-rw-r--r--docs/htmldocs/Samba3-HOWTO/passdb.html692
1 files changed, 346 insertions, 346 deletions
diff --git a/docs/htmldocs/Samba3-HOWTO/passdb.html b/docs/htmldocs/Samba3-HOWTO/passdb.html
index e9c03c8585..5b37dd3d20 100644
--- a/docs/htmldocs/Samba3-HOWTO/passdb.html
+++ b/docs/htmldocs/Samba3-HOWTO/passdb.html
@@ -1,17 +1,17 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 11. Account Information Databases</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.1"><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="NetworkBrowsing.html" title="Chapter 10. Network Browsing"><link rel="next" href="groupmapping.html" title="Chapter 12. Group Mapping: MS Windows and UNIX"></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 11. Account Information Databases</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="NetworkBrowsing.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="groupmapping.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="passdb"></a>Chapter 11. Account Information Databases</h2></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">&lt;<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</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">&lt;<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Gerald</span> <span class="othername">(Jerry)</span> <span class="surname">Carter</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jerry@samba.org">jerry@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Jeremy</span> <span class="surname">Allison</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jra@samba.org">jra@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Guenther</span> <span class="surname">Deschner</span></h3><span class="contrib">LDAP updates</span> <div class="affiliation"><span class="orgname">SuSE<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:gd@suse.de">gd@suse.de</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Olivier (lem)</span> <span class="surname">Lemaire</span></h3><div class="affiliation"><span class="orgname">IDEALX<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:olem@IDEALX.org">olem@IDEALX.org</a>&gt;</code></p></div></div></div></div><div><p class="pubdate">May 24, 2003</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="passdb.html#id2580280">Features and Benefits</a></span></dt><dd><dl><dt><span class="sect2"><a href="passdb.html#id2580316">Backward Compatibility Account Storage Systems</a></span></dt><dt><span class="sect2"><a href="passdb.html#id2580500">New Account Storage Systems</a></span></dt></dl></dd><dt><span class="sect1"><a href="passdb.html#passdbtech">Technical Information</a></span></dt><dd><dl><dt><span class="sect2"><a href="passdb.html#id2581068">Important Notes About Security</a></span></dt><dt><span class="sect2"><a href="passdb.html#id2581588">Mapping User Identifiers between MS Windows and UNIX</a></span></dt><dt><span class="sect2"><a href="passdb.html#idmapbackend">Mapping Common UIDs/GIDs on Distributed Machines</a></span></dt><dt><span class="sect2"><a href="passdb.html#id2582136">Comments Regarding LDAP</a></span></dt><dt><span class="sect2"><a href="passdb.html#id2582548">LDAP Directories and Windows Computer Accounts</a></span></dt></dl></dd><dt><span class="sect1"><a href="passdb.html#acctmgmttools">Account Management Tools</a></span></dt><dd><dl><dt><span class="sect2"><a href="passdb.html#id2582989">The <code class="literal">smbpasswd</code> Tool</a></span></dt><dt><span class="sect2"><a href="passdb.html#pdbeditthing">The <code class="literal">pdbedit</code> Tool</a></span></dt></dl></dd><dt><span class="sect1"><a href="passdb.html#id2585525">Password Backends</a></span></dt><dd><dl><dt><span class="sect2"><a href="passdb.html#id2585579">Plaintext</a></span></dt><dt><span class="sect2"><a href="passdb.html#id2585655">smbpasswd: Encrypted Password Database</a></span></dt><dt><span class="sect2"><a href="passdb.html#id2585920">tdbsam</a></span></dt><dt><span class="sect2"><a href="passdb.html#id2586078">ldapsam</a></span></dt></dl></dd><dt><span class="sect1"><a href="passdb.html#id2588612">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="passdb.html#id2588618">Users Cannot Logon</a></span></dt><dt><span class="sect2"><a href="passdb.html#id2588655">Configuration of <em class="parameter"><code>auth methods</code></em></a></span></dt></dl></dd></dl></div><p>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 11. Account Information Databases</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.1"><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="NetworkBrowsing.html" title="Chapter 10. Network Browsing"><link rel="next" href="groupmapping.html" title="Chapter 12. Group Mapping: MS Windows and UNIX"></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 11. Account Information Databases</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="NetworkBrowsing.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="groupmapping.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="passdb"></a>Chapter 11. Account Information Databases</h2></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">&lt;<a class="email" href="mailto:jelmer@samba.org">jelmer@samba.org</a>&gt;</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">&lt;<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Gerald</span> <span class="othername">(Jerry)</span> <span class="surname">Carter</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jerry@samba.org">jerry@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Jeremy</span> <span class="surname">Allison</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jra@samba.org">jra@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Guenther</span> <span class="surname">Deschner</span></h3><span class="contrib">LDAP updates</span> <div class="affiliation"><span class="orgname">SuSE<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:gd@suse.de">gd@suse.de</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Olivier (lem)</span> <span class="surname">Lemaire</span></h3><div class="affiliation"><span class="orgname">IDEALX<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:olem@IDEALX.org">olem@IDEALX.org</a>&gt;</code></p></div></div></div></div><div><p class="pubdate">May 24, 2003</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="passdb.html#id2580281">Features and Benefits</a></span></dt><dd><dl><dt><span class="sect2"><a href="passdb.html#id2580317">Backward Compatibility Account Storage Systems</a></span></dt><dt><span class="sect2"><a href="passdb.html#id2580501">New Account Storage Systems</a></span></dt></dl></dd><dt><span class="sect1"><a href="passdb.html#passdbtech">Technical Information</a></span></dt><dd><dl><dt><span class="sect2"><a href="passdb.html#id2581069">Important Notes About Security</a></span></dt><dt><span class="sect2"><a href="passdb.html#id2581588">Mapping User Identifiers between MS Windows and UNIX</a></span></dt><dt><span class="sect2"><a href="passdb.html#idmapbackend">Mapping Common UIDs/GIDs on Distributed Machines</a></span></dt><dt><span class="sect2"><a href="passdb.html#id2582137">Comments Regarding LDAP</a></span></dt><dt><span class="sect2"><a href="passdb.html#id2582549">LDAP Directories and Windows Computer Accounts</a></span></dt></dl></dd><dt><span class="sect1"><a href="passdb.html#acctmgmttools">Account Management Tools</a></span></dt><dd><dl><dt><span class="sect2"><a href="passdb.html#id2582990">The <code class="literal">smbpasswd</code> Tool</a></span></dt><dt><span class="sect2"><a href="passdb.html#pdbeditthing">The <code class="literal">pdbedit</code> Tool</a></span></dt></dl></dd><dt><span class="sect1"><a href="passdb.html#id2585526">Password Backends</a></span></dt><dd><dl><dt><span class="sect2"><a href="passdb.html#id2585579">Plaintext</a></span></dt><dt><span class="sect2"><a href="passdb.html#id2585655">smbpasswd: Encrypted Password Database</a></span></dt><dt><span class="sect2"><a href="passdb.html#id2585921">tdbsam</a></span></dt><dt><span class="sect2"><a href="passdb.html#id2586079">ldapsam</a></span></dt></dl></dd><dt><span class="sect1"><a href="passdb.html#id2588612">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="passdb.html#id2588618">Users Cannot Logon</a></span></dt><dt><span class="sect2"><a href="passdb.html#id2588656">Configuration of <em class="parameter"><code>auth methods</code></em></a></span></dt></dl></dd></dl></div><p>
<a class="indexterm" name="id2580083"></a>
<a class="indexterm" name="id2580090"></a>
-<a class="indexterm" name="id2580096"></a>
-<a class="indexterm" name="id2580103"></a>
+<a class="indexterm" name="id2580097"></a>
+<a class="indexterm" name="id2580104"></a>
Early releases of Samba-3 implemented new capability to work concurrently with multiple account backends. This
capability was removed beginning with release of Samba 3.0.23. Commencing with Samba 3.0.23 it is possible to
work with only one specified passwd backend.
</p><p>
<a class="indexterm" name="id2580118"></a>
-<a class="indexterm" name="id2580124"></a>
-<a class="indexterm" name="id2580131"></a>
-<a class="indexterm" name="id2580138"></a>
-<a class="indexterm" name="id2580145"></a>
+<a class="indexterm" name="id2580125"></a>
+<a class="indexterm" name="id2580132"></a>
+<a class="indexterm" name="id2580139"></a>
+<a class="indexterm" name="id2580146"></a>
<a class="indexterm" name="id2580152"></a>
The three passdb backends that are fully maintained (actively supported) by the Samba Team are:
<code class="literal">smbpasswd</code> (being obsoleted), <code class="literal">tdbsam</code> (a tdb-based binary file format),
@@ -23,30 +23,30 @@ In a strict sense, there are three supported account storage and access systems.
obsolete (smbpasswd). It is recommended to use the <code class="literal">tdbsam</code> method for all simple systems. Use
<code class="literal">ldapsam</code> for larger and more complex networks.
</p><p>
-<a class="indexterm" name="id2580222"></a>
-<a class="indexterm" name="id2580229"></a>
-<a class="indexterm" name="id2580236"></a>
-<a class="indexterm" name="id2580243"></a>
-<a class="indexterm" name="id2580250"></a>
-<a class="indexterm" name="id2580257"></a>
-<a class="indexterm" name="id2580264"></a>
+<a class="indexterm" name="id2580223"></a>
+<a class="indexterm" name="id2580230"></a>
+<a class="indexterm" name="id2580237"></a>
+<a class="indexterm" name="id2580244"></a>
+<a class="indexterm" name="id2580251"></a>
+<a class="indexterm" name="id2580258"></a>
+<a class="indexterm" name="id2580265"></a>
In a strict and literal sense, the passdb backends are account storage mechanisms (or methods) alone. The choice
of terminology can be misleading, however we are stuck with this choice of wording. This chapter documents the
nature of the account storage system with a focus on user and trust accounts. Trust accounts have two forms,
machine trust accounts (computer accounts) and interdomain trust accounts. These are all treated as user-like
entities.
-</p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2580280"></a>Features and Benefits</h2></div></div></div><p>
+</p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2580281"></a>Features and Benefits</h2></div></div></div><p>
Samba-3 provides for complete backward compatibility with Samba-2.2.x functionality
as follows:
<a class="indexterm" name="id2580290"></a>
-<a class="indexterm" name="id2580299"></a>
-<a class="indexterm" name="id2580308"></a>
-</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2580316"></a>Backward Compatibility Account Storage Systems</h3></div></div></div><div class="variablelist"><dl><dt><span class="term">Plaintext</span></dt><dd><p>
+<a class="indexterm" name="id2580300"></a>
+<a class="indexterm" name="id2580309"></a>
+</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2580317"></a>Backward Compatibility Account Storage Systems</h3></div></div></div><div class="variablelist"><dl><dt><span class="term">Plaintext</span></dt><dd><p>
<a class="indexterm" name="id2580334"></a>
-<a class="indexterm" name="id2580340"></a>
-<a class="indexterm" name="id2580347"></a>
-<a class="indexterm" name="id2580354"></a>
-<a class="indexterm" name="id2580361"></a>
+<a class="indexterm" name="id2580341"></a>
+<a class="indexterm" name="id2580348"></a>
+<a class="indexterm" name="id2580355"></a>
+<a class="indexterm" name="id2580362"></a>
This isn't really a backend at all, but is listed here for simplicity. Samba can be configured to pass
plaintext authentication requests to the traditional UNIX/Linux <code class="filename">/etc/passwd</code> and
<code class="filename">/etc/shadow</code>-style subsystems. On systems that have Pluggable Authentication Modules
@@ -54,10 +54,10 @@ as follows:
protocol limitations imposed by MS Windows clients apply likewise. Please refer to <a class="link" href="passdb.html#passdbtech" title="Technical Information">Technical Information</a>, for more information regarding the limitations of plaintext
password usage.
</p></dd><dt><span class="term">smbpasswd</span></dt><dd><p>
-<a class="indexterm" name="id2580408"></a>
-<a class="indexterm" name="id2580415"></a>
-<a class="indexterm" name="id2580422"></a>
-<a class="indexterm" name="id2580429"></a>
+<a class="indexterm" name="id2580409"></a>
+<a class="indexterm" name="id2580416"></a>
+<a class="indexterm" name="id2580423"></a>
+<a class="indexterm" name="id2580430"></a>
This option allows continued use of the <code class="filename">smbpasswd</code>
file that maintains a plain ASCII (text) layout that includes the MS Windows
LanMan and NT-encrypted passwords as well as a field that stores some
@@ -69,28 +69,28 @@ as follows:
This backend should be used only for backward compatibility with older
versions of Samba. It may be deprecated in future releases.
</p></dd><dt><span class="term">ldapsam_compat (Samba-2.2 LDAP Compatibility)</span></dt><dd><p>
-<a class="indexterm" name="id2580468"></a>
-<a class="indexterm" name="id2580475"></a>
-<a class="indexterm" name="id2580482"></a>
+<a class="indexterm" name="id2580469"></a>
+<a class="indexterm" name="id2580476"></a>
+<a class="indexterm" name="id2580483"></a>
There is a password backend option that allows continued operation with
an existing OpenLDAP backend that uses the Samba-2.2.x LDAP schema extension.
This option is provided primarily as a migration tool, although there is
no reason to force migration at this time. This tool will eventually
be deprecated.
- </p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2580500"></a>New Account Storage Systems</h3></div></div></div><p>
+ </p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2580501"></a>New Account Storage Systems</h3></div></div></div><p>
Samba-3 introduces a number of new password backend capabilities.
-<a class="indexterm" name="id2580509"></a>
-<a class="indexterm" name="id2580518"></a>
+<a class="indexterm" name="id2580510"></a>
+<a class="indexterm" name="id2580519"></a>
</p><div class="variablelist"><dl><dt><span class="term">tdbsam</span></dt><dd><p>
<a class="indexterm" name="id2580540"></a>
<a class="indexterm" name="id2580547"></a>
-<a class="indexterm" name="id2580553"></a>
+<a class="indexterm" name="id2580554"></a>
This backend provides a rich database backend for local servers. This
backend is not suitable for multiple domain controllers (i.e., PDC + one
or more BDC) installations.
</p><p>
-<a class="indexterm" name="id2580566"></a>
-<a class="indexterm" name="id2580573"></a>
+<a class="indexterm" name="id2580567"></a>
+<a class="indexterm" name="id2580574"></a>
<a class="indexterm" name="id2580580"></a>
<a class="indexterm" name="id2580587"></a>
<a class="indexterm" name="id2580594"></a>
@@ -102,22 +102,22 @@ Samba-3 introduces a number of new password backend capabilities.
to implement the same account and system access controls that are possible
with MS Windows NT4/200x-based systems.
</p><p>
-<a class="indexterm" name="id2580624"></a>
-<a class="indexterm" name="id2580631"></a>
-<a class="indexterm" name="id2580638"></a>
+<a class="indexterm" name="id2580625"></a>
+<a class="indexterm" name="id2580632"></a>
+<a class="indexterm" name="id2580639"></a>
The inclusion of the <span class="emphasis"><em>tdbsam</em></span> capability is a direct
response to user requests to allow simple site operation without the overhead
of the complexities of running OpenLDAP. It is recommended to use this only
for sites that have fewer than 250 users. For larger sites or implementations,
the use of OpenLDAP or of Active Directory integration is strongly recommended.
</p></dd><dt><span class="term">ldapsam</span></dt><dd><p>
-<a class="indexterm" name="id2580666"></a>
+<a class="indexterm" name="id2580667"></a>
<a class="indexterm" name="id2580674"></a>
This provides a rich directory backend for distributed account installation.
</p><p>
-<a class="indexterm" name="id2580685"></a>
-<a class="indexterm" name="id2580692"></a>
-<a class="indexterm" name="id2580699"></a>
+<a class="indexterm" name="id2580686"></a>
+<a class="indexterm" name="id2580693"></a>
+<a class="indexterm" name="id2580700"></a>
<a class="indexterm" name="id2580706"></a>
<a class="indexterm" name="id2580713"></a>
Samba-3 has a new and extended LDAP implementation that requires configuration
@@ -135,30 +135,30 @@ Samba-3 introduces a number of new password backend capabilities.
much more. Corporate sites will see that the Samba Team has listened to their
requests both for capability and greater scalability.
</p></dd></dl></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="passdbtech"></a>Technical Information</h2></div></div></div><p>
-<a class="indexterm" name="id2580797"></a>
+<a class="indexterm" name="id2580798"></a>
<a class="indexterm" name="id2580804"></a>
Old Windows clients send plaintext passwords over the wire. Samba can check these
passwords by encrypting them and comparing them to the hash stored in the UNIX user database.
</p><p>
-<a class="indexterm" name="id2580817"></a>
-<a class="indexterm" name="id2580824"></a>
-<a class="indexterm" name="id2580831"></a>
+<a class="indexterm" name="id2580818"></a>
+<a class="indexterm" name="id2580825"></a>
+<a class="indexterm" name="id2580832"></a>
<a class="indexterm" name="id2580838"></a>
Newer Windows clients send encrypted passwords (LanMan and NT hashes) instead of plaintext passwords over
the wire. The newest clients will send only encrypted passwords and refuse to send plaintext passwords unless
their registry is tweaked.
</p><p>
-<a class="indexterm" name="id2580852"></a>
-<a class="indexterm" name="id2580859"></a>
+<a class="indexterm" name="id2580853"></a>
+<a class="indexterm" name="id2580860"></a>
Many people ask why Samba cannot simply use the UNIX password database. Windows requires
passwords that are encrypted in its own format. The UNIX passwords can't be converted to
UNIX-style encrypted passwords. Because of that, you can't use the standard UNIX user
database, and you have to store the LanMan and NT hashes somewhere else.
</p><p>
-<a class="indexterm" name="id2580875"></a>
-<a class="indexterm" name="id2580882"></a>
-<a class="indexterm" name="id2580889"></a>
-<a class="indexterm" name="id2580896"></a>
+<a class="indexterm" name="id2580876"></a>
+<a class="indexterm" name="id2580883"></a>
+<a class="indexterm" name="id2580890"></a>
+<a class="indexterm" name="id2580897"></a>
In addition to differently encrypted passwords, Windows also stores certain data for each
user that is not stored in a UNIX user database: for example, workstations the user may logon from,
the location where the user's profile is stored, and so on. Samba retrieves and stores this
@@ -167,17 +167,17 @@ Samba-3 introduces a number of new password backend capabilities.
<a class="link" href="smb.conf.5.html#PASSDBBACKEND">passdb backend</a> parameter.
</p><div class="figure"><a name="idmap-sid2uid"></a><p class="title"><b>Figure 11.1. IDMAP: Resolution of SIDs to UIDs.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/idmap-sid2uid.png" width="216" alt="IDMAP: Resolution of SIDs to UIDs."></div></div></div><br class="figure-break"><p>
<a class="indexterm" name="id2580986"></a>
-<a class="indexterm" name="id2580992"></a>
+<a class="indexterm" name="id2580993"></a>
<a class="indexterm" name="id2580999"></a>
The resolution of SIDs to UIDs is fundamental to correct operation of Samba. In both cases shown, if winbindd
is not running or cannot be contacted, then only local SID/UID resolution is possible. See <a class="link" href="passdb.html#idmap-sid2uid" title="Figure 11.1. IDMAP: Resolution of SIDs to UIDs.">resolution of SIDs to UIDs</a> and <a class="link" href="passdb.html#idmap-uid2sid" title="Figure 11.2. IDMAP: Resolution of UIDs to SIDs.">resolution of UIDs
to SIDs</a> diagrams.
- </p><div class="figure"><a name="idmap-uid2sid"></a><p class="title"><b>Figure 11.2. IDMAP: Resolution of UIDs to SIDs.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/idmap-uid2sid.png" width="270" alt="IDMAP: Resolution of UIDs to SIDs."></div></div></div><br class="figure-break"><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2581068"></a>Important Notes About Security</h3></div></div></div><p>
-<a class="indexterm" name="id2581076"></a>
-<a class="indexterm" name="id2581083"></a>
-<a class="indexterm" name="id2581090"></a>
-<a class="indexterm" name="id2581097"></a>
-<a class="indexterm" name="id2581104"></a>
+ </p><div class="figure"><a name="idmap-uid2sid"></a><p class="title"><b>Figure 11.2. IDMAP: Resolution of UIDs to SIDs.</b></p><div class="figure-contents"><div class="mediaobject"><img src="images/idmap-uid2sid.png" width="270" alt="IDMAP: Resolution of UIDs to SIDs."></div></div></div><br class="figure-break"><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2581069"></a>Important Notes About Security</h3></div></div></div><p>
+<a class="indexterm" name="id2581077"></a>
+<a class="indexterm" name="id2581084"></a>
+<a class="indexterm" name="id2581091"></a>
+<a class="indexterm" name="id2581098"></a>
+<a class="indexterm" name="id2581105"></a>
The UNIX and SMB password encryption techniques seem similar on the surface. This
similarity is, however, only skin deep. The UNIX scheme typically sends clear-text
passwords over the network when logging in. This is bad. The SMB encryption scheme
@@ -192,69 +192,69 @@ Samba-3 introduces a number of new password backend capabilities.
be protected accordingly.
</p><p>
<a class="indexterm" name="id2581134"></a>
-<a class="indexterm" name="id2581140"></a>
+<a class="indexterm" name="id2581141"></a>
<a class="indexterm" name="id2581147"></a>
Ideally, we would like a password scheme that involves neither plaintext passwords
on the network nor plaintext passwords on disk. Unfortunately, this is not available because Samba is stuck with
having to be compatible with other SMB systems (Windows NT, Windows for Workgroups, Windows 9x/Me).
</p><p>
-<a class="indexterm" name="id2581162"></a>
-<a class="indexterm" name="id2581169"></a>
+<a class="indexterm" name="id2581163"></a>
+<a class="indexterm" name="id2581170"></a>
Windows NT 4.0 Service Pack 3 changed the default setting so plaintext passwords
are disabled from being sent over the wire. This mandates either the use of encrypted
password support or editing the Windows NT registry to re-enable plaintext passwords.
</p><p>
<a class="indexterm" name="id2581184"></a>
-<a class="indexterm" name="id2581190"></a>
+<a class="indexterm" name="id2581191"></a>
The following versions of Microsoft Windows do not support full domain security protocols,
although they may log onto a domain environment:
</p><div class="itemizedlist"><ul type="disc"><li><p>MS DOS Network client 3.0 with the basic network redirector installed.</p></li><li><p>Windows 95 with the network redirector update installed.</p></li><li><p>Windows 98 [Second Edition].</p></li><li><p>Windows Me.</p></li></ul></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
-<a class="indexterm" name="id2581229"></a>
+<a class="indexterm" name="id2581230"></a>
<a class="indexterm" name="id2581236"></a>
<a class="indexterm" name="id2581243"></a>
MS Windows XP Home does not have facilities to become a domain member, and it cannot participate in domain logons.
</p></div><p>
The following versions of MS Windows fully support domain security protocols.
</p><div class="itemizedlist"><ul type="disc"><li><p>Windows NT 3.5x.</p></li><li><p>Windows NT 4.0.</p></li><li><p>Windows 2000 Professional.</p></li><li><p>Windows 200x Server/Advanced Server.</p></li><li><p>Windows XP Professional.</p></li></ul></div><p>
-<a class="indexterm" name="id2581288"></a>
+<a class="indexterm" name="id2581289"></a>
<a class="indexterm" name="id2581295"></a>
<a class="indexterm" name="id2581302"></a>
<a class="indexterm" name="id2581309"></a>
<a class="indexterm" name="id2581316"></a>
-<a class="indexterm" name="id2581322"></a>
+<a class="indexterm" name="id2581323"></a>
All current releases of Microsoft SMB/CIFS clients support authentication via the
SMB challenge/response mechanism described here. Enabling clear-text authentication
does not disable the ability of the client to participate in encrypted authentication.
Instead, it allows the client to negotiate either plaintext or encrypted password
handling.
</p><p>
-<a class="indexterm" name="id2581338"></a>
+<a class="indexterm" name="id2581339"></a>
<a class="indexterm" name="id2581346"></a>
-<a class="indexterm" name="id2581352"></a>
-<a class="indexterm" name="id2581359"></a>
-<a class="indexterm" name="id2581366"></a>
+<a class="indexterm" name="id2581353"></a>
+<a class="indexterm" name="id2581360"></a>
+<a class="indexterm" name="id2581367"></a>
MS Windows clients will cache the encrypted password alone. Where plaintext passwords
are re-enabled through the appropriate registry change, the plaintext password is never
cached. This means that in the event that a network connections should become disconnected
(broken), only the cached (encrypted) password will be sent to the resource server to
effect an auto-reconnect. If the resource server does not support encrypted passwords, the
auto-reconnect will fail. Use of encrypted passwords is strongly advised.
- </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2581383"></a>Advantages of Encrypted Passwords</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>
+ </p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2581384"></a>Advantages of Encrypted Passwords</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>
<a class="indexterm" name="id2581395"></a>
<a class="indexterm" name="id2581402"></a>
<a class="indexterm" name="id2581409"></a>
Plaintext passwords are not passed across the network. Someone using a network sniffer
cannot just record passwords going to the SMB server.
</p></li><li><p>
-<a class="indexterm" name="id2581422"></a>
-<a class="indexterm" name="id2581429"></a>
-<a class="indexterm" name="id2581436"></a>
+<a class="indexterm" name="id2581423"></a>
+<a class="indexterm" name="id2581430"></a>
+<a class="indexterm" name="id2581437"></a>
Plaintext passwords are not stored anywhere in memory or on disk.
</p></li><li><p>
-<a class="indexterm" name="id2581448"></a>
-<a class="indexterm" name="id2581455"></a>
-<a class="indexterm" name="id2581462"></a>
-<a class="indexterm" name="id2581469"></a>
+<a class="indexterm" name="id2581449"></a>
+<a class="indexterm" name="id2581456"></a>
+<a class="indexterm" name="id2581463"></a>
+<a class="indexterm" name="id2581470"></a>
Windows NT does not like talking to a server that does not support encrypted passwords. It will refuse to
browse the server if the server is also in user-level security mode. It will insist on prompting the user for
the password on each connection, which is very annoying. The only thing you can do to stop this is to use SMB
@@ -264,57 +264,57 @@ Samba-3 introduces a number of new password backend capabilities.
<a class="indexterm" name="id2581494"></a>
Encrypted password support allows automatic share (resource) reconnects.
</p></li><li><p>
-<a class="indexterm" name="id2581506"></a>
-<a class="indexterm" name="id2581513"></a>
+<a class="indexterm" name="id2581507"></a>
+<a class="indexterm" name="id2581514"></a>
Encrypted passwords are essential for PDC/BDC operation.
</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2581524"></a>Advantages of Non-Encrypted Passwords</h4></div></div></div><div class="itemizedlist"><ul type="disc"><li><p>
-<a class="indexterm" name="id2581535"></a>
+<a class="indexterm" name="id2581536"></a>
Plaintext passwords are not kept on disk and are not cached in memory.
</p></li><li><p>
-<a class="indexterm" name="id2581548"></a>
+<a class="indexterm" name="id2581549"></a>
<a class="indexterm" name="id2581555"></a>
Plaintext passwords use the same password file as other UNIX services, such as Login and FTP.
</p></li><li><p>
-<a class="indexterm" name="id2581567"></a>
-<a class="indexterm" name="id2581574"></a>
+<a class="indexterm" name="id2581568"></a>
+<a class="indexterm" name="id2581575"></a>
Use of other services (such as Telnet and FTP) that send plaintext passwords over
the network makes sending them for SMB not such a big deal.
</p></li></ul></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2581588"></a>Mapping User Identifiers between MS Windows and UNIX</h3></div></div></div><p>
-<a class="indexterm" name="id2581596"></a>
+<a class="indexterm" name="id2581597"></a>
<a class="indexterm" name="id2581603"></a>
-<a class="indexterm" name="id2581609"></a>
+<a class="indexterm" name="id2581610"></a>
Every operation in UNIX/Linux requires a user identifier (UID), just as in
MS Windows NT4/200x this requires a security identifier (SID). Samba provides
two means for mapping an MS Windows user to a UNIX/Linux UID.
</p><p>
-<a class="indexterm" name="id2581623"></a>
-<a class="indexterm" name="id2581630"></a>
-<a class="indexterm" name="id2581636"></a>
-<a class="indexterm" name="id2581643"></a>
-<a class="indexterm" name="id2581650"></a>
+<a class="indexterm" name="id2581624"></a>
+<a class="indexterm" name="id2581631"></a>
+<a class="indexterm" name="id2581637"></a>
+<a class="indexterm" name="id2581644"></a>
+<a class="indexterm" name="id2581651"></a>
First, all Samba SAM database accounts require a UNIX/Linux UID that the account will map to. As users are
added to the account information database, Samba will call the <a class="link" href="smb.conf.5.html#ADDUSERSCRIPT">add user script</a>
interface to add the account to the Samba host OS. In essence all accounts in the local SAM require a local
user account.
</p><p>
<a class="indexterm" name="id2581679"></a>
- <a class="indexterm" name="id2581685"></a>
+ <a class="indexterm" name="id2581686"></a>
<a class="indexterm" name="id2581692"></a>
- <a class="indexterm" name="id2581698"></a>
- <a class="indexterm" name="id2581705"></a>
+ <a class="indexterm" name="id2581699"></a>
+ <a class="indexterm" name="id2581706"></a>
<a class="indexterm" name="id2581712"></a>
- <a class="indexterm" name="id2581719"></a>
+ <a class="indexterm" name="id2581720"></a>
The second way to map Windows SID to UNIX UID is via the <span class="emphasis"><em>idmap uid</em></span> and
<span class="emphasis"><em>idmap gid</em></span> parameters in <code class="filename">smb.conf</code>. Please refer to the man page for information about
these parameters. These parameters are essential when mapping users from a remote (non-member Windows client
or a member of a foreign domain) SAM server.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="idmapbackend"></a>Mapping Common UIDs/GIDs on Distributed Machines</h3></div></div></div><p>
-<a class="indexterm" name="id2581758"></a>
+<a class="indexterm" name="id2581759"></a>
<a class="indexterm" name="id2581765"></a>
-<a class="indexterm" name="id2581771"></a>
+<a class="indexterm" name="id2581772"></a>
<a class="indexterm" name="id2581778"></a>
-<a class="indexterm" name="id2581785"></a>
-<a class="indexterm" name="id2581791"></a>
+<a class="indexterm" name="id2581786"></a>
+<a class="indexterm" name="id2581792"></a>
Samba-3 has a special facility that makes it possible to maintain identical UIDs and GIDs
on all servers in a distributed network. A distributed network is one where there exists
a PDC, one or more BDCs, and/or one or more domain member servers. Why is this important?
@@ -322,10 +322,10 @@ Samba-3 introduces a number of new password backend capabilities.
users are copying files across UNIX/Linux systems using tools such as <code class="literal">rsync</code>.
</p><p>
<a class="indexterm" name="id2581815"></a>
-<a class="indexterm" name="id2581821"></a>
-<a class="indexterm" name="id2581828"></a>
-<a class="indexterm" name="id2581834"></a>
-<a class="indexterm" name="id2581841"></a>
+<a class="indexterm" name="id2581822"></a>
+<a class="indexterm" name="id2581829"></a>
+<a class="indexterm" name="id2581835"></a>
+<a class="indexterm" name="id2581842"></a>
<a class="indexterm" name="id2581848"></a>
<a class="indexterm" name="id2581855"></a>
<a class="indexterm" name="id2581862"></a>
@@ -335,54 +335,54 @@ Samba-3 introduces a number of new password backend capabilities.
network configurations that also use LDAP for the SAM backend.
<a class="link" href="passdb.html#idmapbackendexample" title="Example 11.1. Example Configuration with the LDAP idmap Backend">Example Configuration with the LDAP idmap Backend</a>
shows that configuration.
- </p><a class="indexterm" name="id2581891"></a><div class="example"><a name="idmapbackendexample"></a><p class="title"><b>Example 11.1. Example Configuration with the LDAP idmap Backend</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><a class="indexterm" name="id2581925"></a><em class="parameter"><code>idmap backend = ldap:ldap://ldap-server.quenya.org:636</code></em></td></tr><tr><td># Alternatively, this could be specified as:</td></tr><tr><td><a class="indexterm" name="id2581941"></a><em class="parameter"><code>idmap backend = ldap:ldaps://ldap-server.quenya.org</code></em></td></tr></table></div></div><br class="example-break"><p>
-<a class="indexterm" name="id2581956"></a>
-<a class="indexterm" name="id2581963"></a>
+ </p><a class="indexterm" name="id2581892"></a><div class="example"><a name="idmapbackendexample"></a><p class="title"><b>Example 11.1. Example Configuration with the LDAP idmap Backend</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><a class="indexterm" name="id2581925"></a><em class="parameter"><code>idmap backend = ldap:ldap://ldap-server.quenya.org:636</code></em></td></tr><tr><td># Alternatively, this could be specified as:</td></tr><tr><td><a class="indexterm" name="id2581942"></a><em class="parameter"><code>idmap backend = ldap:ldaps://ldap-server.quenya.org</code></em></td></tr></table></div></div><br class="example-break"><p>
+<a class="indexterm" name="id2581957"></a>
+<a class="indexterm" name="id2581964"></a>
A network administrator who wants to make significant use of LDAP backends will sooner or later be
exposed to the excellent work done by PADL Software. PADL <a class="ulink" href="http://www.padl.com" target="_top">http://www.padl.com</a> have
produced and released to open source an array of tools that might be of interest. These tools include:
</p><div class="itemizedlist"><ul type="disc"><li><p>
-<a class="indexterm" name="id2581987"></a>
+<a class="indexterm" name="id2581988"></a>
<a class="indexterm" name="id2581994"></a>
-<a class="indexterm" name="id2582000"></a>
-<a class="indexterm" name="id2582007"></a>
+<a class="indexterm" name="id2582001"></a>
+<a class="indexterm" name="id2582008"></a>
<a class="indexterm" name="id2582014"></a>
-<a class="indexterm" name="id2582020"></a>
-<a class="indexterm" name="id2582027"></a>
+<a class="indexterm" name="id2582021"></a>
+<a class="indexterm" name="id2582028"></a>
<a class="indexterm" name="id2582034"></a>
<span class="emphasis"><em>nss_ldap:</em></span> An LDAP name service switch (NSS) module to provide native
name service support for AIX, Linux, Solaris, and other operating systems. This tool
can be used for centralized storage and retrieval of UIDs and GIDs.
</p></li><li><p>
-<a class="indexterm" name="id2582054"></a>
+<a class="indexterm" name="id2582055"></a>
<a class="indexterm" name="id2582061"></a>
-<a class="indexterm" name="id2582067"></a>
-<a class="indexterm" name="id2582074"></a>
+<a class="indexterm" name="id2582068"></a>
+<a class="indexterm" name="id2582075"></a>
<span class="emphasis"><em>pam_ldap:</em></span> A PAM module that provides LDAP integration for UNIX/Linux
system access authentication.
</p></li><li><p>
<a class="indexterm" name="id2582093"></a>
<a class="indexterm" name="id2582100"></a>
-<a class="indexterm" name="id2582106"></a>
-<a class="indexterm" name="id2582113"></a>
+<a class="indexterm" name="id2582107"></a>
+<a class="indexterm" name="id2582114"></a>
<span class="emphasis"><em>idmap_ad:</em></span> An IDMAP backend that supports the Microsoft Services for
UNIX RFC 2307 schema available from the PADL Web
<a class="ulink" href="http://www.padl.com/download/xad_oss_plugins.tar.gz" target="_top">site</a>.
- </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2582136"></a>Comments Regarding LDAP</h3></div></div></div><p>
-<a class="indexterm" name="id2582144"></a>
+ </p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2582137"></a>Comments Regarding LDAP</h3></div></div></div><p>
+<a class="indexterm" name="id2582145"></a>
<a class="indexterm" name="id2582154"></a>
<a class="indexterm" name="id2582161"></a>
-<a class="indexterm" name="id2582167"></a>
+<a class="indexterm" name="id2582168"></a>
There is much excitement and interest in LDAP directories in the information technology world
today. The LDAP architecture was designed to be highly scalable. It was also designed for
use across a huge number of potential areas of application encompassing a wide range of operating
systems and platforms. LDAP technologies are at the heart of the current generations of Federated
Identity Management (FIM) solutions that can underlie a corporate Single Sign-On (SSO) environment.
</p><p>
-<a class="indexterm" name="id2582185"></a>
-<a class="indexterm" name="id2582192"></a>
+<a class="indexterm" name="id2582186"></a>
+<a class="indexterm" name="id2582193"></a>
<a class="indexterm" name="id2582199"></a>
-<a class="indexterm" name="id2582205"></a>
+<a class="indexterm" name="id2582206"></a>
LDAP implementations have been built across a wide variety of platforms. It lies at the core of Microsoft
Windows Active Directory services (ADS), Novell's eDirectory, as well as many others. Implementation of the
directory services LDAP involves interaction with legacy as well as new generation applications, all of which
@@ -393,12 +393,12 @@ Samba-3 introduces a number of new password backend capabilities.
<a class="indexterm" name="id2582236"></a>
<a class="indexterm" name="id2582243"></a>
<a class="indexterm" name="id2582250"></a>
-<a class="indexterm" name="id2582256"></a>
-<a class="indexterm" name="id2582263"></a>
-<a class="indexterm" name="id2582270"></a>
-<a class="indexterm" name="id2582277"></a>
-<a class="indexterm" name="id2582284"></a>
-<a class="indexterm" name="id2582291"></a>
+<a class="indexterm" name="id2582257"></a>
+<a class="indexterm" name="id2582264"></a>
+<a class="indexterm" name="id2582271"></a>
+<a class="indexterm" name="id2582278"></a>
+<a class="indexterm" name="id2582285"></a>
+<a class="indexterm" name="id2582292"></a>
<a class="indexterm" name="id2582298"></a>
<a class="indexterm" name="id2582305"></a>
<a class="indexterm" name="id2582312"></a>
@@ -411,11 +411,11 @@ Samba-3 introduces a number of new password backend capabilities.
and also Samba.
</p><p>
<a class="indexterm" name="id2582332"></a>
-<a class="indexterm" name="id2582338"></a>
+<a class="indexterm" name="id2582339"></a>
<a class="indexterm" name="id2582345"></a>
<a class="indexterm" name="id2582352"></a>
-<a class="indexterm" name="id2582358"></a>
-<a class="indexterm" name="id2582365"></a>
+<a class="indexterm" name="id2582359"></a>
+<a class="indexterm" name="id2582366"></a>
Many sites are installing LDAP for the first time in order to provide a scalable passdb backend
for Samba. Others are faced with the need to adapt an existing LDAP directory to new uses such
as for the Samba SAM backend. Whatever your particular need and attraction to Samba may be,
@@ -423,8 +423,8 @@ Samba-3 introduces a number of new password backend capabilities.
are of a durable nature for the site. These have far-reaching implications that affect long-term
information systems management costs.
</p><p>
-<a class="indexterm" name="id2582384"></a>
-<a class="indexterm" name="id2582391"></a>
+<a class="indexterm" name="id2582385"></a>
+<a class="indexterm" name="id2582392"></a>
Do not rush into an LDAP deployment. Take the time to understand how the design of the Directory
Information Tree (DIT) may impact current and future site needs, as well as the ability to meet
them. The way that Samba SAM information should be stored within the DIT varies from site to site
@@ -444,9 +444,9 @@ Samba-3 introduces a number of new password backend capabilities.
be dealt with includes: user accounts, group accounts, machine trust accounts, interdomain
trust accounts, and intermediate information specific to Samba internals.
</p><p>
-<a class="indexterm" name="id2582477"></a>
-<a class="indexterm" name="id2582484"></a>
-<a class="indexterm" name="id2582491"></a>
+<a class="indexterm" name="id2582478"></a>
+<a class="indexterm" name="id2582485"></a>
+<a class="indexterm" name="id2582492"></a>
The example deployment guidelines in this book, as well as other books and HOWTO documents
available from the internet may not fit with established directory designs and implementations.
The existing DIT may not be able to accommodate the simple information layout proposed in common
@@ -461,50 +461,50 @@ Samba-3 introduces a number of new password backend capabilities.
the journey to it may be challenging. Take time to understand site needs and do not rush
into deployment.
</p><p>
-<a class="indexterm" name="id2582527"></a>
+<a class="indexterm" name="id2582528"></a>
<a class="indexterm" name="id2582534"></a>
Above all, do not blindly use scripts and tools that are not suitable for your site. Check
and validate all scripts before you execute them to make sure that the existing infrastructure
will not be damaged by inadvertent use of an inappropriate tool.
- </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2582548"></a>LDAP Directories and Windows Computer Accounts</h3></div></div></div><p>
+ </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2582549"></a>LDAP Directories and Windows Computer Accounts</h3></div></div></div><p>
<a class="indexterm" name="id2582557"></a>
<a class="indexterm" name="id2582564"></a>
-<a class="indexterm" name="id2582570"></a>
+<a class="indexterm" name="id2582571"></a>
Samba doesn't provide a turnkey solution to LDAP. It is best to deal with the design and
configuration of an LDAP directory prior to integration with Samba. A working knowledge
of LDAP makes Samba integration easy, and the lack of a working knowledge of LDAP can make
it a frustrating experience.
</p><p>
-<a class="indexterm" name="id2582586"></a>
-<a class="indexterm" name="id2582593"></a>
+<a class="indexterm" name="id2582587"></a>
+<a class="indexterm" name="id2582594"></a>
<a class="indexterm" name="id2582600"></a>
Computer (machine) accounts can be placed wherever you like in an LDAP directory subject
to some constraints that are described in this chapter.
</p><p>
-<a class="indexterm" name="id2582612"></a>
-<a class="indexterm" name="id2582619"></a>
-<a class="indexterm" name="id2582626"></a>
-<a class="indexterm" name="id2582633"></a>
-<a class="indexterm" name="id2582640"></a>
-<a class="indexterm" name="id2582647"></a>
-<a class="indexterm" name="id2582654"></a>
+<a class="indexterm" name="id2582613"></a>
+<a class="indexterm" name="id2582620"></a>
+<a class="indexterm" name="id2582627"></a>
+<a class="indexterm" name="id2582634"></a>
+<a class="indexterm" name="id2582641"></a>
+<a class="indexterm" name="id2582648"></a>
+<a class="indexterm" name="id2582655"></a>
The POSIX and sambaSamAccount components of computer (machine) accounts are both used by Samba.
Thus, machine accounts are treated inside Samba in the same way that Windows NT4/200X treats
them. A user account and a machine account are indistinquishable from each other, except that
the machine account ends in a $ character, as do trust accounts.
</p><p>
-<a class="indexterm" name="id2582670"></a>
-<a class="indexterm" name="id2582677"></a>
+<a class="indexterm" name="id2582671"></a>
+<a class="indexterm" name="id2582678"></a>
<a class="indexterm" name="id2582684"></a>
<a class="indexterm" name="id2582691"></a>
-<a class="indexterm" name="id2582697"></a>
+<a class="indexterm" name="id2582698"></a>
The need for Windows user, group, machine, trust, and other accounts to be tied to a valid UNIX
UID is a design decision that was made a long way back in the history of Samba development. It
is unlikely that this decision will be reversed or changed during the remaining life of the
Samba-3.x series.
</p><p>
-<a class="indexterm" name="id2582712"></a>
-<a class="indexterm" name="id2582719"></a>
+<a class="indexterm" name="id2582713"></a>
+<a class="indexterm" name="id2582720"></a>
<a class="indexterm" name="id2582726"></a>
The resolution of a UID from the Windows SID is achieved within Samba through a mechanism that
must refer back to the host operating system on which Samba is running. The NSS is the preferred
@@ -512,12 +512,12 @@ Samba-3 introduces a number of new password backend capabilities.
host OS it runs on.
</p><p>
<a class="indexterm" name="id2582741"></a>
-<a class="indexterm" name="id2582747"></a>
-<a class="indexterm" name="id2582754"></a>
-<a class="indexterm" name="id2582761"></a>
+<a class="indexterm" name="id2582748"></a>
+<a class="indexterm" name="id2582755"></a>
+<a class="indexterm" name="id2582762"></a>
<a class="indexterm" name="id2582768"></a>
-<a class="indexterm" name="id2582774"></a>
-<a class="indexterm" name="id2582781"></a>
+<a class="indexterm" name="id2582775"></a>
+<a class="indexterm" name="id2582782"></a>
Samba asks the host OS to provide a UID via the &#8220;<span class="quote">passwd</span>&#8221;, &#8220;<span class="quote">shadow</span>&#8221;,
and &#8220;<span class="quote">group</span>&#8221; facilities in the NSS control (configuration) file. The best tool
for achieving this is left up to the UNIX administrator to determine. It is not imposed by
@@ -525,11 +525,11 @@ Samba-3 introduces a number of new password backend capabilities.
possible to do this via LDAP, and for that Samba provides the appropriate hooks so that
all account entities can be located in an LDAP directory.
</p><p>
-<a class="indexterm" name="id2582809"></a>
-<a class="indexterm" name="id2582816"></a>
-<a class="indexterm" name="id2582823"></a>
-<a class="indexterm" name="id2582829"></a>
-<a class="indexterm" name="id2582836"></a>
+<a class="indexterm" name="id2582810"></a>
+<a class="indexterm" name="id2582817"></a>
+<a class="indexterm" name="id2582824"></a>
+<a class="indexterm" name="id2582830"></a>
+<a class="indexterm" name="id2582837"></a>
For many the weapon of choice is to use the PADL nss_ldap utility. This utility must
be configured so that computer accounts can be resolved to a POSIX/UNIX account UID. That
is fundamentally an LDAP design question. The information provided on the Samba list and
@@ -537,32 +537,32 @@ Samba-3 introduces a number of new password backend capabilities.
of an LDAP directory is a complex subject that is beyond the scope of this documentation.
</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="acctmgmttools"></a>Account Management Tools</h2></div></div></div><p>
<a class="indexterm" name="id2582867"></a>
-<a class="indexterm" name="id2582873"></a>
-<a class="indexterm" name="id2582880"></a>
+<a class="indexterm" name="id2582874"></a>
+<a class="indexterm" name="id2582881"></a>
Samba provides two tools for management of user and machine accounts:
<code class="literal">smbpasswd</code> and <code class="literal">pdbedit</code>.
</p><p>
-<a class="indexterm" name="id2582903"></a>
-<a class="indexterm" name="id2582910"></a>
-<a class="indexterm" name="id2582917"></a>
+<a class="indexterm" name="id2582904"></a>
+<a class="indexterm" name="id2582911"></a>
+<a class="indexterm" name="id2582918"></a>
The <code class="literal">pdbedit</code> can be used to manage account policies in addition to
Samba user account information. The policy management capability is used to administer
domain default settings for password aging and management controls to handle failed login
attempts.
</p><p>
-<a class="indexterm" name="id2582937"></a>
-<a class="indexterm" name="id2582944"></a>
-<a class="indexterm" name="id2582951"></a>
+<a class="indexterm" name="id2582938"></a>
+<a class="indexterm" name="id2582945"></a>
+<a class="indexterm" name="id2582952"></a>
<a class="indexterm" name="id2582958"></a>
Some people are confused when reference is made to <code class="literal">smbpasswd</code> because the
name refers to a storage mechanism for SambaSAMAccount information, but it is also the name
of a utility tool. That tool is destined to eventually be replaced by new functionality that
is being added to the <code class="literal">net</code> toolset (see <a class="link" href="NetCommand.html" title="Chapter 13. Remote and Local Management: The Net Command">the Net Command</a>.
-</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2582989"></a>The <code class="literal">smbpasswd</code> Tool</h3></div></div></div><p>
-<a class="indexterm" name="id2583002"></a>
-<a class="indexterm" name="id2583009"></a>
-<a class="indexterm" name="id2583016"></a>
-<a class="indexterm" name="id2583023"></a>
+</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2582990"></a>The <code class="literal">smbpasswd</code> Tool</h3></div></div></div><p>
+<a class="indexterm" name="id2583003"></a>
+<a class="indexterm" name="id2583010"></a>
+<a class="indexterm" name="id2583017"></a>
+<a class="indexterm" name="id2583024"></a>
<a class="indexterm" name="id2583030"></a>
The <code class="literal">smbpasswd</code> utility is similar to the <code class="literal">passwd</code>
and <code class="literal">yppasswd</code> programs. It maintains the two 32 byte password
@@ -575,7 +575,7 @@ is being added to the <code class="literal">net</code> toolset (see <a class="li
<code class="literal">smbpasswd</code> works in a client-server mode where it contacts the
local smbd to change the user's password on its behalf. This has enormous benefits.
</p><p>
-<a class="indexterm" name="id2583099"></a>
+<a class="indexterm" name="id2583100"></a>
<a class="indexterm" name="id2583106"></a>
<code class="literal">smbpasswd</code> has the capability to change passwords on Windows NT
servers (this only works when the request is sent to the NT PDC if changing an NT
@@ -601,21 +601,21 @@ is being added to the <code class="literal">net</code> toolset (see <a class="li
If the old value does not match the current value stored for that user, or the two
new values do not match each other, then the password will not be changed.
</p><p>
-<a class="indexterm" name="id2583271"></a>
+<a class="indexterm" name="id2583272"></a>
When invoked by an ordinary user, the command will allow only the user to change his or her own
SMB password.
</p><p>
<a class="indexterm" name="id2583284"></a>
-<a class="indexterm" name="id2583290"></a>
+<a class="indexterm" name="id2583291"></a>
When run by root, <code class="literal">smbpasswd</code> may take an optional argument specifying
the username whose SMB password you wish to change. When run as root, <code class="literal">smbpasswd</code>
does not prompt for or check the old password value, thus allowing root to set passwords
for users who have forgotten their passwords.
</p><p>
-<a class="indexterm" name="id2583317"></a>
+<a class="indexterm" name="id2583318"></a>
<a class="indexterm" name="id2583324"></a>
<a class="indexterm" name="id2583331"></a>
-<a class="indexterm" name="id2583337"></a>
+<a class="indexterm" name="id2583338"></a>
<code class="literal">smbpasswd</code> is designed to work in the way familiar to UNIX
users who use the <code class="literal">passwd</code> or <code class="literal">yppasswd</code> commands.
While designed for administrative use, this tool provides essential user-level
@@ -625,32 +625,32 @@ is being added to the <code class="literal">net</code> toolset (see <a class="li
For more details on using <code class="literal">smbpasswd</code>, refer to the man page (the
definitive reference).
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="pdbeditthing"></a>The <code class="literal">pdbedit</code> Tool</h3></div></div></div><p>
- <a class="indexterm" name="id2583403"></a>
- <a class="indexterm" name="id2583410"></a>
+ <a class="indexterm" name="id2583404"></a>
+ <a class="indexterm" name="id2583411"></a>
<a class="indexterm" name="id2583417"></a>
<a class="indexterm" name="id2583424"></a>
<code class="literal">pdbedit</code> is a tool that can be used only by root. It is used to
manage the passdb backend, as well as domain-wide account policy settings. <code class="literal">pdbedit</code>
can be used to:
</p><div class="itemizedlist"><ul type="disc"><li><p>add, remove, or modify user accounts.</p></li><li><p>list user accounts.</p></li><li><p>migrate user accounts.</p></li><li><p>migrate group accounts.</p></li><li><p>manage account policies.</p></li><li><p>manage domain access policy settings.</p></li></ul></div><p>
- <a class="indexterm" name="id2583483"></a>
+ <a class="indexterm" name="id2583484"></a>
Under the terms of the Sarbanes-Oxley Act of 2002, American businesses and organizations are mandated to
implement a series of <code class="literal">internal controls</code> and procedures to communicate, store,
and protect financial data. The Sarbanes-Oxley Act has far reaching implications in respect of:
</p><div class="orderedlist"><ol type="1"><li><p>Who has access to information systems that store financial data.</p></li><li><p>How personal and financial information is treated among employees and business
partners.</p></li><li><p>How security vulnerabilities are managed.</p></li><li><p>Security and patch level maintenance for all information systems.</p></li><li><p>How information systems changes are documented and tracked.</p></li><li><p>How information access controls are implemented and managed.</p></li><li><p>Auditability of all information systems in respect of change and security.</p></li><li><p>Disciplinary procedures and controls to ensure privacy.</p></li></ol></div><p>
- <a class="indexterm" name="id2583555"></a>
- <a class="indexterm" name="id2583562"></a>
+ <a class="indexterm" name="id2583556"></a>
+ <a class="indexterm" name="id2583563"></a>
In short, the Sarbanes-Oxley Act of 2002 is an instrument that enforces accountability in respect of
business related information systems so as to ensure the compliance of all information systems that
are used to store personal information and particularly for financial records processing. Similar
accountabilities are being demanded around the world.
</p><p>
<a class="indexterm" name="id2583579"></a>
- <a class="indexterm" name="id2583585"></a>
- <a class="indexterm" name="id2583592"></a>
- <a class="indexterm" name="id2583599"></a>
- <a class="indexterm" name="id2583606"></a>
+ <a class="indexterm" name="id2583586"></a>
+ <a class="indexterm" name="id2583593"></a>
+ <a class="indexterm" name="id2583600"></a>
+ <a class="indexterm" name="id2583607"></a>
The need to be familiar with the Samba tools and facilities that permit information systems operation
in compliance with government laws and regulations is clear to all. The <code class="literal">pdbedit</code> is
currently the only Samba tool that provides the capacity to manage account and systems access controls
@@ -663,24 +663,24 @@ is being added to the <code class="literal">net</code> toolset (see <a class="li
<a class="indexterm" name="id2583988"></a>
<a class="indexterm" name="id2583995"></a>
<a class="indexterm" name="id2584002"></a>
-<a class="indexterm" name="id2584008"></a>
+<a class="indexterm" name="id2584009"></a>
The <code class="literal">pdbedit</code> tool is the only one that can manage the account
security and policy settings. It is capable of all operations that smbpasswd can
do as well as a superset of them.
</p><p>
- <a class="indexterm" name="id2584027"></a>
-<a class="indexterm" name="id2584034"></a>
-<a class="indexterm" name="id2584041"></a>
+ <a class="indexterm" name="id2584028"></a>
+<a class="indexterm" name="id2584035"></a>
+<a class="indexterm" name="id2584042"></a>
One particularly important purpose of the <code class="literal">pdbedit</code> is to allow
the import/export of account information from one passdb backend to another.
</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2584058"></a>User Account Management</h4></div></div></div><p>
<a class="indexterm" name="id2584066"></a>
-<a class="indexterm" name="id2584072"></a>
-<a class="indexterm" name="id2584079"></a>
-<a class="indexterm" name="id2584086"></a>
-<a class="indexterm" name="id2584093"></a>
-<a class="indexterm" name="id2584100"></a>
-<a class="indexterm" name="id2584107"></a>
+<a class="indexterm" name="id2584073"></a>
+<a class="indexterm" name="id2584080"></a>
+<a class="indexterm" name="id2584087"></a>
+<a class="indexterm" name="id2584094"></a>
+<a class="indexterm" name="id2584101"></a>
+<a class="indexterm" name="id2584108"></a>
The <code class="literal">pdbedit</code> tool, like the <code class="literal">smbpasswd</code> tool, requires
that a POSIX user account already exists in the UNIX/Linux system accounts database (backend).
Neither tool will call out to the operating system to create a user account because this is
@@ -694,9 +694,9 @@ is being added to the <code class="literal">net</code> toolset (see <a class="li
<a class="indexterm" name="id2584158"></a>
Before attempting to use the <code class="literal">pdbedit</code> tool to manage user and machine
accounts, make certain that a system (POSIX) account has already been created.
- </p><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2584174"></a>Listing User and Machine Accounts</h5></div></div></div><p>
-<a class="indexterm" name="id2584182"></a>
-<a class="indexterm" name="id2584189"></a>
+ </p><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2584175"></a>Listing User and Machine Accounts</h5></div></div></div><p>
+<a class="indexterm" name="id2584183"></a>
+<a class="indexterm" name="id2584190"></a>
The following is an example of the user account information that is stored in
a tdbsam password backend. This listing was produced by running:
</p><pre class="screen">
@@ -723,7 +723,7 @@ Password can change: Sat, 14 Dec 2002 14:37:03 GMT
Password must change: Mon, 18 Jan 2038 20:14:07 GMT
</pre><p>
</p><p>
-<a class="indexterm" name="id2584231"></a>
+<a class="indexterm" name="id2584232"></a>
Accounts can also be listed in the older <code class="literal">smbpasswd</code> format:
</p><pre class="screen">
<code class="prompt">root# </code><strong class="userinput"><code>pdbedit -Lw</code></strong>
@@ -749,8 +749,8 @@ marvel$:1011:BF709959C3C94E0B3958B7B84A3BB6F3:
C610EFE9A385A3E8AA46ADFD576E6881:[W ]:LCT-40F07A4
</pre><p>
<a class="indexterm" name="id2584280"></a>
-<a class="indexterm" name="id2584286"></a>
-<a class="indexterm" name="id2584293"></a>
+<a class="indexterm" name="id2584287"></a>
+<a class="indexterm" name="id2584294"></a>
<a class="indexterm" name="id2584300"></a>
<a class="indexterm" name="id2584307"></a>
<a class="indexterm" name="id2584314"></a>
@@ -762,15 +762,15 @@ marvel$:1011:BF709959C3C94E0B3958B7B84A3BB6F3:
The Account Flags parameters are documented in the <code class="literal">pdbedit</code> man page, and are
briefly documented in <a class="link" href="passdb.html#TOSHARG-acctflags" title="Account Flags Management">the Account Flags Management section</a>.
</p><p>
-<a class="indexterm" name="id2584397"></a>
+<a class="indexterm" name="id2584398"></a>
The LCT data consists of 8 hexadecimal characters representing the time since January 1, 1970, of
the time when the password was last changed.
</p></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2584409"></a>Adding User Accounts</h5></div></div></div><p>
<a class="indexterm" name="id2584417"></a>
<a class="indexterm" name="id2584424"></a>
-<a class="indexterm" name="id2584430"></a>
-<a class="indexterm" name="id2584437"></a>
-<a class="indexterm" name="id2584444"></a>
+<a class="indexterm" name="id2584431"></a>
+<a class="indexterm" name="id2584438"></a>
+<a class="indexterm" name="id2584445"></a>
The <code class="literal">pdbedit</code> can be used to add a user account to a standalone server
or to a domain. In the example shown here the account for the user <code class="literal">vlaan</code>
has been created before attempting to add the SambaSAMAccount.
@@ -802,9 +802,9 @@ Last bad password : 0
Bad password count : 0
Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
</pre><p>
- </p></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2584496"></a>Deleting Accounts</h5></div></div></div><p>
-<a class="indexterm" name="id2584504"></a>
-<a class="indexterm" name="id2584511"></a>
+ </p></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2584497"></a>Deleting Accounts</h5></div></div></div><p>
+<a class="indexterm" name="id2584505"></a>
+<a class="indexterm" name="id2584512"></a>
<a class="indexterm" name="id2584518"></a>
<a class="indexterm" name="id2584525"></a>
An account can be deleted from the SambaSAMAccount database
@@ -814,8 +814,8 @@ Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
The account is removed without further screen output. The account is removed only from the
SambaSAMAccount (passdb backend) database, it is not removed from the UNIX account backend.
</p><p>
-<a class="indexterm" name="id2584551"></a>
-<a class="indexterm" name="id2584558"></a>
+<a class="indexterm" name="id2584552"></a>
+<a class="indexterm" name="id2584559"></a>
The use of the NT4 domain user manager to delete an account will trigger the <em class="parameter"><code>delete user
script</code></em>, but not the <code class="literal">pdbedit</code> tool.
</p></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2584581"></a>Changing User Accounts</h5></div></div></div><p>
@@ -823,7 +823,7 @@ Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Refer to the <code class="literal">pdbedit</code> man page for a full synopsis of all operations
that are available with this tool.
</p><p>
-<a class="indexterm" name="id2584606"></a>
+<a class="indexterm" name="id2584607"></a>
An example of a simple change in the user account information is the change of the full name
information shown here:
</p><pre class="screen">
@@ -836,8 +836,8 @@ Home Directory: \\frodo\vlaan
</pre><p>
</p><p>
<a class="indexterm" name="id2584634"></a>
-<a class="indexterm" name="id2584640"></a>
-<a class="indexterm" name="id2584647"></a>
+<a class="indexterm" name="id2584641"></a>
+<a class="indexterm" name="id2584648"></a>
Let us assume for a moment that a user's password has expired and the user is unable to
change the password at this time. It may be necessary to give the user additional grace time
so that it is possible to continue to work with the account and the original password. This
@@ -889,45 +889,45 @@ Password must change: Fri, 01 Jan 2010 00:00:00 GMT
<a class="indexterm" name="id2584754"></a>
Refer to the strptime man page for specific time format information.
</p><p>
-<a class="indexterm" name="id2584765"></a>
+<a class="indexterm" name="id2584766"></a>
<a class="indexterm" name="id2584772"></a>
Please refer to the pdbedit man page for further information relating to SambaSAMAccount
management.
</p><div class="sect5" lang="en"><div class="titlepage"><div><div><h6 class="title"><a name="TOSHARG-acctflags"></a>Account Flags Management</h6></div></div></div><p>
-<a class="indexterm" name="id2584793"></a>
-<a class="indexterm" name="id2584800"></a>
+<a class="indexterm" name="id2584794"></a>
+<a class="indexterm" name="id2584801"></a>
<a class="indexterm" name="id2584810"></a>
-<a class="indexterm" name="id2584816"></a>
+<a class="indexterm" name="id2584817"></a>
The Samba SAM account flags are properly called the ACB (account control block) within
the Samba source code. In some parts of the Samba source code they are referred to as the
account encode_bits, and also as the account control flags.
</p><p>
<a class="indexterm" name="id2584831"></a>
<a class="indexterm" name="id2584838"></a>
-<a class="indexterm" name="id2584844"></a>
-<a class="indexterm" name="id2584851"></a>
-<a class="indexterm" name="id2584858"></a>
+<a class="indexterm" name="id2584845"></a>
+<a class="indexterm" name="id2584852"></a>
+<a class="indexterm" name="id2584859"></a>
The manual adjustment of user, machine (workstation or server) or an inter-domain trust
account account flgas should not be necessary under normal conditions of use of Samba. On the other hand,
where this information becomes corrupted for some reason, the ability to correct the damaged data is certainly
useful. The tool of choice by which such correction can be affected is the <code class="literal">pdbedit</code> utility.
</p><p>
-<a class="indexterm" name="id2584881"></a>
-<a class="indexterm" name="id2584888"></a>
+<a class="indexterm" name="id2584882"></a>
+<a class="indexterm" name="id2584889"></a>
There have been a few requests for information regarding the account flags from developers
who are creating their own Samba management tools. An example of a need for information regarding
the proper management of the account flags is evident when developing scripts that will be used
to manage an LDAP directory.
</p><p>
-<a class="indexterm" name="id2584904"></a>
+<a class="indexterm" name="id2584905"></a>
<a class="indexterm" name="id2584911"></a>
The account flag field can contain up to 16 characters. Presently, only 11 are in use.
These are listed in <a class="link" href="passdb.html#accountflags" title="Table 11.2. Samba SAM Account Control Block Flags">Samba SAM Account Control Block Flags</a>.
The order in which the flags are specified to the <code class="literal">pdbedit</code> command is not important.
In fact, they can be set without problem in any order in the SambaAcctFlags record in the LDAP directory.
</p><div class="table"><a name="accountflags"></a><p class="title"><b>Table 11.2. Samba SAM Account Control Block Flags</b></p><div class="table-contents"><table summary="Samba SAM Account Control Block Flags" border="1"><colgroup><col><col></colgroup><thead><tr><th align="center">Flag</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center">D</td><td align="left">Account is disabled.</td></tr><tr><td align="center">H</td><td align="left">A home directory is required.</td></tr><tr><td align="center">I</td><td align="left">An inter-domain trust account.</td></tr><tr><td align="center">L</td><td align="left">Account has been auto-locked.</td></tr><tr><td align="center">M</td><td align="left">An MNS (Microsoft network service) logon account.</td></tr><tr><td align="center">N</td><td align="left">Password not required.</td></tr><tr><td align="center">S</td><td align="left">A server trust account.</td></tr><tr><td align="center">T</td><td align="left">Temporary duplicate account entry.</td></tr><tr><td align="center">U</td><td align="left">A normal user account.</td></tr><tr><td align="center">W</td><td align="left">A workstation trust account.</td></tr><tr><td align="center">X</td><td align="left">Password does not expire.</td></tr></tbody></table></div></div><br class="table-break"><p>
-<a class="indexterm" name="id2585139"></a>
-<a class="indexterm" name="id2585146"></a>
+<a class="indexterm" name="id2585140"></a>
+<a class="indexterm" name="id2585147"></a>
An example of use of the <code class="literal">pdbedit</code> utility to set the account control flags
is shown here:
</p><pre class="screen">
@@ -955,7 +955,7 @@ Last bad password : 0
Bad password count : 0
Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
</pre><p>
-<a class="indexterm" name="id2585201"></a>
+<a class="indexterm" name="id2585202"></a>
The flags can be reset to the default settings by executing:
</p><pre class="screen">
<code class="prompt">root# </code> pdbedit -r -c "[]" jht
@@ -983,8 +983,8 @@ Bad password count : 0
Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
</pre><p>
</p></div></div><div class="sect4" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2585239"></a>Domain Account Policy Managment</h5></div></div></div><p>
-<a class="indexterm" name="id2585247"></a>
-<a class="indexterm" name="id2585254"></a>
+<a class="indexterm" name="id2585248"></a>
+<a class="indexterm" name="id2585255"></a>
To view the domain account access policies that may be configured execute:
</p><pre class="screen">
<code class="prompt">root# </code> pdbedit -P ?
@@ -1032,10 +1032,10 @@ Account policies must be set individually on each PDC and BDC. At this time (Sam
account policies are not replicated automatically. This may be fixed before Samba 3.0.20 ships or some
time there after. Please check the WHATSNEW.txt file in the Samba-3 tarball for specific update notiations
regarding this facility.
-</p></div></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2585400"></a>Account Import/Export</h4></div></div></div><p>
- <a class="indexterm" name="id2585408"></a>
-<a class="indexterm" name="id2585415"></a>
-<a class="indexterm" name="id2585422"></a>
+</p></div></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2585401"></a>Account Import/Export</h4></div></div></div><p>
+ <a class="indexterm" name="id2585409"></a>
+<a class="indexterm" name="id2585416"></a>
+<a class="indexterm" name="id2585423"></a>
The <code class="literal">pdbedit</code> tool allows import/export of authentication (account)
databases from one backend to another. For example, to import/export accounts from an
old <code class="filename">smbpasswd</code> database to a <em class="parameter"><code>tdbsam</code></em>
@@ -1046,31 +1046,31 @@ regarding this facility.
<code class="prompt">root# </code><strong class="userinput"><code>pdbedit -i smbpasswd -e tdbsam</code></strong>
</pre><p>
</p></li><li><p>
-<a class="indexterm" name="id2585488"></a>
+<a class="indexterm" name="id2585489"></a>
Replace the <em class="parameter"><code>smbpasswd</code></em> with <em class="parameter"><code>tdbsam</code></em> in the
<em class="parameter"><code>passdb backend</code></em> configuration in <code class="filename">smb.conf</code>.
- </p></li></ol></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2585525"></a>Password Backends</h2></div></div></div><p>
-<a class="indexterm" name="id2585533"></a>
-<a class="indexterm" name="id2585540"></a>
+ </p></li></ol></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2585526"></a>Password Backends</h2></div></div></div><p>
+<a class="indexterm" name="id2585534"></a>
+<a class="indexterm" name="id2585541"></a>
Samba offers flexibility in backend account database design. The flexibility is immediately obvious as one
begins to explore this capability. Recent changes to Samba (since 3.0.23) have removed the mulitple backend
feature in order to simplify problems that broke some installations. This removal has made the internal
operation of Samba-3 more consistent and predictable.
</p><p>
-<a class="indexterm" name="id2585556"></a>
-<a class="indexterm" name="id2585563"></a>
+<a class="indexterm" name="id2585557"></a>
+<a class="indexterm" name="id2585564"></a>
Beginning with Samba 3.0.23 it is no longer possible to specify use of mulitple passdb backends. Earlier
versions of Samba-3 made it possible to specify multiple password backends, and even multiple
backends of the same type. The multiple passdb backend capability caused many problems with name to SID and
SID to name ID resolution. The Samba team wrestled with the challenges and decided that this feature needed
to be removed.
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2585579"></a>Plaintext</h3></div></div></div><p>
-<a class="indexterm" name="id2585586"></a>
-<a class="indexterm" name="id2585593"></a>
-<a class="indexterm" name="id2585600"></a>
-<a class="indexterm" name="id2585607"></a>
-<a class="indexterm" name="id2585614"></a>
-<a class="indexterm" name="id2585621"></a>
+<a class="indexterm" name="id2585587"></a>
+<a class="indexterm" name="id2585594"></a>
+<a class="indexterm" name="id2585601"></a>
+<a class="indexterm" name="id2585608"></a>
+<a class="indexterm" name="id2585615"></a>
+<a class="indexterm" name="id2585622"></a>
Older versions of Samba retrieved user information from the UNIX user database
and eventually some other fields from the file <code class="filename">/etc/samba/smbpasswd</code>
or <code class="filename">/etc/smbpasswd</code>. When password encryption is disabled, no
@@ -1078,17 +1078,17 @@ to be removed.
that the Samba host OS will access its <code class="filename">/etc/passwd</code> database.
On most Linux systems, for example, all user and group resolution is done via PAM.
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2585655"></a>smbpasswd: Encrypted Password Database</h3></div></div></div><p>
- <a class="indexterm" name="id2585663"></a>
-<a class="indexterm" name="id2585672"></a>
-<a class="indexterm" name="id2585679"></a>
-<a class="indexterm" name="id2585686"></a>
+ <a class="indexterm" name="id2585664"></a>
+<a class="indexterm" name="id2585673"></a>
+<a class="indexterm" name="id2585680"></a>
+<a class="indexterm" name="id2585687"></a>
Traditionally, when configuring <a class="link" href="smb.conf.5.html#ENCRYPTPASSWORDS">encrypt passwords = yes</a>
in Samba's <code class="filename">smb.conf</code> file, user account information such as username, LM/NT password hashes,
password change times, and account flags have been stored in the <code class="filename">smbpasswd(5)</code>
file. There are several disadvantages to this approach for sites with large numbers of users
(counted in the thousands).
</p><div class="itemizedlist"><ul type="disc"><li><p>
-<a class="indexterm" name="id2585729"></a>
+<a class="indexterm" name="id2585730"></a>
The first problem is that all lookups must be performed sequentially. Given that
there are approximately two lookups per domain logon (one during intial logon validation
and one for a session connection setup, such as when mapping a network drive or printer), this
@@ -1097,27 +1097,27 @@ to be removed.
</p></li><li><p>
<a class="indexterm" name="id2585747"></a>
<a class="indexterm" name="id2585754"></a>
-<a class="indexterm" name="id2585760"></a>
-<a class="indexterm" name="id2585767"></a>
+<a class="indexterm" name="id2585761"></a>
+<a class="indexterm" name="id2585768"></a>
<a class="indexterm" name="id2585774"></a>
The second problem is that administrators who desire to replicate an smbpasswd file
to more than one Samba server are left to use external tools such as
<code class="literal">rsync(1)</code> and <code class="literal">ssh(1)</code> and write custom,
in-house scripts.
</p></li><li><p>
-<a class="indexterm" name="id2585799"></a>
-<a class="indexterm" name="id2585806"></a>
-<a class="indexterm" name="id2585813"></a>
-<a class="indexterm" name="id2585820"></a>
-<a class="indexterm" name="id2585827"></a>
+<a class="indexterm" name="id2585800"></a>
+<a class="indexterm" name="id2585807"></a>
+<a class="indexterm" name="id2585814"></a>
+<a class="indexterm" name="id2585821"></a>
+<a class="indexterm" name="id2585828"></a>
Finally, the amount of information that is stored in an smbpasswd entry leaves
no room for additional attributes such as a home directory, password expiration time,
or even a relative identifier (RID).
</p></li></ul></div><p>
-<a class="indexterm" name="id2585844"></a>
-<a class="indexterm" name="id2585851"></a>
+<a class="indexterm" name="id2585845"></a>
+<a class="indexterm" name="id2585852"></a>
<a class="indexterm" name="id2585858"></a>
-<a class="indexterm" name="id2585864"></a>
+<a class="indexterm" name="id2585865"></a>
As a result of these deficiencies, a more robust means of storing user attributes
used by smbd was developed. The API that defines access to user accounts
is commonly referred to as the samdb interface (previously, this was called the passdb
@@ -1127,21 +1127,21 @@ to be removed.
<a class="indexterm" name="id2585887"></a>
<a class="indexterm" name="id2585894"></a>
<a class="indexterm" name="id2585901"></a>
-<a class="indexterm" name="id2585907"></a>
+<a class="indexterm" name="id2585908"></a>
Samba provides an enhanced set of passdb backends that overcome the deficiencies
of the smbpasswd plaintext database. These are tdbsam and ldapsam.
Of these, ldapsam will be of most interest to large corporate or enterprise sites.
- </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2585920"></a>tdbsam</h3></div></div></div><p>
- <a class="indexterm" name="id2585928"></a>
-<a class="indexterm" name="id2585937"></a>
-<a class="indexterm" name="id2585946"></a>
+ </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2585921"></a>tdbsam</h3></div></div></div><p>
+ <a class="indexterm" name="id2585929"></a>
+<a class="indexterm" name="id2585938"></a>
+<a class="indexterm" name="id2585947"></a>
Samba can store user and machine account data in a &#8220;<span class="quote">TDB</span>&#8221; (trivial database).
Using this backend does not require any additional configuration. This backend is
recommended for new installations that do not require LDAP.
</p><p>
<a class="indexterm" name="id2585964"></a>
<a class="indexterm" name="id2585971"></a>
-<a class="indexterm" name="id2585977"></a>
+<a class="indexterm" name="id2585978"></a>
<a class="indexterm" name="id2585984"></a>
As a general guide, the Samba Team does not recommend using the tdbsam backend for sites
that have 250 or more users. Additionally, tdbsam is not capable of scaling for use
@@ -1156,9 +1156,9 @@ to be removed.
more than one physical location. The Samba Team has not at this time established
the performance-based scalability limits of the tdbsam architecture.
</p><p>
-<a class="indexterm" name="id2586029"></a>
-<a class="indexterm" name="id2586036"></a>
-<a class="indexterm" name="id2586043"></a>
+<a class="indexterm" name="id2586030"></a>
+<a class="indexterm" name="id2586037"></a>
+<a class="indexterm" name="id2586044"></a>
<a class="indexterm" name="id2586050"></a>
There are sites that have thousands of users and yet require only one server.
One site recently reported having 4,500 user accounts on one UNIX system and
@@ -1167,8 +1167,8 @@ to be removed.
is not one pertaining to a limitation in the TDB storage system, it is based
only on the need for a reliable distribution mechanism for the SambaSAMAccount
backend.
- </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2586078"></a>ldapsam</h3></div></div></div><p>
-<a class="indexterm" name="id2586086"></a>
+ </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2586079"></a>ldapsam</h3></div></div></div><p>
+<a class="indexterm" name="id2586087"></a>
<a class="indexterm" name="id2586093"></a>
<a class="indexterm" name="id2586100"></a>
There are a few points to stress that the ldapsam does not provide. The LDAP
@@ -1176,17 +1176,17 @@ to be removed.
</p><div class="itemizedlist"><ul type="disc"><li><p>A means of retrieving user account information from
a Windows 200x Active Directory server.</p></li><li><p>A means of replacing /etc/passwd.</p></li></ul></div><p>
<a class="indexterm" name="id2586129"></a>
-<a class="indexterm" name="id2586135"></a>
-<a class="indexterm" name="id2586142"></a>
-<a class="indexterm" name="id2586148"></a>
+<a class="indexterm" name="id2586136"></a>
+<a class="indexterm" name="id2586143"></a>
+<a class="indexterm" name="id2586149"></a>
The second item can be accomplished by using LDAP NSS and PAM modules. LGPL versions of these libraries can be
obtained from <a class="ulink" href="http://www.padl.com/" target="_top">PADL Software</a>. More information about the
configuration of these packages may be found in <a class="ulink" href="http://safari.oreilly.com/?XmlId=1-56592-491-6" target="_top">
<span class="emphasis"><em>LDAP, System Administration</em></span> by Gerald Carter, Chapter 6, Replacing NIS"</a>.
</p><p>
-<a class="indexterm" name="id2586179"></a>
-<a class="indexterm" name="id2586186"></a>
-<a class="indexterm" name="id2586193"></a>
+<a class="indexterm" name="id2586180"></a>
+<a class="indexterm" name="id2586187"></a>
+<a class="indexterm" name="id2586194"></a>
This document describes how to use an LDAP directory for storing Samba user
account information traditionally stored in the smbpasswd(5) file. It is
assumed that the reader already has a basic understanding of LDAP concepts
@@ -1203,7 +1203,7 @@ to be removed.
The <a class="ulink" href="http://www.unav.es/cti/ldap-smb/ldap-smb-3-howto.html" target="_top">Samba-PDC-LDAP-HOWTO</a>
maintained by Ignacio Coupeau.
</p></li><li><p>
-<a class="indexterm" name="id2586293"></a>
+<a class="indexterm" name="id2586294"></a>
<a class="indexterm" name="id2586300"></a>
<a class="indexterm" name="id2586307"></a>
The NT migration scripts from <a class="ulink" href="http://samba.idealx.org/" target="_top">IDEALX</a> that are
@@ -1212,8 +1212,8 @@ to be removed.
</p></li></ul></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2586326"></a>Supported LDAP Servers</h4></div></div></div><p>
<a class="indexterm" name="id2586334"></a>
<a class="indexterm" name="id2586341"></a>
-<a class="indexterm" name="id2586347"></a>
-<a class="indexterm" name="id2586354"></a>
+<a class="indexterm" name="id2586348"></a>
+<a class="indexterm" name="id2586355"></a>
The LDAP ldapsam code was developed and tested using the OpenLDAP 2.x server and
client libraries. The same code should work with Netscape's Directory Server and client SDK.
However, there are bound to be compile errors and bugs. These should not be hard to fix.
@@ -1236,21 +1236,21 @@ ObjectClass (1.3.6.1.4.1.7165.2.2.6 NAME 'sambaSamAccount' SUP top AUXILIARY
sambaPrimaryGroupSID $ sambaDomainName ))
</pre><p>
</p><p>
-<a class="indexterm" name="id2586426"></a>
-<a class="indexterm" name="id2586433"></a>
+<a class="indexterm" name="id2586427"></a>
+<a class="indexterm" name="id2586434"></a>
<a class="indexterm" name="id2586440"></a>
The <code class="filename">samba.schema</code> file has been formatted for OpenLDAP 2.0/2.1.
The Samba Team owns the OID space used by the above schema and recommends its use.
If you translate the schema to be used with Netscape DS, please submit the modified
schema file as a patch to <a class="ulink" href="mailto:jerry@samba.org" target="_top">jerry@samba.org</a>.
</p><p>
-<a class="indexterm" name="id2586466"></a>
-<a class="indexterm" name="id2586473"></a>
-<a class="indexterm" name="id2586480"></a>
-<a class="indexterm" name="id2586487"></a>
+<a class="indexterm" name="id2586467"></a>
+<a class="indexterm" name="id2586474"></a>
+<a class="indexterm" name="id2586481"></a>
+<a class="indexterm" name="id2586488"></a>
<a class="indexterm" name="id2586494"></a>
-<a class="indexterm" name="id2586500"></a>
-<a class="indexterm" name="id2586507"></a>
+<a class="indexterm" name="id2586501"></a>
+<a class="indexterm" name="id2586508"></a>
Just as the smbpasswd file is meant to store information that provides information
additional to a user's <code class="filename">/etc/passwd</code> entry, so is the sambaSamAccount
object meant to supplement the UNIX user account information. A sambaSamAccount is an
@@ -1259,14 +1259,14 @@ ObjectClass (1.3.6.1.4.1.7165.2.2.6 NAME 'sambaSamAccount' SUP top AUXILIARY
for Samba account handling. However, there are several fields (e.g., uid) that overlap
with the posixAccount ObjectClass outlined in RFC 2307. This is by design.
</p><p>
-<a class="indexterm" name="id2586536"></a>
-<a class="indexterm" name="id2586543"></a>
-<a class="indexterm" name="id2586550"></a>
-<a class="indexterm" name="id2586557"></a>
+<a class="indexterm" name="id2586537"></a>
+<a class="indexterm" name="id2586544"></a>
+<a class="indexterm" name="id2586551"></a>
+<a class="indexterm" name="id2586558"></a>
<a class="indexterm" name="id2586564"></a>
<a class="indexterm" name="id2586571"></a>
-<a class="indexterm" name="id2586577"></a>
-<a class="indexterm" name="id2586584"></a>
+<a class="indexterm" name="id2586578"></a>
+<a class="indexterm" name="id2586585"></a>
<a class="indexterm" name="id2586591"></a>
In order to store all user account information (UNIX and Samba) in the directory,
it is necessary to use the sambaSamAccount and posixAccount ObjectClasses in
@@ -1276,9 +1276,9 @@ ObjectClass (1.3.6.1.4.1.7165.2.2.6 NAME 'sambaSamAccount' SUP top AUXILIARY
and functioning correctly. This division of information makes it possible to
store all Samba account information in LDAP, but still maintain UNIX account
information in NIS while the network is transitioning to a full LDAP infrastructure.
- </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2586616"></a>OpenLDAP Configuration</h4></div></div></div><p>
-<a class="indexterm" name="id2586624"></a>
-<a class="indexterm" name="id2586631"></a>
+ </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2586617"></a>OpenLDAP Configuration</h4></div></div></div><p>
+<a class="indexterm" name="id2586625"></a>
+<a class="indexterm" name="id2586632"></a>
<a class="indexterm" name="id2586638"></a>
<a class="indexterm" name="id2586645"></a>
To include support for the sambaSamAccount object in an OpenLDAP directory
@@ -1290,10 +1290,10 @@ ObjectClass (1.3.6.1.4.1.7165.2.2.6 NAME 'sambaSamAccount' SUP top AUXILIARY
</pre><p>
</p><p>
<a class="indexterm" name="id2586682"></a>
-<a class="indexterm" name="id2586688"></a>
-<a class="indexterm" name="id2586695"></a>
-<a class="indexterm" name="id2586702"></a>
-<a class="indexterm" name="id2586709"></a>
+<a class="indexterm" name="id2586689"></a>
+<a class="indexterm" name="id2586696"></a>
+<a class="indexterm" name="id2586703"></a>
+<a class="indexterm" name="id2586710"></a>
<a class="indexterm" name="id2586716"></a>
<a class="indexterm" name="id2586723"></a>
<a class="indexterm" name="id2586730"></a>
@@ -1317,9 +1317,9 @@ include /etc/openldap/schema/samba.schema
</pre><p>
</p><p>
<a class="indexterm" name="id2586798"></a>
-<a class="indexterm" name="id2586804"></a>
-<a class="indexterm" name="id2586811"></a>
-<a class="indexterm" name="id2586818"></a>
+<a class="indexterm" name="id2586805"></a>
+<a class="indexterm" name="id2586812"></a>
+<a class="indexterm" name="id2586819"></a>
It is recommended that you maintain some indices on some of the most useful attributes,
as in the following example, to speed up searches made on sambaSamAccount ObjectClasses
(and possibly posixAccount and posixGroup as well):
@@ -1357,11 +1357,11 @@ index default sub
</p><pre class="screen">
<code class="prompt">root# </code><strong class="userinput"><code>/etc/init.d/slapd restart</code></strong>
</pre><p>
- </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2586888"></a>Initialize the LDAP Database</h4></div></div></div><p>
-<a class="indexterm" name="id2586896"></a>
-<a class="indexterm" name="id2586903"></a>
-<a class="indexterm" name="id2586910"></a>
-<a class="indexterm" name="id2586917"></a>
+ </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2586889"></a>Initialize the LDAP Database</h4></div></div></div><p>
+<a class="indexterm" name="id2586897"></a>
+<a class="indexterm" name="id2586904"></a>
+<a class="indexterm" name="id2586911"></a>
+<a class="indexterm" name="id2586918"></a>
Before you can add accounts to the LDAP database, you must create the account containers
that they will be stored in. The following LDIF file should be modified to match your
needs (DNS entries, and so on):
@@ -1424,14 +1424,14 @@ userPassword: {SSHA}c3ZM9tBaBo9autm1dL3waDS21+JSfQVz
</pre><p>
</p><p>
<a class="indexterm" name="id2586960"></a>
-<a class="indexterm" name="id2586966"></a>
+<a class="indexterm" name="id2586967"></a>
The userPassword shown above should be generated using <code class="literal">slappasswd</code>.
</p><p>
<a class="indexterm" name="id2586984"></a>
-<a class="indexterm" name="id2586990"></a>
+<a class="indexterm" name="id2586991"></a>
The following command will then load the contents of the LDIF file into the LDAP
database.
-<a class="indexterm" name="id2586999"></a>
+<a class="indexterm" name="id2587000"></a>
</p><pre class="screen">
<code class="prompt">$ </code><strong class="userinput"><code>slapadd -v -l initldap.dif</code></strong>
</pre><p>
@@ -1439,16 +1439,16 @@ userPassword: {SSHA}c3ZM9tBaBo9autm1dL3waDS21+JSfQVz
Do not forget to secure your LDAP server with an adequate access control list
as well as an admin password.
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
-<a class="indexterm" name="id2587031"></a>
+<a class="indexterm" name="id2587032"></a>
Before Samba can access the LDAP server, you need to store the LDAP admin password
in the Samba-3 <code class="filename">secrets.tdb</code> database by:
-<a class="indexterm" name="id2587046"></a>
+<a class="indexterm" name="id2587047"></a>
</p><pre class="screen">
<code class="prompt">root# </code><strong class="userinput"><code>smbpasswd -w <em class="replaceable"><code>secret</code></em></code></strong>
</pre><p>
- </p></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2587073"></a>Configuring Samba</h4></div></div></div><p>
-<a class="indexterm" name="id2587081"></a>
-<a class="indexterm" name="id2587088"></a>
+ </p></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2587074"></a>Configuring Samba</h4></div></div></div><p>
+<a class="indexterm" name="id2587082"></a>
+<a class="indexterm" name="id2587089"></a>
The following parameters are available in <code class="filename">smb.conf</code> only if your version of Samba was built with
LDAP support. Samba automatically builds with LDAP support if the LDAP libraries are found. The
best method to verify that Samba was built with LDAP support is:
@@ -1467,13 +1467,13 @@ userPassword: {SSHA}c3ZM9tBaBo9autm1dL3waDS21+JSfQVz
that includes <code class="literal">HAVE_LDAP_H</code> it is necessary to discover why the LDAP headers
and libraries were not found during compilation.
</p><p>LDAP-related smb.conf options include these:
- </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2587145"></a><em class="parameter"><code>passdb backend = ldapsam:url</code></em></td></tr><tr><td><a class="indexterm" name="id2587157"></a></td></tr><tr><td><a class="indexterm" name="id2587164"></a></td></tr><tr><td><a class="indexterm" name="id2587170"></a></td></tr><tr><td><a class="indexterm" name="id2587177"></a></td></tr><tr><td><a class="indexterm" name="id2587184"></a></td></tr><tr><td><a class="indexterm" name="id2587191"></a></td></tr><tr><td><a class="indexterm" name="id2587198"></a></td></tr><tr><td><a class="indexterm" name="id2587205"></a></td></tr><tr><td><a class="indexterm" name="id2587212"></a></td></tr><tr><td><a class="indexterm" name="id2587219"></a></td></tr><tr><td><a class="indexterm" name="id2587226"></a></td></tr><tr><td><a class="indexterm" name="id2587233"></a></td></tr><tr><td><a class="indexterm" name="id2587240"></a></td></tr></table><p>
+ </p><table class="simplelist" border="0" summary="Simple list"><tr><td><a class="indexterm" name="id2587145"></a><em class="parameter"><code>passdb backend = ldapsam:url</code></em></td></tr><tr><td><a class="indexterm" name="id2587157"></a></td></tr><tr><td><a class="indexterm" name="id2587164"></a></td></tr><tr><td><a class="indexterm" name="id2587171"></a></td></tr><tr><td><a class="indexterm" name="id2587178"></a></td></tr><tr><td><a class="indexterm" name="id2587185"></a></td></tr><tr><td><a class="indexterm" name="id2587192"></a></td></tr><tr><td><a class="indexterm" name="id2587199"></a></td></tr><tr><td><a class="indexterm" name="id2587206"></a></td></tr><tr><td><a class="indexterm" name="id2587212"></a></td></tr><tr><td><a class="indexterm" name="id2587219"></a></td></tr><tr><td><a class="indexterm" name="id2587226"></a></td></tr><tr><td><a class="indexterm" name="id2587233"></a></td></tr><tr><td><a class="indexterm" name="id2587240"></a></td></tr></table><p>
</p><p>
These are described in the <code class="filename">smb.conf</code> man page and so are not repeated here. However, an example
for use with an LDAP directory is shown in <a class="link" href="passdb.html#confldapex" title="Example 11.2. Configuration with LDAP">the Configuration with LDAP.</a>
- </p><div class="example"><a name="confldapex"></a><p class="title"><b>Example 11.2. Configuration with LDAP</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><a class="indexterm" name="id2587291"></a><em class="parameter"><code>security = user</code></em></td></tr><tr><td><a class="indexterm" name="id2587303"></a><em class="parameter"><code>encrypt passwords = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2587314"></a><em class="parameter"><code>netbios name = MORIA</code></em></td></tr><tr><td><a class="indexterm" name="id2587326"></a><em class="parameter"><code>workgroup = NOLDOR</code></em></td></tr><tr><td># LDAP related parameters:</td></tr><tr><td># Define the DN used when binding to the LDAP servers.</td></tr><tr><td># The password for this DN is not stored in smb.conf</td></tr><tr><td># Set it using 'smbpasswd -w secret' to store the</td></tr><tr><td># passphrase in the secrets.tdb file.</td></tr><tr><td># If the "ldap admin dn" value changes, it must be reset.</td></tr><tr><td><a class="indexterm" name="id2587363"></a><em class="parameter"><code>ldap admin dn = "cn=Manager,dc=quenya,dc=org"</code></em></td></tr><tr><td># SSL directory connections can be configured by:</td></tr><tr><td># ('off', 'start tls', or 'on' (default))</td></tr><tr><td><a class="indexterm" name="id2587383"></a><em class="parameter"><code>ldap ssl = start tls</code></em></td></tr><tr><td># syntax: passdb backend = ldapsam:ldap://server-name[:port]</td></tr><tr><td><a class="indexterm" name="id2587399"></a><em class="parameter"><code>passdb backend = ldapsam:ldap://frodo.quenya.org</code></em></td></tr><tr><td># smbpasswd -x delete the entire dn-entry</td></tr><tr><td><a class="indexterm" name="id2587415"></a><em class="parameter"><code>ldap delete dn = no</code></em></td></tr><tr><td># The machine and user suffix are added to the base suffix</td></tr><tr><td># wrote WITHOUT quotes. NULL suffixes by default</td></tr><tr><td><a class="indexterm" name="id2587436"></a><em class="parameter"><code>ldap user suffix = ou=People</code></em></td></tr><tr><td><a class="indexterm" name="id2587448"></a><em class="parameter"><code>ldap group suffix = ou=Groups</code></em></td></tr><tr><td><a class="indexterm" name="id2587460"></a><em class="parameter"><code>ldap machine suffix = ou=Computers</code></em></td></tr><tr><td># Trust UNIX account information in LDAP</td></tr><tr><td># (see the smb.conf man page for details)</td></tr><tr><td># Specify the base DN to use when searching the directory</td></tr><tr><td><a class="indexterm" name="id2587484"></a><em class="parameter"><code>ldap suffix = dc=quenya,dc=org</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="id2587498"></a>Accounts and Groups Management</h4></div></div></div><p>
- <a class="indexterm" name="id2587506"></a>
- <a class="indexterm" name="id2587513"></a>
+ </p><div class="example"><a name="confldapex"></a><p class="title"><b>Example 11.2. Configuration with LDAP</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><a class="indexterm" name="id2587292"></a><em class="parameter"><code>security = user</code></em></td></tr><tr><td><a class="indexterm" name="id2587303"></a><em class="parameter"><code>encrypt passwords = yes</code></em></td></tr><tr><td><a class="indexterm" name="id2587315"></a><em class="parameter"><code>netbios name = MORIA</code></em></td></tr><tr><td><a class="indexterm" name="id2587327"></a><em class="parameter"><code>workgroup = NOLDOR</code></em></td></tr><tr><td># LDAP related parameters:</td></tr><tr><td># Define the DN used when binding to the LDAP servers.</td></tr><tr><td># The password for this DN is not stored in smb.conf</td></tr><tr><td># Set it using 'smbpasswd -w secret' to store the</td></tr><tr><td># passphrase in the secrets.tdb file.</td></tr><tr><td># If the "ldap admin dn" value changes, it must be reset.</td></tr><tr><td><a class="indexterm" name="id2587363"></a><em class="parameter"><code>ldap admin dn = "cn=Manager,dc=quenya,dc=org"</code></em></td></tr><tr><td># SSL directory connections can be configured by:</td></tr><tr><td># ('off', 'start tls', or 'on' (default))</td></tr><tr><td><a class="indexterm" name="id2587384"></a><em class="parameter"><code>ldap ssl = start tls</code></em></td></tr><tr><td># syntax: passdb backend = ldapsam:ldap://server-name[:port]</td></tr><tr><td><a class="indexterm" name="id2587400"></a><em class="parameter"><code>passdb backend = ldapsam:ldap://frodo.quenya.org</code></em></td></tr><tr><td># smbpasswd -x delete the entire dn-entry</td></tr><tr><td><a class="indexterm" name="id2587416"></a><em class="parameter"><code>ldap delete dn = no</code></em></td></tr><tr><td># The machine and user suffix are added to the base suffix</td></tr><tr><td># wrote WITHOUT quotes. NULL suffixes by default</td></tr><tr><td><a class="indexterm" name="id2587436"></a><em class="parameter"><code>ldap user suffix = ou=People</code></em></td></tr><tr><td><a class="indexterm" name="id2587448"></a><em class="parameter"><code>ldap group suffix = ou=Groups</code></em></td></tr><tr><td><a class="indexterm" name="id2587460"></a><em class="parameter"><code>ldap machine suffix = ou=Computers</code></em></td></tr><tr><td># Trust UNIX account information in LDAP</td></tr><tr><td># (see the smb.conf man page for details)</td></tr><tr><td># Specify the base DN to use when searching the directory</td></tr><tr><td><a class="indexterm" name="id2587484"></a><em class="parameter"><code>ldap suffix = dc=quenya,dc=org</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="id2587498"></a>Accounts and Groups Management</h4></div></div></div><p>
+ <a class="indexterm" name="id2587507"></a>
+ <a class="indexterm" name="id2587514"></a>
Because user accounts are managed through the sambaSamAccount ObjectClass, you should
modify your existing administration tools to deal with sambaSamAccount attributes.
</p><p>
@@ -1488,8 +1488,8 @@ userPassword: {SSHA}c3ZM9tBaBo9autm1dL3waDS21+JSfQVz
NSS and PAM accordingly (usually, in the <code class="filename">/etc/openldap/sldap.conf</code>
configuration file).
</p><p>
-<a class="indexterm" name="id2587572"></a>
-<a class="indexterm" name="id2587579"></a>
+<a class="indexterm" name="id2587573"></a>
+<a class="indexterm" name="id2587580"></a>
<a class="indexterm" name="id2587586"></a>
<a class="indexterm" name="id2587593"></a>
In Samba-3, the group management system is based on POSIX
@@ -1498,26 +1498,26 @@ userPassword: {SSHA}c3ZM9tBaBo9autm1dL3waDS21+JSfQVz
groups). Samba-3 knows only about <code class="constant">Domain Groups</code>
and, unlike MS Windows 2000 and Active Directory, Samba-3 does not
support nested groups.
- </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2587611"></a>Security and sambaSamAccount</h4></div></div></div><p>
-<a class="indexterm" name="id2587619"></a>
+ </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2587612"></a>Security and sambaSamAccount</h4></div></div></div><p>
+<a class="indexterm" name="id2587620"></a>
There are two important points to remember when discussing the security
of sambaSAMAccount entries in the directory.
</p><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Never</em></span> retrieve the SambaLMPassword or
-<a class="indexterm" name="id2587638"></a>
+<a class="indexterm" name="id2587639"></a>
SambaNTPassword attribute values over an unencrypted LDAP session.</p></li><li><p><span class="emphasis"><em>Never</em></span> allow non-admin users to
view the SambaLMPassword or SambaNTPassword attribute values.</p></li></ul></div><p>
<a class="indexterm" name="id2587659"></a>
<a class="indexterm" name="id2587666"></a>
-<a class="indexterm" name="id2587672"></a>
+<a class="indexterm" name="id2587673"></a>
These password hashes are clear-text equivalents and can be used to impersonate
the user without deriving the original clear-text strings. For more information
on the details of LM/NT password hashes, refer to <a class="link" href="passdb.html" title="Chapter 11. Account Information Databases">the
Account Information Database section</a>.
</p><p>
-<a class="indexterm" name="id2587694"></a>
-<a class="indexterm" name="id2587701"></a>
+<a class="indexterm" name="id2587695"></a>
+<a class="indexterm" name="id2587702"></a>
<a class="indexterm" name="id2587708"></a>
-<a class="indexterm" name="id2587714"></a>
+<a class="indexterm" name="id2587715"></a>
To remedy the first security issue, the <a class="link" href="smb.conf.5.html#LDAPSSL">ldap ssl</a> <code class="filename">smb.conf</code>
parameter defaults to require an encrypted session (<a class="link" href="smb.conf.5.html#LDAPSSL">ldap ssl = on</a>) using the default port of <code class="constant">636</code> when
contacting the directory server. When using an OpenLDAP server, it
@@ -1525,16 +1525,16 @@ userPassword: {SSHA}c3ZM9tBaBo9autm1dL3waDS21+JSfQVz
In either case, you are strongly encouraged to use secure communications protocols
(so do not set <a class="link" href="smb.conf.5.html#LDAPSSL">ldap ssl = off</a>).
</p><p>
-<a class="indexterm" name="id2587775"></a>
+<a class="indexterm" name="id2587776"></a>
<a class="indexterm" name="id2587782"></a>
-<a class="indexterm" name="id2587788"></a>
+<a class="indexterm" name="id2587789"></a>
Note that the LDAPS protocol is deprecated in favor of the LDAPv3 StartTLS
extended operation. However, the OpenLDAP library still provides support for
the older method of securing communication between clients and servers.
</p><p>
-<a class="indexterm" name="id2587802"></a>
+<a class="indexterm" name="id2587803"></a>
<a class="indexterm" name="id2587810"></a>
-<a class="indexterm" name="id2587816"></a>
+<a class="indexterm" name="id2587817"></a>
The second security precaution is to prevent non-administrative users from
harvesting password hashes from the directory. This can be done using the
following ACL in <code class="filename">slapd.conf</code>:
@@ -1545,7 +1545,7 @@ access to attrs=SambaLMPassword,SambaNTPassword
by dn="cn=Samba Admin,ou=People,dc=quenya,dc=org" write
by * none
</pre><p>
-</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2587846"></a>LDAP Special Attributes for sambaSamAccounts</h4></div></div></div><p> The sambaSamAccount ObjectClass is composed of the attributes shown in next tables: <a class="link" href="passdb.html#attribobjclPartA" title="Table 11.3. Attributes in the sambaSamAccount ObjectClass (LDAP), Part A">Part A</a>, and <a class="link" href="passdb.html#attribobjclPartB" title="Table 11.4. Attributes in the sambaSamAccount ObjectClass (LDAP), Part B">Part B</a>.
+</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2587847"></a>LDAP Special Attributes for sambaSamAccounts</h4></div></div></div><p> The sambaSamAccount ObjectClass is composed of the attributes shown in next tables: <a class="link" href="passdb.html#attribobjclPartA" title="Table 11.3. Attributes in the sambaSamAccount ObjectClass (LDAP), Part A">Part A</a>, and <a class="link" href="passdb.html#attribobjclPartB" title="Table 11.4. Attributes in the sambaSamAccount ObjectClass (LDAP), Part B">Part B</a>.
</p><div class="table"><a name="attribobjclPartA"></a><p class="title"><b>Table 11.3. Attributes in the sambaSamAccount ObjectClass (LDAP), Part A</b></p><div class="table-contents"><table summary="Attributes in the sambaSamAccount ObjectClass (LDAP), Part A" border="1"><colgroup><col align="left"><col align="justify"></colgroup><tbody><tr><td align="left"><code class="constant">sambaLMPassword</code></td><td align="justify">The LanMan password 16-byte hash stored as a character
representation of a hexadecimal string.</td></tr><tr><td align="left"><code class="constant">sambaNTPassword</code></td><td align="justify">The NT password 16-byte hash stored as a character
representation of a hexadecimal string.</td></tr><tr><td align="left"><code class="constant">sambaPwdLastSet</code></td><td align="justify">The integer time in seconds since 1970 when the
@@ -1580,15 +1580,15 @@ access to attrs=SambaLMPassword,SambaNTPassword
</td></tr><tr><td align="left"><code class="constant">sambaSID</code></td><td align="justify">The security identifier(SID) of the user.
The Windows equivalent of UNIX UIDs.</td></tr><tr><td align="left"><code class="constant">sambaPrimaryGroupSID</code></td><td align="justify">The security identifier (SID) of the primary group
of the user.</td></tr><tr><td align="left"><code class="constant">sambaDomainName</code></td><td align="justify">Domain the user is part of.</td></tr></tbody></table></div></div><br class="table-break"><p>
-<a class="indexterm" name="id2588195"></a>
+<a class="indexterm" name="id2588196"></a>
<a class="indexterm" name="id2588202"></a>
The majority of these parameters are only used when Samba is acting as a PDC of
a domain (refer to <a class="link" href="samba-pdc.html" title="Chapter 4. Domain Control">Domain Control</a>, for details on
how to configure Samba as a PDC). The following four attributes
are only stored with the sambaSamAccount entry if the values are non-default values:
- </p><div class="itemizedlist"><a class="indexterm" name="id2588224"></a><a class="indexterm" name="id2588231"></a><a class="indexterm" name="id2588238"></a><a class="indexterm" name="id2588244"></a><ul type="disc"><li><p>sambaHomePath</p></li><li><p>sambaLogonScript</p></li><li><p>sambaProfilePath</p></li><li><p>sambaHomeDrive</p></li></ul></div><p>
-<a class="indexterm" name="id2588273"></a>
-<a class="indexterm" name="id2588280"></a>
+ </p><div class="itemizedlist"><a class="indexterm" name="id2588225"></a><a class="indexterm" name="id2588231"></a><a class="indexterm" name="id2588238"></a><a class="indexterm" name="id2588245"></a><ul type="disc"><li><p>sambaHomePath</p></li><li><p>sambaLogonScript</p></li><li><p>sambaProfilePath</p></li><li><p>sambaHomeDrive</p></li></ul></div><p>
+<a class="indexterm" name="id2588274"></a>
+<a class="indexterm" name="id2588281"></a>
<a class="indexterm" name="id2588287"></a>
These attributes are only stored with the sambaSamAccount entry if
the values are non-default values. For example, assume MORIA has now been
@@ -1600,7 +1600,7 @@ access to attrs=SambaLMPassword,SambaNTPassword
of the <a class="link" href="smb.conf.5.html#LOGONHOME">logon home</a> parameter is used in its place. Samba
will only write the attribute value to the directory entry if the value is
something other than the default (e.g., <code class="filename">\\MOBY\becky</code>).
- </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2588360"></a>Example LDIF Entries for a sambaSamAccount</h4></div></div></div><p>
+ </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2588361"></a>Example LDIF Entries for a sambaSamAccount</h4></div></div></div><p>
The following is a working LDIF that demonstrates the use of the SambaSamAccount ObjectClass:
</p><pre class="programlisting">
dn: uid=guest2, ou=People,dc=quenya,dc=org
@@ -1645,7 +1645,7 @@ sambaPwdCanChange: 0
sambaPwdMustChange: 2147483647
sambaNTPassword: 878D8014606CDA29677A44EFA1353FC7
</pre><p>
- </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2588408"></a>Password Synchronization</h4></div></div></div><p>
+ </p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2588409"></a>Password Synchronization</h4></div></div></div><p>
Samba-3 and later can update the non-Samba (LDAP) password stored with an account. When
using pam_ldap, this allows changing both UNIX and Windows passwords at once.
</p><p>The <a class="link" href="smb.conf.5.html#LDAPPASSWDSYNC">ldap passwd sync</a> options can have the values shown in
@@ -1663,7 +1663,7 @@ sambaNTPassword: 878D8014606CDA29677A44EFA1353FC7
<code class="filename">contrib/slapd-modules/smbk5pwd</code> subdirectory. This module can also be used with
OpenLDAP-2.2.
</p></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2588612"></a>Common Errors</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2588618"></a>Users Cannot Logon</h3></div></div></div><p>&#8220;<span class="quote">I've installed Samba, but now I can't log on with my UNIX account! </span>&#8221;</p><p>Make sure your user has been added to the current Samba <a class="link" href="smb.conf.5.html#PASSDBBACKEND">passdb backend</a>.
- Read the <a class="link" href="passdb.html#acctmgmttools" title="Account Management Tools">Account Management Tools,</a> for details.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2588655"></a>Configuration of <em class="parameter"><code>auth methods</code></em></h3></div></div></div><p>
+ Read the <a class="link" href="passdb.html#acctmgmttools" title="Account Management Tools">Account Management Tools,</a> for details.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2588656"></a>Configuration of <em class="parameter"><code>auth methods</code></em></h3></div></div></div><p>
When explicitly setting an <a class="link" href="smb.conf.5.html#AUTHMETHODS">auth methods</a> parameter,
<em class="parameter"><code>guest</code></em> must be specified as the first entry on the line
for example, <a class="link" href="smb.conf.5.html#AUTHMETHODS">auth methods = guest sam</a>.