summaryrefslogtreecommitdiff
path: root/docs/htmldocs/groupmapping.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/htmldocs/groupmapping.html')
-rw-r--r--docs/htmldocs/groupmapping.html100
1 files changed, 50 insertions, 50 deletions
diff --git a/docs/htmldocs/groupmapping.html b/docs/htmldocs/groupmapping.html
index a78b9f4317..39fb34ce62 100644
--- a/docs/htmldocs/groupmapping.html
+++ b/docs/htmldocs/groupmapping.html
@@ -1,5 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 12. Mapping MS Windows and Unix Groups</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.60.1"><link rel="home" href="index.html" title="SAMBA Project Documentation"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="previous" href="passdb.html" title="Chapter 11. Account Information Databases"><link rel="next" href="AccessControls.html" title="Chapter 13. File, Directory and Share Access Controls"></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 12. Mapping MS Windows and Unix Groups</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="passdb.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="AccessControls.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="groupmapping"></a>Chapter 12. Mapping MS Windows and Unix Groups</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jean François</span> <span class="surname">Micouleau</span></h3></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><tt class="email">&lt;<a href="mailto:jerry@samba.org">jerry@samba.org</a>&gt;</tt></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><tt class="email">&lt;<a href="mailto:jht@samba.org">jht@samba.org</a>&gt;</tt></p></div></div></div></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="groupmapping.html#id2916109">Features and Benefits</a></dt><dt><a href="groupmapping.html#id2916209">Discussion</a></dt><dd><dl><dt><a href="groupmapping.html#id2916398">Example Configuration</a></dt></dl></dd><dt><a href="groupmapping.html#id2916463">Configuration Scripts</a></dt><dd><dl><dt><a href="groupmapping.html#id2916477">Sample smb.conf add group script</a></dt><dt><a href="groupmapping.html#id2916544">Script to configure Group Mapping</a></dt></dl></dd><dt><a href="groupmapping.html#id2916618">Common Errors</a></dt><dd><dl><dt><a href="groupmapping.html#id2916633">Adding Groups Fails</a></dt><dt><a href="groupmapping.html#id2916694">Adding MS Windows Groups to MS Windows Groups Fails</a></dt></dl></dd></dl></div><p>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 12. Mapping MS Windows and Unix Groups</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.60.1"><link rel="home" href="index.html" title="SAMBA Project Documentation"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="previous" href="passdb.html" title="Chapter 11. Account Information Databases"><link rel="next" href="AccessControls.html" title="Chapter 13. File, Directory and Share Access Controls"></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 12. Mapping MS Windows and Unix Groups</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="passdb.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="AccessControls.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="groupmapping"></a>Chapter 12. Mapping MS Windows and Unix Groups</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Jean François</span> <span class="surname">Micouleau</span></h3></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><tt class="email">&lt;<a href="mailto:jerry@samba.org">jerry@samba.org</a>&gt;</tt></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><tt class="email">&lt;<a href="mailto:jht@samba.org">jht@samba.org</a>&gt;</tt></p></div></div></div></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="groupmapping.html#id2921449">Features and Benefits</a></dt><dt><a href="groupmapping.html#id2921551">Discussion</a></dt><dd><dl><dt><a href="groupmapping.html#id2921742">Example Configuration</a></dt></dl></dd><dt><a href="groupmapping.html#id2921806">Configuration Scripts</a></dt><dd><dl><dt><a href="groupmapping.html#id2921820">Sample smb.conf add group script</a></dt><dt><a href="groupmapping.html#id2921889">Script to configure Group Mapping</a></dt></dl></dd><dt><a href="groupmapping.html#id2921981">Common Errors</a></dt><dd><dl><dt><a href="groupmapping.html#id2921997">Adding Groups Fails</a></dt><dt><a href="groupmapping.html#id2922057">Adding MS Windows Groups to MS Windows Groups Fails</a></dt></dl></dd></dl></div><p>
Starting with Samba-3, new group mapping functionality is available to create associations
between Windows group SIDs and UNIX groups. The <i class="parameter"><tt>groupmap</tt></i> subcommand
included with the <span class="application">net</span> tool can be used to manage these associations.
@@ -9,12 +8,12 @@
be specified in <tt class="filename">smb.conf</tt>. This parameter was used to give the listed users membership
in the <tt class="constant">Domain Admins</tt> Windows group which gave local admin rights on their workstations
(in default configurations).
- </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2916109"></a>Features and Benefits</h2></div></div><div></div></div><p>
+ </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2921449"></a>Features and Benefits</h2></div></div><div></div></div><p>
Samba allows the administrator to create MS Windows NT4 / 200x group accounts and to
arbitrarily associate them with Unix/Linux group accounts.
</p><p>
Group accounts can be managed using the MS Windows NT4 or MS Windows 200x MMC tools
- so long as appropriate interface scripts have been provided to <tt class="filename">smb.conf</tt>
+ so long as appropriate interface scripts have been provided to <tt class="filename">smb.conf</tt>.
</p><p>
Administrators should be aware that where <tt class="filename">smb.conf</tt> group interface scripts make
direct calls to the Unix/Linux system tools (eg: the shadow utilities, <b class="command">groupadd</b>,
@@ -27,43 +26,43 @@
There are several possible work-arounds for the operating system tools limitation. One
method is to use a script that generates a name for the Unix/Linux system group that
fits the operating system limits, and that then just passes the Unix/Linux group id (GID)
- back to the calling samba interface. This will provide a dynamic work-around solution.
+ back to the calling Samba interface. This will provide a dynamic work-around solution.
</p><p>
Another work-around is to manually create a Unix/Linux group, then manually create the
MS Windows NT4 / 200x group on the Samba server and then use the <b class="command">net groupmap</b>
tool to connect the two to each other.
- </p></div><div xmlns:ns26="" class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2916209"></a>Discussion</h2></div></div><div></div></div><p>
+ </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2921551"></a>Discussion</h2></div></div><div></div></div><p>
When installing <span class="application">MS Windows NT4 / 200x</span> on a computer, the installation
- program creates default users and groups. Notably the <tt class="constant">Administrators</tt> group,
- and gives to that group privileges necessary privilidges to perform essential system tasks.
- eg: Ability to change the date and time or to kill any process (or close too) running on the
+ program creates default users and groups, notably the <tt class="constant">Administrators</tt> group,
+ and gives that group privileges necessary privileges to perform essential system tasks.
+ eg: Ability to change the date and time or to kill (or close) any process running on the
local machine.
</p><p>
The 'Administrator' user is a member of the 'Administrators' group, and thus inherits
'Administrators' group privileges. If a 'joe' user is created to be a member of the
'Administrator' group, 'joe' has exactly the same rights as 'Administrator'.
</p><p>
- When an MS Windows NT4 / W200x is made a domain member, the &quot;Domain Adminis&quot; group of the
+ When an MS Windows NT4 / W200x is made a domain member, the &quot;Domain Admins&quot; group of the
PDC is added to the local 'Administrators' group of the workstation. Every member of the
'Domain Administrators' group inherits the rights of the local 'Administrators' group when
logging on the workstation.
</p><p>
- The following steps describe how to make samba PDC users members of the 'Domain Admins' group?
+ The following steps describe how to make Samba PDC users members of the 'Domain Admins' group?
</p><div class="orderedlist"><ol type="1"><li><p>
create a unix group (usually in <tt class="filename">/etc/group</tt>), let's call it domadm
- </p></li><li xmlns:ns24=""><p>add to this group the users that must be Administrators. For example
- if you want joe,john and mary, your entry in <tt class="filename">/etc/group</tt> will
+ </p></li><li><p>add to this group the users that must be Administrators. For example
+ if you want joe, john and mary, your entry in <tt class="filename">/etc/group</tt> will
look like:
</p><pre class="programlisting">
domadm:x:502:joe,john,mary
- </pre><ns24:p>
- </ns24:p></li><li xmlns:ns25=""><p>
+ </pre><p>
+ </p></li><li><p>
Map this domadm group to the &quot;Domain Admins&quot; group by running the command:
- </p><ns25:p>
- </ns25:p><pre class="screen">
+ </p><p>
+ </p><pre class="screen">
<tt class="prompt">root# </tt><b class="userinput"><tt>net groupmap add ntgroup=&quot;Domain Admins&quot; unixgroup=domadm</tt></b>
- </pre><ns25:p>
- </ns25:p><p>
+ </pre><p>
+ </p><p>
The quotes around &quot;Domain Admins&quot; are necessary due to the space in the group name.
Also make sure to leave no whitespace surrounding the equal character (=).
</p></li></ol></div><p>
@@ -73,36 +72,36 @@
making any UNIX group a Windows domain group. For example, if you wanted to include a
UNIX group (e.g. acct) in a ACL on a local file or printer on a domain member machine,
you would flag that group as a domain group by running the following on the Samba PDC:
- </p><ns26:p>
- </ns26:p><pre class="screen">
+ </p><p>
+ </p><pre class="screen">
<tt class="prompt">root# </tt><b class="userinput"><tt>net groupmap add rid=1000 ntgroup=&quot;Accounting&quot; unixgroup=acct</tt></b>
- </pre><ns26:p>
- </ns26:p><p>
- Be aware that the RID parmeter is a unsigned 32 bit integer that should
+ </pre><p>
+ </p><p>
+ Be aware that the RID parameter is a unsigned 32 bit integer that should
normally start at 1000. However, this rid must not overlap with any RID assigned
to a user. Verifying this is done differently depending on on the passdb backend
you are using. Future versions of the tools may perform the verification automatically,
but for now the burden is on you.
- </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2916398"></a>Example Configuration</h3></div></div><div></div></div><p>
+ </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2921742"></a>Example Configuration</h3></div></div><div></div></div><p>
You can list the various groups in the mapping database by executing
<b class="command">net groupmap list</b>. Here is an example:
- </p><ns26:p>
- </ns26:p><pre class="screen">
+ </p><p>
+ </p><pre class="screen">
<tt class="prompt">root# </tt> <b class="userinput"><tt>net groupmap list</tt></b>
System Administrators (S-1-5-21-2547222302-1596225915-2414751004-1002) -&gt; sysadmin
Domain Admins (S-1-5-21-2547222302-1596225915-2414751004-512) -&gt; domadmin
Domain Users (S-1-5-21-2547222302-1596225915-2414751004-513) -&gt; domuser
Domain Guests (S-1-5-21-2547222302-1596225915-2414751004-514) -&gt; domguest
- </pre><ns26:p>
- </ns26:p><p>
+ </pre><p>
+ </p><p>
For complete details on <b class="command">net groupmap</b>, refer to the net(8) man page.
- </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2916463"></a>Configuration Scripts</h2></div></div><div></div></div><p>
+ </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2921806"></a>Configuration Scripts</h2></div></div><div></div></div><p>
Everyone needs tools. Some of us like to create our own, others prefer to use canned tools
(ie: prepared by someone else for general use).
- </p><div xmlns:ns27="" class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2916477"></a>Sample <tt class="filename">smb.conf</tt> add group script</h3></div></div><div></div></div><p>
- A script to great complying group names for use by the samba group interfaces:
- </p><ns27:p>
-</ns27:p><div class="example"><a name="id2916499"></a><p class="title"><b>Example 12.1. smbgrpadd.sh</b></p><pre class="programlisting">
+ </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2921820"></a>Sample <tt class="filename">smb.conf</tt> add group script</h3></div></div><div></div></div><p>
+ A script to great complying group names for use by the Samba group interfaces:
+ </p><p>
+</p><div class="example"><a name="id2921843"></a><p class="title"><b>Example 12.1. smbgrpadd.sh</b></p><pre class="programlisting">
#!/bin/bash
@@ -112,22 +111,23 @@ groupadd smbtmpgrp00
thegid=`cat /etc/group | grep smbtmpgrp00 | cut -d &quot;:&quot; -f3`
# Now change the name to what we want for the MS Windows networking end
-cat /etc/group | sed s/smbtmpgrp00/$1/g &gt; /etc/group
+cp /etc/group /etc/group.bak
+cat /etc/group.bak | sed s/smbtmpgrp00/$1/g &gt; /etc/group
# Now return the GID as would normally happen.
echo $thegid
exit 0
-</pre></div><ns27:p>
-</ns27:p><ns27:p>
+</pre></div><p>
+</p><p>
The <tt class="filename">smb.conf</tt> entry for the above script would look like:
- </ns27:p><pre class="programlisting">
+ </p><pre class="programlisting">
add group script = /path_to_tool/smbgrpadd.sh %g
- </pre><ns27:p>
- </ns27:p></div><div xmlns:ns28="" class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2916544"></a>Script to configure Group Mapping</h3></div></div><div></div></div><p>
+ </pre><p>
+ </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2921889"></a>Script to configure Group Mapping</h3></div></div><div></div></div><p>
In our example we have created a Unix/Linux group called <i class="parameter"><tt>ntadmin</tt></i>.
Our script will create the additional groups <i class="parameter"><tt>Engineers, Marketoids, Gnomes</tt></i>:
- </p><ns28:p>
-</ns28:p><pre class="programlisting">
+ </p><p>
+</p><pre class="programlisting">
#!/bin/bash
net groupmap modify ntgroup=&quot;Domain Admins&quot; unixgroup=ntadmin
@@ -150,21 +150,21 @@ net groupmap modify ntgroup=&quot;Power Users&quot; unixgroup=sys
#net groupmap add ntgroup=&quot;Engineers&quot; unixgroup=Engineers type=d
#net groupmap add ntgroup=&quot;Marketoids&quot; unixgroup=Marketoids type=d
#net groupmap add ntgroup=&quot;Gnomes&quot; unixgroup=Gnomes type=d
-</pre><ns28:p>
-</ns28:p><p>
- Of course it is expected that the admininstrator will modify this to suit local needs.
+</pre><p>
+</p><p>
+ Of course it is expected that the administrator will modify this to suit local needs.
For information regarding the use of the <b class="command">net groupmap</b> tool please
refer to the man page.
- </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2916618"></a>Common Errors</h2></div></div><div></div></div><p>
+ </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2921981"></a>Common Errors</h2></div></div><div></div></div><p>
At this time there are many little surprises for the unwary administrator. In a real sense
it is imperative that every step of automated control scripts must be carefully tested
manually before putting them into active service.
-</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2916633"></a>Adding Groups Fails</h3></div></div><div></div></div><p>
+</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2921997"></a>Adding Groups Fails</h3></div></div><div></div></div><p>
This is a common problem when the <b class="command">groupadd</b> is called directly
- by the samba interface script for the <i class="parameter"><tt>add group script</tt></i> in
+ by the Samba interface script for the <i class="parameter"><tt>add group script</tt></i> in
the <tt class="filename">smb.conf</tt> file.
</p><p>
- The most common cause of failure is an attempt to add an MS Windows group acocunt
+ The most common cause of failure is an attempt to add an MS Windows group account
that has either an upper case character and/or a space character in it.
</p><p>
There are three possible work-arounds. Firstly, use only group names that comply
@@ -173,6 +173,6 @@ manually before putting them into active service.
third option is to manually create a Unix/Linux group account that can substitute
for the MS Windows group name, then use the procedure listed above to map that group
to the MS Windows group.
- </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2916694"></a>Adding MS Windows Groups to MS Windows Groups Fails</h3></div></div><div></div></div><p>
+ </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2922057"></a>Adding MS Windows Groups to MS Windows Groups Fails</h3></div></div><div></div></div><p>
Samba-3 does NOT support nested groups from the MS Windows control environment.
</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="passdb.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="optional.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="AccessControls.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 11. Account Information Databases </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 13. File, Directory and Share Access Controls</td></tr></table></div></body></html>