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