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