This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.
[kai/samba.git] / docs / docbook / projdoc / GROUP-MAPPING-HOWTO.sgml
1 <?xml version="1.0" encoding="iso8859-1"?>
2 <chapter id="groupmapping">
3 <chapterinfo>
4         <author>
5                 <firstname>Jean François</firstname><surname>Micouleau</surname>
6         </author>
7 </chapterinfo>
8
9 <title>Group mapping HOWTO</title>
10
11 <para> 
12 Starting with Samba 3.0 alpha 2, a new group mapping function is available. The
13 current method (likely to change) to manage the groups is a new command called
14 <command>smbgroupedit</command>.
15 </para>
16
17 <para>
18 The first immediate reason to use the group mapping on a PDC, is that
19 the <command>domain admin group</command> of <filename>smb.conf</filename> is 
20 now gone. This parameter was used to give the listed users local admin rights 
21 on their workstations. It was some magic stuff that simply worked but didn't
22 scale very well for complex setups.
23 </para>
24
25 <para>
26 Let me explain how it works on NT/W2K, to have this magic fade away.
27 When installing NT/W2K on a computer, the installer program creates some users
28 and groups. Notably the 'Administrators' group, and gives to that group some
29 privileges like the ability to change the date and time or to kill any process
30 (or close too) running on the local machine. The 'Administrator' user is a
31 member of the 'Administrators' group, and thus 'inherit' the 'Administrators'
32 group privileges. If a 'joe' user is created and become a member of the
33 'Administrator' group, 'joe' has exactly the same rights as 'Administrator'.
34 </para>
35
36 <para>
37 When a NT/W2K machine is joined to a domain, during that phase, the "Domain
38 Administrators' group of the PDC is added to the 'Administrators' group of the
39 workstation. Every members of the 'Domain Administrators' group 'inherit' the
40 rights of the 'Administrators' group when logging on the workstation.
41 </para>
42
43 <para>
44 You are now wondering how to make some of your samba PDC users members of the
45 'Domain Administrators' ? That's really easy.
46 </para>
47
48 <orderedlist> 
49 <listitem><para>create a unix group (usually in <filename>/etc/group</filename>), let's call it domadm</para></listitem>
50 <listitem><para>add to this group the users that must be Administrators. For example if you want joe,john and mary, your entry in <filename>/etc/group</filename> will look like:</para>
51
52 <para><programlisting>
53 domadm:x:502:joe,john,mary
54 </programlisting></para>
55
56 </listitem>
57
58 <listitem><para>Map this domadm group to the <command>domain admins</command> group by running the command:</para>
59
60 <para><command>smbgroupedit -c "Domain Admins" -u domadm</command></para></listitem>
61
62 </orderedlist>
63
64 <para>You're set, joe, john and mary are domain administrators !</para>
65
66 <para>
67 Like the Domain Admins group, you can map any arbitrary Unix group to any NT
68 group. You can also make any Unix group a domain group. For example, on a domain
69 member machine (an NT/W2K or a samba server running winbind), you would like to
70 give access to a certain directory to some users who are member of a group on
71 your samba PDC. Flag that group as a domain group by running:
72 </para>
73
74 <para><command>smbgroupedit -a unixgroup -td</command></para>
75
76 <para>You can list the various groups in the mapping database like this</para>
77 <para><command>smbgroupedit -v</command></para>
78
79 </chapter>