Rebuild docs
[Samba.git] / docs / htmldocs / groupmapping.html
blob704b7996313357103dd4773418366bd4a7201d92
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 12. Configuring Group Mapping</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.59.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="unix-permissions.html" title="Chapter 11. UNIX Permission Bits and Windows NT Access Control Lists"><link rel="next" href="printing.html" title="Chapter 13. Printing Support"></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. Configuring Group Mapping</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="unix-permissions.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="printing.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><h2 class="title"><a name="groupmapping"></a>Chapter 12. Configuring Group Mapping</h2></div><div><div class="author"><h3 class="author">Jean François Micouleau</h3></div></div><div><div class="author"><h3 class="author">Gerald (Jerry) Carter</h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt>&lt;<a href="mailto:jerry@samba.org">jerry@samba.org</a>&gt;</tt></p></div></div></div></div></div><p>
3 Starting with Samba 3.0 alpha 2, new group mapping functionality
4 is available to create associations between Windows SIDs and UNIX
5 groups. The <i><tt>groupmap</tt></i> subcommand included with
6 the <b>net</b> tool can be used to manage these associations.
7 </p><p>
8 The first immediate reason to use the group mapping on a Samba PDC, is that
9 the <i><tt>domain admin group</tt></i> <tt>smb.conf</tt> has been removed.
10 This parameter was used to give the listed users membership in the &quot;Domain Admins&quot;
11 Windows group which gave local admin rights on their workstations (in
12 default configurations).
13 </p><p>
14 When installing NT/W2K on a computer, the installer program creates some users
15 and groups. Notably the 'Administrators' group, and gives to that group some
16 privileges like the ability to change the date and time or to kill any process
17 (or close too) running on the local machine. The 'Administrator' user is a
18 member of the 'Administrators' group, and thus 'inherit' the 'Administrators'
19 group privileges. If a 'joe' user is created and become a member of the
20 'Administrator' group, 'joe' has exactly the same rights as 'Administrator'.
21 </p><p>
22 When a NT/W2K machine is joined to a domain, the &quot;Domain Adminis&quot; group of the
23 PDC is added to the local 'Administrators' group of the workstation. Every
24 member of the 'Domain Administrators' group 'inherit' the
25 rights of the local 'Administrators' group when logging on the workstation.
26 </p><p>
27 The following steps describe how to make samba PDC users members of the
28 'Domain Admins' group?
29 </p><div class="orderedlist"><ol type="1"><li><p>create a unix group (usually in <tt>/etc/group</tt>),
30 let's call it domadm</p></li><li><p>add to this group the users that must be Administrators. For example
31 if you want joe,john and mary, your entry in <tt>/etc/group</tt> will
32 look like:</p><pre class="programlisting">
33 domadm:x:502:joe,john,mary
34 </pre></li><li><p>Map this domadm group to the &quot;Domain Admins&quot; group
35 by running the command:</p><p><tt>root# </tt><b><tt>net groupmap add ntgroup=&quot;Domain Admins&quot; unixgroup=domadm</tt></b></p><p>The quotes around &quot;Domain Admins&quot; are necessary due to the space in the group name. Also make
36 sure to leave no whitespace surrounding the equal character (=).</p></li></ol></div><p>Now joe, john and mary are domain administrators!</p><p>
37 It is possible to map any arbitrary UNIX group to any Windows NT
38 group as well as making any UNIX group a Windows domain group.
39 For example, if you wanted to include a UNIX group (e.g. acct) in a ACL on a
40 local file or printer on a domain member machine, you would flag
41 that group as a domain group by running the following on the Samba PDC:
42 </p><p><tt>root# </tt><b><tt>net groupmap add rid=1000 ntgroup=&quot;Accounting&quot; unixgroup=acct</tt></b></p><p>Be aware that the rid parmeter is a unsigned 32 bit integer that should
43 normally start at 1000. However, this rid must not overlap with any RID assigned
44 to a user. Verifying this is done differently depending on on the passdb backend
45 you are using. Future versions of the tools may perform the verification automatically,
46 but for now the burden in on you.</p><p>You can list the various groups in the mapping database by executing
47 <b>net groupmap list</b>. Here is an example:</p><pre class="programlisting"><tt>root# </tt>net groupmap list
48 System Administrators (S-1-5-21-2547222302-1596225915-2414751004-1002) -&gt; sysadmin
49 Domain Admins (S-1-5-21-2547222302-1596225915-2414751004-512) -&gt; domadmin
50 Domain Users (S-1-5-21-2547222302-1596225915-2414751004-513) -&gt; domuser
51 Domain Guests (S-1-5-21-2547222302-1596225915-2414751004-514) -&gt; domguest
52 </pre><p>For complete details on <b>net groupmap</b>, refer to the
53 net(8) man page.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="unix-permissions.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="printing.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 11. UNIX Permission Bits and Windows NT Access Control Lists </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 13. Printing Support</td></tr></table></div></body></html>