syncing docs with HEAD
[kai/samba.git] / docs / htmldocs / groupmapping.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Group mapping HOWTO</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.77"><LINK
9 REL="HOME"
10 TITLE="SAMBA Project Documentation"
11 HREF="samba-howto-collection.html"><LINK
12 REL="UP"
13 TITLE="Optional configuration"
14 HREF="optional.html"><LINK
15 REL="PREVIOUS"
16 TITLE="HOWTO Access Samba source code via CVS"
17 HREF="cvs-access.html"><LINK
18 REL="NEXT"
19 TITLE="Samba performance issues"
20 HREF="speed.html"></HEAD
21 ><BODY
22 CLASS="CHAPTER"
23 BGCOLOR="#FFFFFF"
24 TEXT="#000000"
25 LINK="#0000FF"
26 VLINK="#840084"
27 ALINK="#0000FF"
28 ><DIV
29 CLASS="NAVHEADER"
30 ><TABLE
31 SUMMARY="Header navigation table"
32 WIDTH="100%"
33 BORDER="0"
34 CELLPADDING="0"
35 CELLSPACING="0"
36 ><TR
37 ><TH
38 COLSPAN="3"
39 ALIGN="center"
40 >SAMBA Project Documentation</TH
41 ></TR
42 ><TR
43 ><TD
44 WIDTH="10%"
45 ALIGN="left"
46 VALIGN="bottom"
47 ><A
48 HREF="cvs-access.html"
49 ACCESSKEY="P"
50 >Prev</A
51 ></TD
52 ><TD
53 WIDTH="80%"
54 ALIGN="center"
55 VALIGN="bottom"
56 ></TD
57 ><TD
58 WIDTH="10%"
59 ALIGN="right"
60 VALIGN="bottom"
61 ><A
62 HREF="speed.html"
63 ACCESSKEY="N"
64 >Next</A
65 ></TD
66 ></TR
67 ></TABLE
68 ><HR
69 ALIGN="LEFT"
70 WIDTH="100%"></DIV
71 ><DIV
72 CLASS="CHAPTER"
73 ><H1
74 ><A
75 NAME="GROUPMAPPING"
76 ></A
77 >Chapter 22. Group mapping HOWTO</H1
78 ><P
79
80 Starting with Samba 3.0 alpha 2, a new group mapping function is available. The
81 current method (likely to change) to manage the groups is a new command called
82 <B
83 CLASS="COMMAND"
84 >smbgroupedit</B
85 >.</P
86 ><P
87 >The first immediate reason to use the group mapping on a PDC, is that
88 the <B
89 CLASS="COMMAND"
90 >domain admin group</B
91 > of <TT
92 CLASS="FILENAME"
93 >smb.conf</TT
94 > is 
95 now gone. This parameter was used to give the listed users local admin rights 
96 on their workstations. It was some magic stuff that simply worked but didn't
97 scale very well for complex setups.</P
98 ><P
99 >Let me explain how it works on NT/W2K, to have this magic fade away.
100 When installing NT/W2K on a computer, the installer program creates some users
101 and groups. Notably the 'Administrators' group, and gives to that group some
102 privileges like the ability to change the date and time or to kill any process
103 (or close too) running on the local machine. The 'Administrator' user is a
104 member of the 'Administrators' group, and thus 'inherit' the 'Administrators'
105 group privileges. If a 'joe' user is created and become a member of the
106 'Administrator' group, 'joe' has exactly the same rights as 'Administrator'.</P
107 ><P
108 >When a NT/W2K machine is joined to a domain, during that phase, the "Domain
109 Administrators' group of the PDC is added to the 'Administrators' group of the
110 workstation. Every members of the 'Domain Administrators' group 'inherit' the
111 rights of the 'Administrators' group when logging on the workstation.</P
112 ><P
113 >You are now wondering how to make some of your samba PDC users members of the
114 'Domain Administrators' ? That's really easy.</P
115 ><P
116 ></P
117 ><OL
118 TYPE="1"
119 ><LI
120 ><P
121 >create a unix group (usually in <TT
122 CLASS="FILENAME"
123 >/etc/group</TT
124 >), let's call it domadm</P
125 ></LI
126 ><LI
127 ><P
128 >add to this group the users that must be Administrators. For example if you want joe,john and mary, your entry in <TT
129 CLASS="FILENAME"
130 >/etc/group</TT
131 > will look like:</P
132 ><P
133 ><PRE
134 CLASS="PROGRAMLISTING"
135 >domadm:x:502:joe,john,mary</PRE
136 ></P
137 ></LI
138 ><LI
139 ><P
140 >Map this domadm group to the <B
141 CLASS="COMMAND"
142 >domain admins</B
143 > group by running the command:</P
144 ><P
145 ><B
146 CLASS="COMMAND"
147 >smbgroupedit -c "Domain Admins" -u domadm</B
148 ></P
149 ></LI
150 ></OL
151 ><P
152 >You're set, joe, john and mary are domain administrators !</P
153 ><P
154 >Like the Domain Admins group, you can map any arbitrary Unix group to any NT
155 group. You can also make any Unix group a domain group. For example, on a domain
156 member machine (an NT/W2K or a samba server running winbind), you would like to
157 give access to a certain directory to some users who are member of a group on
158 your samba PDC. Flag that group as a domain group by running:</P
159 ><P
160 ><B
161 CLASS="COMMAND"
162 >smbgroupedit -a unixgroup -td</B
163 ></P
164 ><P
165 >You can list the various groups in the mapping database like this</P
166 ><P
167 ><B
168 CLASS="COMMAND"
169 >smbgroupedit -v</B
170 ></P
171 ></DIV
172 ><DIV
173 CLASS="NAVFOOTER"
174 ><HR
175 ALIGN="LEFT"
176 WIDTH="100%"><TABLE
177 SUMMARY="Footer navigation table"
178 WIDTH="100%"
179 BORDER="0"
180 CELLPADDING="0"
181 CELLSPACING="0"
182 ><TR
183 ><TD
184 WIDTH="33%"
185 ALIGN="left"
186 VALIGN="top"
187 ><A
188 HREF="cvs-access.html"
189 ACCESSKEY="P"
190 >Prev</A
191 ></TD
192 ><TD
193 WIDTH="34%"
194 ALIGN="center"
195 VALIGN="top"
196 ><A
197 HREF="samba-howto-collection.html"
198 ACCESSKEY="H"
199 >Home</A
200 ></TD
201 ><TD
202 WIDTH="33%"
203 ALIGN="right"
204 VALIGN="top"
205 ><A
206 HREF="speed.html"
207 ACCESSKEY="N"
208 >Next</A
209 ></TD
210 ></TR
211 ><TR
212 ><TD
213 WIDTH="33%"
214 ALIGN="left"
215 VALIGN="top"
216 >HOWTO Access Samba source code via CVS</TD
217 ><TD
218 WIDTH="34%"
219 ALIGN="center"
220 VALIGN="top"
221 ><A
222 HREF="optional.html"
223 ACCESSKEY="U"
224 >Up</A
225 ></TD
226 ><TD
227 WIDTH="33%"
228 ALIGN="right"
229 VALIGN="top"
230 >Samba performance issues</TD
231 ></TR
232 ></TABLE
233 ></DIV
234 ></BODY
235 ></HTML
236 >