syncing docs with HEAD
[kai/samba.git] / docs / htmldocs / smbgroupedit.8.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >smbgroupedit</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
9 "></HEAD
10 ><BODY
11 CLASS="REFENTRY"
12 BGCOLOR="#FFFFFF"
13 TEXT="#000000"
14 LINK="#0000FF"
15 VLINK="#840084"
16 ALINK="#0000FF"
17 ><H1
18 ><A
19 NAME="SMBGROUPEDIT">smbgroupedit</H1
20 ><DIV
21 CLASS="REFNAMEDIV"
22 ><A
23 NAME="AEN5"
24 ></A
25 ><H2
26 >Name</H2
27 >smbgroupedit&nbsp;--&nbsp;Query/set/change UNIX - Windows NT group mapping</DIV
28 ><DIV
29 CLASS="REFSYNOPSISDIV"
30 ><A
31 NAME="AEN8"><H2
32 >Synopsis</H2
33 ><P
34 ><B
35 CLASS="COMMAND"
36 >smbroupedit</B
37 > [-v [l|s]] [-a UNIX-groupname [-d NT-groupname|-p privilege|]]</P
38 ></DIV
39 ><DIV
40 CLASS="REFSECT1"
41 ><A
42 NAME="AEN13"
43 ></A
44 ><H2
45 >DESCRIPTION</H2
46 ><P
47 >This program is part of the <A
48 HREF="samba.7.html"
49 TARGET="_top"
50 >Samba</A
51 >
52 suite.</P
53 ><P
54 >The  smbgroupedit  command  allows for mapping unix groups
55 to NT Builtin, Domain, or Local groups.  Also
56 allows setting privileges for that group, such as saAddUser,
57 etc.</P
58 ></DIV
59 ><DIV
60 CLASS="REFSECT1"
61 ><A
62 NAME="AEN18"
63 ></A
64 ><H2
65 >OPTIONS</H2
66 ><P
67 ></P
68 ><DIV
69 CLASS="VARIABLELIST"
70 ><DL
71 ><DT
72 >-v[l|s]</DT
73 ><DD
74 ><P
75 >This option will list all groups available
76                 in the Windows NT domain in which samba is operating.
77                 </P
78 ><P
79 ></P
80 ><DIV
81 CLASS="VARIABLELIST"
82 ><DL
83 ><DT
84 >-l</DT
85 ><DD
86 ><P
87 >give a long listing, of the format:</P
88 ><P
89 ><TABLE
90 BORDER="0"
91 BGCOLOR="#E0E0E0"
92 WIDTH="90%"
93 ><TR
94 ><TD
95 ><PRE
96 CLASS="PROGRAMLISTING"
97 >"NT Group Name"
98     SID            :
99     Unix group     :
100     Group type     :
101     Comment        :
102     Privilege      :</PRE
103 ></TD
104 ></TR
105 ></TABLE
106 ></P
107 ><P
108 >For examples,</P
109 ><P
110 ><TABLE
111 BORDER="0"
112 BGCOLOR="#E0E0E0"
113 WIDTH="90%"
114 ><TR
115 ><TD
116 ><PRE
117 CLASS="PROGRAMLISTING"
118 >Users
119     SID       : S-1-5-32-545
120     Unix group: -1
121     Group type: Local group
122     Comment   :
123     Privilege : No privilege</PRE
124 ></TD
125 ></TR
126 ></TABLE
127 ></P
128 ></DD
129 ><DT
130 >-s</DT
131 ><DD
132 ><P
133 >display a short listing of the format:</P
134 ><P
135 ><TABLE
136 BORDER="0"
137 BGCOLOR="#E0E0E0"
138 WIDTH="90%"
139 ><TR
140 ><TD
141 ><PRE
142 CLASS="PROGRAMLISTING"
143 >NTGroupName(SID) -&#62; UnixGroupName</PRE
144 ></TD
145 ></TR
146 ></TABLE
147 ></P
148 ><P
149 >For example,</P
150 ><P
151 ><TABLE
152 BORDER="0"
153 BGCOLOR="#E0E0E0"
154 WIDTH="90%"
155 ><TR
156 ><TD
157 ><PRE
158 CLASS="PROGRAMLISTING"
159 >Users (S-1-5-32-545) -&#62; -1</PRE
160 ></TD
161 ></TR
162 ></TABLE
163 ></P
164 ></DD
165 ></DL
166 ></DIV
167 ></DD
168 ></DL
169 ></DIV
170 ></DIV
171 ><DIV
172 CLASS="REFSECT1"
173 ><A
174 NAME="AEN44"
175 ></A
176 ><H2
177 >FILES</H2
178 ><P
179 ></P
180 ></DIV
181 ><DIV
182 CLASS="REFSECT1"
183 ><A
184 NAME="AEN47"
185 ></A
186 ><H2
187 >EXIT STATUS</H2
188 ><P
189 ><B
190 CLASS="COMMAND"
191 >smbgroupedit</B
192 > returns a status of 0 if the
193 operation completed successfully, and a value of 1 in the event
194 of a failure.</P
195 ></DIV
196 ><DIV
197 CLASS="REFSECT1"
198 ><A
199 NAME="AEN51"
200 ></A
201 ><H2
202 >EXAMPLES</H2
203 ><P
204 >To make a subset of your samba PDC users members of
205 the 'Domain Admins'  Global group:</P
206 ><P
207 ></P
208 ><OL
209 TYPE="1"
210 ><LI
211 ><P
212 >create a unix group (usually in
213         <TT
214 CLASS="FILENAME"
215 >/etc/group</TT
216 >), let's call it <TT
217 CLASS="CONSTANT"
218 >domadm</TT
219 >.
220         </P
221 ></LI
222 ><LI
223 ><P
224 >add to this group the users that you want to be
225         domain administrators. For example if you want joe, john and mary,
226         your entry in <TT
227 CLASS="FILENAME"
228 >/etc/group</TT
229 > will look like:
230         </P
231 ><P
232 >domadm:x:502:joe,john,mary</P
233 ></LI
234 ><LI
235 ><P
236 >map this domadm group to the 'domain admins' group:
237         </P
238 ><P
239 ></P
240 ><OL
241 TYPE="a"
242 ><LI
243 ><P
244 >Get the SID for the Windows NT "Domain Admins"
245                 group:</P
246 ><P
247 ><TABLE
248 BORDER="0"
249 BGCOLOR="#E0E0E0"
250 WIDTH="90%"
251 ><TR
252 ><TD
253 ><PRE
254 CLASS="PROGRAMLISTING"
255 ><TT
256 CLASS="PROMPT"
257 >root# </TT
258 ><B
259 CLASS="COMMAND"
260 >smbgroupedit -vs | grep "Domain Admins"</B
261 >
262 Domain Admins (S-1-5-21-1108995562-3116817432-1375597819-512) -&#62; -1</PRE
263 ></TD
264 ></TR
265 ></TABLE
266 ></P
267 ></LI
268 ><LI
269 ><P
270 >map the unix domadm group to the Windows NT
271                 "Domain Admins" group, by running the command:
272                 </P
273 ><P
274 ><TABLE
275 BORDER="0"
276 BGCOLOR="#E0E0E0"
277 WIDTH="90%"
278 ><TR
279 ><TD
280 ><PRE
281 CLASS="PROGRAMLISTING"
282 ><TT
283 CLASS="PROMPT"
284 >root# </TT
285 ><B
286 CLASS="COMMAND"
287 >smbgroupedit \
288 -c S-1-5-21-1108995562-3116817432-1375597819-512 \
289 -u domadm -td</B
290 ></PRE
291 ></TD
292 ></TR
293 ></TABLE
294 ></P
295 ><P
296 >               <I
297 CLASS="EMPHASIS"
298 >warning:</I
299 > don't copy and paste this sample, the
300                 Domain Admins SID (the S-1-5-21-...-512) is different for every PDC.
301                 </P
302 ></LI
303 ></OL
304 ></LI
305 ></OL
306 ><P
307 >To verify that your mapping has taken effect:</P
308 ><P
309 ><TABLE
310 BORDER="0"
311 BGCOLOR="#E0E0E0"
312 WIDTH="100%"
313 ><TR
314 ><TD
315 ><PRE
316 CLASS="PROGRAMLISTING"
317 ><TT
318 CLASS="PROMPT"
319 >root# </TT
320 ><B
321 CLASS="COMMAND"
322 >smbgroupedit -vs|grep "Domain Admins"</B
323 >
324 Domain Admins (S-1-5-21-1108995562-3116817432-1375597819-512) -&#62; domadm</PRE
325 ></TD
326 ></TR
327 ></TABLE
328 ></P
329 ><P
330 >To give access to a certain directory on a domain member machine (an
331 NT/W2K or a samba server running winbind) to some users who are member
332 of a group on your samba PDC, flag that group as a domain group:</P
333 ><P
334 ><TABLE
335 BORDER="0"
336 BGCOLOR="#E0E0E0"
337 WIDTH="100%"
338 ><TR
339 ><TD
340 ><PRE
341 CLASS="PROGRAMLISTING"
342 ><TT
343 CLASS="PROMPT"
344 >root# </TT
345 ><B
346 CLASS="COMMAND"
347 >smbgroupedit -a unixgroup -td</B
348 ></PRE
349 ></TD
350 ></TR
351 ></TABLE
352 ></P
353 ></DIV
354 ><DIV
355 CLASS="REFSECT1"
356 ><A
357 NAME="AEN90"
358 ></A
359 ><H2
360 >VERSION</H2
361 ><P
362 >This man page is correct for the 3.0alpha releases of
363 the Samba suite.</P
364 ></DIV
365 ><DIV
366 CLASS="REFSECT1"
367 ><A
368 NAME="AEN93"
369 ></A
370 ><H2
371 >SEE ALSO</H2
372 ><P
373 ><A
374 HREF="smb.conf.5.html"
375 TARGET="_top"
376 >smb.conf(5)</A
377 ></P
378 ></DIV
379 ><DIV
380 CLASS="REFSECT1"
381 ><A
382 NAME="AEN97"
383 ></A
384 ><H2
385 >AUTHOR</H2
386 ><P
387 >The original Samba software and related utilities
388 were created by Andrew Tridgell. Samba is now developed
389 by the Samba Team as an Open Source project similar
390 to the way the Linux kernel is developed.</P
391 ><P
392 ><B
393 CLASS="COMMAND"
394 >smbgroupedit</B
395 > was written by Jean Francois Micouleau.
396 The current set of manpages and documentation is maintained
397 by the Samba Team in the same fashion as the Samba source code.</P
398 ></DIV
399 ></BODY
400 ></HTML
401 >