Split "clobber" function and variables into its own file before it
[jra/samba/.git] / docs / docbook / manpages / smbgroupedit.8.sgml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <refentry id="smbgroupedit.8">
3
4 <refmeta>
5         <refentrytitle>smbgroupedit</refentrytitle>
6         <manvolnum>8</manvolnum>
7 </refmeta>
8
9 <refnamediv>
10         <refname>smbgroupedit</refname>
11         <refpurpose>Query/set/change UNIX - Windows NT group mapping</refpurpose>
12 </refnamediv>
13
14 <refsynopsisdiv>
15         <cmdsynopsis>
16                 <command>smbroupedit</command>
17                 <arg choice="opt">-v [l|s]</arg>
18                 <arg choice="opt">-a UNIX-groupname [-d NT-groupname|-p privilege|]</arg>
19         </cmdsynopsis>
20 </refsynopsisdiv>
21
22
23
24 <refsect1>
25
26 <title>DESCRIPTION</title>
27
28 <para>
29 This program is part of the <citerefentry><refentrytitle>Samba</refentrytitle>
30 <manvolnum>7</manvolnum></citerefentry> suite.</para>
31
32 <para>
33 The  smbgroupedit  command  allows for mapping unix groups
34 to NT Builtin, Domain, or Local groups.  Also
35 allows setting privileges for that group, such as saAddUser,
36 etc.
37 </para>
38
39 </refsect1>
40
41 <refsect1>
42         <title>OPTIONS</title>
43
44         <variablelist>
45                 <varlistentry>
46                 <term>-v[l|s]</term>
47                 <listitem><para>This option will list all groups available
48                 in the Windows NT domain in which samba is operating.
49                 </para>
50
51                 <variablelist>
52                 <varlistentry>
53                 <term>-l</term>
54                 <listitem><para>give a long listing, of the format:</para>
55
56 <para><programlisting>
57 "NT Group Name"
58     SID            :
59     Unix group     :
60     Group type     :
61     Comment        :
62     Privilege      :
63 </programlisting></para>
64
65 <para>For example:
66 <programlisting>
67 Users
68     SID       : S-1-5-32-545
69     Unix group: -1
70     Group type: Local group
71     Comment   :
72     Privilege : No privilege
73 </programlisting></para>
74
75                 </listitem>
76                 </varlistentry>
77
78                 <varlistentry>
79                 <term>-s</term>
80                 <listitem><para>display a short listing of the format:</para>
81
82 <para><programlisting>
83 NTGroupName(SID) -> UnixGroupName
84 </programlisting></para>
85
86 <para>For example:
87 <programlisting>
88 Users (S-1-5-32-545) -> -1
89 </programlisting></para>
90
91                 </listitem>
92                 </varlistentry>
93                 </variablelist>
94
95                 </listitem>
96                 </varlistentry>
97
98         </variablelist>
99 </refsect1>
100
101
102
103 <refsect1>
104 <title>FILES</title>
105
106 <para></para>
107
108 </refsect1>
109
110
111
112 <refsect1>
113
114 <title>EXIT STATUS</title>
115
116 <para>
117 <command>smbgroupedit</command> returns a status of 0 if the
118 operation completed successfully, and a value of 1 in the event
119 of a failure.
120 </para>
121
122 </refsect1>
123
124
125
126
127 <!-- ****************************************************
128 **************************************************** -->
129 <refsect1>
130
131 <title>EXAMPLES</title>
132
133
134 <para>
135 To make a subset of your samba PDC users members of
136 the 'Domain Admins'  Global group:
137 </para>
138
139 <orderedlist>
140
141         <listitem><para>create a unix group (usually in
142         <filename>/etc/group</filename>), let's call it <constant>domadm</constant>.
143         </para></listitem>
144
145         <listitem><para>add to this group the users that you want to be
146         domain administrators. For example if you want joe, john and mary,
147         your entry in <filename>/etc/group</filename> will look like:
148         </para>
149
150         <para>domadm:x:502:joe,john,mary</para>
151         </listitem>
152
153         <listitem><para>map this domadm group to the 'domain admins' group:</para>
154         <orderedlist>
155                 <listitem><para>Get the SID for the Windows NT "Domain Admins" group:</para>
156 <para><programlisting>
157 <prompt>root# </prompt><command>smbgroupedit -vs | grep "Domain Admins"</command>
158 Domain Admins (S-1-5-21-1108995562-3116817432-1375597819-512) -> -1
159 </programlisting></para></listitem>
160
161                 <listitem><para>map the unix domadm group to the Windows NT
162                 "Domain Admins" group, by running the command:
163 <programlisting>
164 <prompt>root# </prompt><command>smbgroupedit \
165 -c S-1-5-21-1108995562-3116817432-1375597819-512 \
166 -u domadm -td</command>
167 </programlisting></para>
168
169                 <para><emphasis>warning:</emphasis> don't copy and paste this sample, the
170                 Domain Admins SID (the S-1-5-21-...-512) is different for every PDC.
171                 </para> </listitem>
172         </orderedlist>
173         </listitem>
174 </orderedlist>
175
176 <para>
177 To verify that your mapping has taken effect:
178 <programlisting>
179 <prompt>root# </prompt><command>smbgroupedit -vs|grep "Domain Admins"</command>
180 Domain Admins (S-1-5-21-1108995562-3116817432-1375597819-512) -> domadm
181 </programlisting></para>
182
183 <para>To give access to a certain directory on a domain member machine (an
184 NT/W2K or a samba server running winbind) to some users who are member
185 of a group on your samba PDC, flag that group as a domain group:
186 <programlisting>
187 <prompt>root# </prompt><command>smbgroupedit -a unixgroup -td</command>
188 </programlisting></para>
189
190 </refsect1>
191
192 <refsect1>
193
194 <title>VERSION</title>
195
196 <para>
197 This man page is correct for the 3.0alpha releases of
198 the Samba suite.
199 </para>
200 </refsect1>
201
202 <refsect1>
203 <title>SEE ALSO</title>
204
205 <para>
206 <citerefentry><refentrytitle>smb.conf</refentrytitle>
207 <manvolnum>5</manvolnum></citerefentry></para>
208
209 </refsect1>
210
211
212 <refsect1>
213 <title>AUTHOR</title>
214
215 <para>
216 The original Samba software and related utilities
217 were created by Andrew Tridgell. Samba is now developed
218 by the Samba Team as an Open Source project similar
219 to the way the Linux kernel is developed.
220 </para>
221
222 <para>
223 <command>smbgroupedit</command> was written by Jean Francois Micouleau.
224 The current set of manpages and documentation is maintained
225 by the Samba Team in the same fashion as the Samba source code. The conversion
226 to DocBook XML 4.2 for Samba 3.0 was done by Alexander Bokovoy.</para>
227 </refsect1>
228
229 </refentry>