messaging3: Remove two uses of talloc_tos()
[Samba.git] / docs-xml / Samba3-HOWTO / TOSHARG-RightsAndPriviliges.xml
blob94f535e3e1d1c01a59fcc3ca14d7c2e74787ad6d
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE chapter PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <chapter id="rights">
4 <chapterinfo>
5         &author.jerry;
6         &author.jht;
7 </chapterinfo>
9 <title>User Rights and Privileges</title>
11 <para>
12 <indexterm><primary>Windows user</primary></indexterm>
13 <indexterm><primary>Windows group</primary></indexterm>
14 <indexterm><primary>machine accounts</primary></indexterm>
15 <indexterm><primary>ADS</primary></indexterm>
16 The administration of Windows user, group, and machine accounts in the Samba
17 domain-controlled network necessitates interfacing between the MS Windows
18 networking environment and the UNIX operating system environment. The right
19 (permission) to add machines to the Windows security domain can be assigned
20 (set) to non-administrative users both in Windows NT4 domains and
21 Active Directory domains.
22 </para>
24 <para>
25 <indexterm><primary>Windows NT4/2kX/XPPro</primary></indexterm>
26 <indexterm><primary>machine account</primary></indexterm>
27 <indexterm><primary>trusted</primary></indexterm>
28 <indexterm><primary>user logons</primary></indexterm>
29 The addition of Windows NT4/2kX/XPPro machines to the domain necessitates the
30 creation of a machine account for each machine added. The machine account is
31 a necessity that is used to validate that the machine can be trusted to permit
32 user logons.
33 </para>
35 <para>
36 <indexterm><primary>user accounts</primary></indexterm>
37 <indexterm><primary>special account</primary></indexterm>
38 <indexterm><primary>account name</primary></indexterm>
39 <indexterm><primary>/bin/false</primary></indexterm>
40 <indexterm><primary>/dev/null</primary></indexterm>
41 <indexterm><primary>man-in-the-middle</primary></indexterm>
42 Machine accounts are analogous to user accounts, and thus in implementing them on a UNIX machine that is
43 hosting Samba (i.e., on which Samba is running), it is necessary to create a special type of user account.
44 Machine accounts differ from  normal user accounts in that the account name (login ID) is terminated with a
45 <literal>$</literal> sign. An additional difference is that this type of account should not ever be able to
46 log into the UNIX environment as a system user and therefore is set to have a shell of
47 <command>/bin/false</command> and a home directory of <command>/dev/null.</command> The machine
48 account is used only to authenticate domain member machines during start-up. This security measure
49 is designed to block man-in-the-middle attempts to violate network integrity.
50 </para>
52 <note><para>
53 <indexterm><primary>computer accounts</primary></indexterm>
54 <indexterm><primary>domain member servers</primary></indexterm>
55 <indexterm><primary>domain controller</primary></indexterm>
56 <indexterm><primary>credentials</primary></indexterm>
57 <indexterm><primary>secure authentication</primary></indexterm>
58 Machine (computer) accounts are used in the Windows NT OS family to store security
59 credentials for domain member servers and workstations. When the domain member
60 starts up, it goes through a validation process that includes an exchange of
61 credentials with a domain controller. If the domain member fails to authenticate
62 using the credentials known for it by domain controllers, the machine will be refused
63 all access by domain users. The computer account is essential to the way that MS 
64 Windows secures authentication.
65 </para></note>
67 <para>
68 <indexterm><primary>UNIX system accounts</primary></indexterm>
69 <indexterm><primary>system administrator</primary></indexterm>
70 <indexterm><primary>root</primary></indexterm>
71 <indexterm><primary>UID</primary></indexterm>
72 The creation of UNIX system accounts has traditionally been the sole right of
73 the system administrator, better known as the <constant>root</constant> account.
74 It is possible in the UNIX environment to create multiple users who have the
75 same UID. Any UNIX user who has a UID=0 is inherently the same as the
76 <constant>root</constant> account user.
77 </para>
79 <para>
80 <indexterm><primary>system interface scripts</primary></indexterm>
81 <indexterm><primary>CIFS function calls</primary></indexterm>
82 <indexterm><primary>root account</primary></indexterm>
83 <indexterm><primary>UNIX host system</primary></indexterm>
84 All versions of Samba call system interface scripts that permit CIFS function
85 calls that are used to manage users, groups, and machine accounts
86 in the UNIX environment. All versions of Samba up to and including version 3.0.10
87 required the use of a Windows administrator account that unambiguously maps to
88 the UNIX <constant>root</constant> account to permit the execution of these
89 interface scripts. The requirement to do this has understandably met with some
90 disdain and consternation among Samba administrators, particularly where it became
91 necessary to permit people who should not possess <constant>root</constant>-level
92 access to the UNIX host system.
93 </para>
95 <sect1>
96 <title>Rights Management Capabilities</title>
98 <para>
99 <indexterm><primary>Windows privilege model</primary></indexterm>
100 <indexterm><primary>privilege model</primary></indexterm>
101 <indexterm><primary>rights assigned</primary></indexterm>
102 <indexterm><primary>SID</primary></indexterm>
103 Samba 3.0.11 introduced support for the Windows privilege model.  This model
104 allows certain rights to be assigned to a user or group SID.  In order to enable
105 this feature, <smbconfoption name="enable privileges">yes</smbconfoption>
106 must be defined in the <smbconfsection name="global"/> section of the &smb.conf; file.
107 </para>
109 <para>
110 <indexterm><primary>rights</primary></indexterm>
111 <indexterm><primary>privileges</primary></indexterm>
112 <indexterm><primary>manage privileges</primary></indexterm>
113 Currently, the rights supported in Samba are listed in <link linkend="rp-privs"/>.
114 The remainder of this chapter explains how to manage and use these privileges on Samba servers.
115 </para>
117 <indexterm><primary>SeMachineAccountPrivilege</primary></indexterm>
118 <indexterm><primary>SePrintOperatorPrivilege</primary></indexterm>
119 <indexterm><primary>SeAddUsersPrivilege</primary></indexterm>
120 <indexterm><primary>SeRemoteShutdownPrivilege</primary></indexterm>
121 <indexterm><primary>SeDiskOperatorPrivilege</primary></indexterm>
122 <indexterm><primary>SeTakeOwnershipPrivilege</primary></indexterm>
123 <table id="rp-privs">
124         <title>Current Privilege Capabilities</title>
125         <tgroup cols="2">
126                 <colspec align="right"/>
127                 <colspec align="left"/>
128                 <thead>
129                         <row>
130                                 <entry align="left">Privilege</entry>
131                                 <entry align="left">Description</entry>
132                         </row>
133                 </thead>
134                 <tbody>
135                         <row>
136                                 <entry><para>SeMachineAccountPrivilege</para></entry>
137                                 <entry><para>Add machines to domain</para></entry>
138                         </row>
139                         <row>
140                                 <entry><para>SePrintOperatorPrivilege</para></entry>
141                                 <entry><para>Manage printers</para></entry>
142                         </row>
143                         <row>
144                                 <entry><para>SeAddUsersPrivilege</para></entry>
145                                 <entry><para>Add users and groups to the domain</para></entry>
146                         </row>
147                         <row>
148                                 <entry><para>SeRemoteShutdownPrivilege</para></entry>
149                                 <entry><para>Force shutdown from a remote system</para></entry>
150                         </row>
151                         <row>
152                                 <entry><para>SeDiskOperatorPrivilege</para></entry>
153                                 <entry><para>Manage disk share</para></entry>
154                         </row>
155 <!-- These are not used at this time - so void them from the docs.
156                         <row>
157                                 <entry><para>SeBackupPrivilege</para></entry>
158                                 <entry><para>Back up files and directories</para></entry>
159                         </row>
160                         <row>
161                                 <entry><para>SeRestorePrivilege</para></entry>
162                                 <entry><para>Restore files and directories</para></entry>
163                         </row>
164 **** End of commented out section **** -->    
165                         <row>
166                                 <entry><para>SeTakeOwnershipPrivilege</para></entry>
167                                 <entry><para>Take ownership of files or other objects</para></entry>
168                         </row>
169             </tbody>
170         </tgroup>
171 </table>
173 <sect2>
174 <title>Using the <quote>net rpc rights</quote> Utility</title>
176 <para>
177 <indexterm><primary>managing rights</primary></indexterm>
178 <indexterm><primary>rights assigned</primary></indexterm>
179 <indexterm><primary>NT4 User Manager for Domains</primary></indexterm>
180 <indexterm><primary>command-line utility</primary></indexterm>
181 <indexterm><primary>administrative actions</primary></indexterm>
182 There are two primary means of managing the rights assigned to users and groups
183 on a Samba server.  The <command>NT4 User Manager for Domains</command> may be
184 used from any Windows NT4, 2000, or XP Professional domain member client to
185 connect to a Samba domain controller and view/modify the rights assignments.
186 This application, however, appears to have bugs when run on a client running
187 Windows 2000 or later; therefore, Samba provides a command-line utility for
188 performing the necessary administrative actions.
189 </para>
191 <para>
192 The <command>net rpc rights</command> utility in Samba 3.0.11 has three new subcommands:
193 </para>
195 <variablelist>
196         <varlistentry><term>list [name|accounts]</term>
197                 <listitem><para>
198 <indexterm><primary>net</primary><secondary>rpc</secondary><tertiary>list</tertiary></indexterm>
199 <indexterm><primary>available rights</primary></indexterm>
200 <indexterm><primary>privileges assigned</primary></indexterm>
201 <indexterm><primary>privileged accounts</primary></indexterm>
202                 When called with no arguments, <command>net rpc list</command>
203                 simply lists the available rights on the server.  When passed
204                 a specific user or group name, the tool lists the privileges
205                 currently assigned to the specified account.  When invoked using
206                 the special string <constant>accounts</constant>,
207                 <command>net rpc rights list</command> returns a list of all
208                 privileged accounts on the server and the assigned rights.
209                 </para></listitem>
210         </varlistentry>
212         <varlistentry><term>grant &lt;user&gt; &lt;right [right ...]&gt;</term>
213                 <listitem><para>
214 <indexterm><primary>assign rights</primary></indexterm>
215 <indexterm><primary>grant rights</primary></indexterm>
216 <indexterm><primary>add client machines</primary></indexterm>
217 <indexterm><primary>user or group</primary></indexterm>
218                 When called with no arguments, this function is used to assign
219                 a list of rights to a specified user or group.  For example,
220                 to grant the members of the Domain Admins group on a Samba domain controller,
221                 the capability to add client machines to the domain, one would run:
222 <screen>
223 &rootprompt; net -S server -U domadmin rpc rights grant \
224          'DOMAIN\Domain Admins' SeMachineAccountPrivilege
225 </screen>
226                 The following syntax has the same result:
227 <indexterm><primary>net</primary><secondary>rpc</secondary><tertiary>rights grant</tertiary></indexterm>
228 <screen>
229 &rootprompt; net rpc rights grant 'DOMAIN\Domain Admins' \
230      SeMachineAccountPrivilege -S server -U domadmin
231 </screen>
232                 More than one privilege can be assigned by specifying a
233                 list of rights separated by spaces. The parameter 'Domain\Domain Admins'
234                 must be quoted with single ticks or using double-quotes to prevent
235                 the backslash and the space from being interpreted by the system shell.
236                 </para></listitem>
237         </varlistentry>
239         <varlistentry><term>revoke &lt;user&gt; &lt;right [right ...]&gt;</term>
240                 <listitem><para>
241                 This command is similar in format to <command>net rpc rights grant</command>.  Its
242                 effect is to remove an assigned right (or list of rights) from a user or group.
243                 </para></listitem>
244         </varlistentry>
246 </variablelist>
248 <note><para>
249 <indexterm><primary>member</primary></indexterm>
250 <indexterm><primary>Domain Admins</primary></indexterm>
251 <indexterm><primary>revoke privileges</primary></indexterm>
252 You must be connected as a member of the Domain Admins group to be able to grant or revoke privileges assigned
253 to an account.  This capability is inherent to the Domain Admins group and is not configurable. There are no
254 default rights and privileges, except the ability for a member of the Domain Admins group to assign them.
255 This means that all administrative rights and privileges (other than the ability to assign them) must be 
256 explicitly assigned, even for the Domain Admins group.
257 </para></note>
259 <para>
260 <indexterm><primary>performed as root</primary></indexterm>
261 <indexterm><primary>necessary rights</primary></indexterm>
262 <indexterm><primary>add machine script</primary></indexterm>
263 <indexterm><primary></primary></indexterm>
264 By default, no privileges are initially assigned to any account because certain actions will be performed as
265 root once smbd determines that a user has the necessary rights.  For example, when joining a client to a
266 Windows domain, <parameter>add machine script</parameter> must be executed with superuser rights in most 
267 cases.  For this reason, you should be very careful about handing out privileges to accounts.
268 </para>
270 <para>
271 <indexterm><primary>Access</primary></indexterm>
272 <indexterm><primary>root user</primary></indexterm>
273 <indexterm><primary>bypasses privilege</primary></indexterm>
274 Access as the root user (UID=0) bypasses all privilege checks.
275 </para>
277 </sect2>
279 <sect2>
280 <title>Description of Privileges</title>
282 <para>
283 <indexterm><primary>privileges</primary></indexterm>
284 <indexterm><primary>additional privileges</primary></indexterm>
285 <indexterm><primary>house-keeping</primary></indexterm>
286 The privileges that have been implemented in Samba-3.0.11 are shown below.  It is possible, and likely, that
287 additional privileges may be implemented in later releases of Samba. It is also likely that any privileges
288 currently implemented but not used may be removed from future releases as a housekeeping matter, so it is
289 important that the successful as well as unsuccessful use of these facilities should be reported on the Samba
290 mailing lists.
291 </para>
293 <variablelist>
294         <varlistentry><term>SeAddUsersPrivilege</term>
295                 <listitem><para>
296 <indexterm><primary>SeAddUsersPrivilege</primary></indexterm>
297 <indexterm><primary>smbd</primary></indexterm>
298 <indexterm><primary>net rpc user add</primary></indexterm>
299                 This right determines whether or not smbd will allow the
300                 user to create new user or group accounts via such tools
301                 as <command>net rpc user add</command> or 
302                 <command>NT4 User Manager for Domains.</command>
303                 </para></listitem>
304         </varlistentry>
306         <varlistentry><term>SeDiskOperatorPrivilege</term>
307                 <listitem><para>
308 <indexterm><primary>SeDiskOperatorPrivilege</primary></indexterm>
309 <indexterm><primary>add/delete/change share</primary></indexterm>
310 <indexterm><primary>ACL</primary></indexterm>
311                 Accounts that possess this right will be able to execute
312                 scripts defined by the <command>add/delete/change</command>
313                 share command in &smb.conf; file as root.  Such users will
314                 also be able to modify the ACL associated with file shares
315                 on the Samba server.
316                 </para></listitem>
317         </varlistentry>
319         <varlistentry><term>SeMachineAccountPrivilege</term>
320                 <listitem><para>
321 <indexterm><primary>SeMachineAccountPrivilege</primary></indexterm>
322 <indexterm><primary>right to join domain</primary></indexterm>
323 <indexterm><primary>join client</primary></indexterm>
324                 This right controls whether or not the user can join client
325                 machines to a Samba-controlled domain.
326                 </para></listitem>
327         </varlistentry>
329         <varlistentry><term>SePrintOperatorPrivilege</term>
330                 <listitem><para>
331 <indexterm><primary>SePrintOperatorPrivilege</primary></indexterm>
332 <indexterm><primary>privilege</primary></indexterm>
333 <indexterm><primary>global right</primary></indexterm>
334 <indexterm><primary>administrative rights</primary></indexterm>
335 <indexterm><primary>printers admin</primary></indexterm>
336                 Administrative rights to printers are only controlled exclusively
337                 by this right and the security descriptor associated with the
338                 printer object in the registry.
339                 </para></listitem>
340         </varlistentry>
342         <varlistentry><term>SeRemoteShutdownPrivilege</term>
343                 <listitem><para>
344 <indexterm><primary>SeRemoteShutdownPrivilege</primary></indexterm>
345 <indexterm><primary>rebooting server</primary></indexterm>
346 <indexterm><primary>aborting shutdown</primary></indexterm>
347                 Samba provides two hooks for shutting down or rebooting
348                 the server and for aborting a previously issued shutdown
349                 command.  Since this is an operation normally limited by
350                 the operating system to the root user, an account must possess this
351                 right to be able to execute either of these hooks.
352                 </para></listitem>
353         </varlistentry>
355         <varlistentry><term>SeTakeOwnershipPrivilege</term>
356                 <listitem><para>
357 <indexterm><primary>SeTakeOwnershipPrivilege</primary></indexterm>
358 <indexterm><primary>take ownership</primary></indexterm>
359                 This right permits users to take ownership of files and directories.
360                 </para></listitem>
361         </varlistentry>
363 </variablelist>
365 </sect2>
367 <sect2>
368 <title>Privileges Supported by Windows 2000 Domain Controllers</title>
370 <para>
371     For reference purposes, a Windows NT4 Primary Domain Controller reports support for the following
372         privileges:
373 <indexterm><primary>SeCreateTokenPrivilege</primary></indexterm>
374 <indexterm><primary>SeAssignPrimaryTokenPrivilege</primary></indexterm>
375 <indexterm><primary>SeLockMemoryPrivilege</primary></indexterm>
376 <indexterm><primary>SeIncreaseQuotaPrivilege</primary></indexterm>
377 <indexterm><primary>SeMachineAccountPrivilege</primary></indexterm>
378 <indexterm><primary>SeTcbPrivilege</primary></indexterm>
379 <indexterm><primary>SeSecurityPrivilege</primary></indexterm>
380 <indexterm><primary>SeTakeOwnershipPrivilege</primary></indexterm>
381 <indexterm><primary>SeLoadDriverPrivilege</primary></indexterm>
382 <indexterm><primary>SeSystemProfilePrivilege</primary></indexterm>
383 <indexterm><primary>SeSystemtimePrivilege</primary></indexterm>
384 <indexterm><primary>SeProfileSingleProcessPrivilege</primary></indexterm>
385 <indexterm><primary>SeIncreaseBasePriorityPrivilege</primary></indexterm>
386 <indexterm><primary>SeCreatePagefilePrivilege</primary></indexterm>
387 <indexterm><primary>SeCreatePermanentPrivilege</primary></indexterm>
388 <indexterm><primary>SeBackupPrivilege</primary></indexterm>
389 <indexterm><primary>SeRestorePrivilege</primary></indexterm>
390 <indexterm><primary>SeShutdownPrivilege</primary></indexterm>
391 <indexterm><primary>SeDebugPrivilege</primary></indexterm>
392 <indexterm><primary>SeAuditPrivilege</primary></indexterm>
393 <indexterm><primary>SeSystemEnvironmentPrivilege</primary></indexterm>
394 <indexterm><primary>SeChangeNotifyPrivilege</primary></indexterm>
395 <indexterm><primary>SeRemoteShutdownPrivilege</primary></indexterm>
396 <screen>
397          SeCreateTokenPrivilege  Create a token object
398   SeAssignPrimaryTokenPrivilege  Replace a process level token
399           SeLockMemoryPrivilege  Lock pages in memory
400        SeIncreaseQuotaPrivilege  Increase quotas
401       SeMachineAccountPrivilege  Add workstations to domain
402                  SeTcbPrivilege  Act as part of the operating system
403             SeSecurityPrivilege  Manage auditing and security log
404        SeTakeOwnershipPrivilege  Take ownership of files or other objects
405           SeLoadDriverPrivilege  Load and unload device drivers
406        SeSystemProfilePrivilege  Profile system performance
407           SeSystemtimePrivilege  Change the system time
408 SeProfileSingleProcessPrivilege  Profile single process
409 SeIncreaseBasePriorityPrivilege  Increase scheduling priority
410       SeCreatePagefilePrivilege  Create a pagefile
411      SeCreatePermanentPrivilege  Create permanent shared objects
412               SeBackupPrivilege  Back up files and directories
413              SeRestorePrivilege  Restore files and directories
414             SeShutdownPrivilege  Shut down the system
415                SeDebugPrivilege  Debug programs
416                SeAuditPrivilege  Generate security audits
417    SeSystemEnvironmentPrivilege  Modify firmware environment values
418         SeChangeNotifyPrivilege  Bypass traverse checking
419       SeRemoteShutdownPrivilege  Force shutdown from a remote system
420 </screen>
421         And Windows 200x/XP Domain Controllers and workstations reports to support the following privileges:
422 <indexterm><primary>SeCreateTokenPrivilege</primary></indexterm>
423 <indexterm><primary>SeAssignPrimaryTokenPrivilege</primary></indexterm>
424 <indexterm><primary>SeLockMemoryPrivilege</primary></indexterm>
425 <indexterm><primary>SeIncreaseQuotaPrivilege</primary></indexterm>
426 <indexterm><primary>SeMachineAccountPrivilege</primary></indexterm>
427 <indexterm><primary>SeTcbPrivilege</primary></indexterm>
428 <indexterm><primary>SeSecurityPrivilege</primary></indexterm>
429 <indexterm><primary>SeTakeOwnershipPrivilege</primary></indexterm>
430 <indexterm><primary>SeLoadDriverPrivilege</primary></indexterm>
431 <indexterm><primary>SeSystemProfilePrivilege</primary></indexterm>
432 <indexterm><primary>SeSystemtimePrivilege</primary></indexterm>
433 <indexterm><primary>SeProfileSingleProcessPrivilege</primary></indexterm>
434 <indexterm><primary>SeIncreaseBasePriorityPrivilege</primary></indexterm>
435 <indexterm><primary>SeCreatePagefilePrivilege</primary></indexterm>
436 <indexterm><primary>SeCreatePermanentPrivilege</primary></indexterm>
437 <indexterm><primary>SeBackupPrivilege</primary></indexterm>
438 <indexterm><primary>SeRestorePrivilege</primary></indexterm>
439 <indexterm><primary>SeShutdownPrivilege</primary></indexterm>
440 <indexterm><primary>SeDebugPrivilege</primary></indexterm>
441 <indexterm><primary>SeAuditPrivilege</primary></indexterm>
442 <indexterm><primary>SeSystemEnvironmentPrivilege</primary></indexterm>
443 <indexterm><primary>SeChangeNotifyPrivilege</primary></indexterm>
444 <indexterm><primary>SeRemoteShutdownPrivilege</primary></indexterm>
445 <indexterm><primary>SeUndockPrivilege</primary></indexterm>
446 <indexterm><primary>SeSyncAgentPrivilege</primary></indexterm>
447 <indexterm><primary>SeEnableDelegationPrivilege</primary></indexterm>
448 <indexterm><primary>SeManageVolumePrivilege</primary></indexterm>
449 <indexterm><primary>SeImpersonatePrivilege</primary></indexterm>
450 <indexterm><primary>SeCreateGlobalPrivilege</primary></indexterm>
451 <screen>
452          SeCreateTokenPrivilege  Create a token object
453   SeAssignPrimaryTokenPrivilege  Replace a process level token
454           SeLockMemoryPrivilege  Lock pages in memory
455        SeIncreaseQuotaPrivilege  Increase quotas
456       SeMachineAccountPrivilege  Add workstations to domain
457                  SeTcbPrivilege  Act as part of the operating system
458             SeSecurityPrivilege  Manage auditing and security log
459        SeTakeOwnershipPrivilege  Take ownership of files or other objects
460           SeLoadDriverPrivilege  Load and unload device drivers
461        SeSystemProfilePrivilege  Profile system performance
462           SeSystemtimePrivilege  Change the system time
463 SeProfileSingleProcessPrivilege  Profile single process
464 SeIncreaseBasePriorityPrivilege  Increase scheduling priority
465       SeCreatePagefilePrivilege  Create a pagefile
466      SeCreatePermanentPrivilege  Create permanent shared objects
467               SeBackupPrivilege  Back up files and directories
468              SeRestorePrivilege  Restore files and directories
469             SeShutdownPrivilege  Shut down the system
470                SeDebugPrivilege  Debug programs
471                SeAuditPrivilege  Generate security audits
472    SeSystemEnvironmentPrivilege  Modify firmware environment values
473         SeChangeNotifyPrivilege  Bypass traverse checking
474       SeRemoteShutdownPrivilege  Force shutdown from a remote system
475               SeUndockPrivilege  Remove computer from docking station
476            SeSyncAgentPrivilege  Synchronize directory service data
477     SeEnableDelegationPrivilege  Enable computer and user accounts to
478                                  be trusted for delegation
479         SeManageVolumePrivilege  Perform volume maintenance tasks
480          SeImpersonatePrivilege  Impersonate a client after authentication
481         SeCreateGlobalPrivilege  Create global objects
482 </screen>
483 <indexterm><primary>equivalence</primary></indexterm>
484     The Samba Team is implementing only those privileges that are logical and useful in the UNIX/Linux
485     environment. Many of the Windows 200X/XP privileges have no direct equivalence in UNIX.
486     </para>
488 </sect2>
490 </sect1>
492 <sect1>
493 <title>The Administrator Domain SID</title>
495 <para>
496 <indexterm><primary>domain Administrator</primary></indexterm>
497 <indexterm><primary>User Rights and Privileges</primary></indexterm>
498 <indexterm><primary>passdb backend</primary></indexterm>
499 <indexterm><primary>SID</primary></indexterm>
500 <indexterm><primary>net getlocalsid</primary></indexterm>
501 Please note that every Windows NT4 and later server requires a domain Administrator account. Samba versions
502 commencing with 3.0.11 permit Administrative duties to be performed via assigned rights and privileges
503 (see <link linkend="rights">User Rights and Privileges</link>).  An account in the server's passdb backend can
504 be set to the well-known RID of the default administrator account.  To obtain the domain SID on a Samba domain
505 controller, run the following command:
506 <screen>
507 &rootprompt; net getlocalsid
508 SID for domain FOO is: S-1-5-21-4294955119-3368514841-2087710299
509 </screen>
510 <indexterm><primary>RID</primary></indexterm>
511 You may assign the domain administrator RID to an account using the <command>pdbedit</command>
512 command as shown here:
513 <indexterm><primary>pdbedit</primary></indexterm>
514 <screen>
515 &rootprompt; pdbedit -U S-1-5-21-4294955119-3368514841-2087710299-500 -u root -r
516 </screen>
517 </para>
519 <note><para>
520 <indexterm><primary>RID 500</primary></indexterm>
521 <indexterm><primary>well known RID</primary></indexterm>
522 <indexterm><primary>rights and privileges</primary></indexterm>
523 <indexterm><primary>root account</primary></indexterm>
524 The RID 500 is the well known standard value of the default Administrator account. It is the RID
525 that confers the rights and privileges that the Administrator account has on a Windows machine
526 or domain. Under UNIX/Linux the equivalent is UID=0 (the root account).
527 </para></note>
529 <para>
530 <indexterm><primary>without Administrator account</primary></indexterm>
531 <indexterm><primary>equivalent rights and privileges</primary></indexterm>
532 <indexterm><primary>Windows group account</primary></indexterm>
533 <indexterm><primary>3.0.11</primary></indexterm>
534 Releases of Samba version 3.0.11 and later make it possible to operate without an Administrator account
535 provided equivalent rights and privileges have been established for a Windows user or a Windows
536 group account. 
537 </para>
539 </sect1>
541 <sect1>
542 <title>Common Errors</title>
544         <sect2>
545         <title>What Rights and Privileges Will Permit Windows Client Administration?</title>
547         <para>
548 <indexterm><primary>domain global</primary></indexterm>
549 <indexterm><primary>local group</primary></indexterm>
550 <indexterm><primary>administrative rights</primary></indexterm>
551 <indexterm><primary>Windows client</primary></indexterm>
552         When a Windows NT4 (or later) client joins a domain, the domain global <literal>Domain Admins</literal> group
553         is added to the membership of the local <literal>Administrators</literal> group on the client. Any user who is
554         a member of the domain global <literal>Domain Admins</literal> group will have administrative rights on the
555         Windows client.
556         </para>
558         <para>
559 <indexterm><primary>desirable solution</primary></indexterm>
560 <indexterm><primary>administrative rights and privileges</primary></indexterm>
561 <indexterm><primary>Power Users</primary></indexterm>
562 <indexterm><primary>domain global user</primary></indexterm>
563 <indexterm><primary>domain global group</primary></indexterm>
564         This is often not the most desirable solution because it means that the user will have administrative
565         rights and privileges on domain servers also. The <literal>Power Users</literal> group on Windows client
566         workstations permits local administration of the workstation alone. Any domain global user or domain global
567         group can be added to the membership of the local workstation group <literal>Power Users</literal>.
568         </para>
570         <para>
571 <indexterm><primary>Nested Group Support</primary></indexterm>
572 <indexterm><primary>add domain users and groups to a local group</primary></indexterm>
573 <indexterm><primary>net</primary></indexterm>
574 <indexterm><primary>Windows workstation.</primary></indexterm>
575         See <link linkend="nestedgrpmgmgt">Nested Group Support</link> for an example of how to add domain users
576         and groups to a local group that is on a Windows workstation. The use of the <command>net</command>
577         command permits this to be done from the Samba server.
578         </para>
580         <para>
581 <indexterm><primary>cmd</primary></indexterm>
582 <indexterm><primary>cmd shell</primary></indexterm>
583 <indexterm><primary>net</primary><secondary>localgroup</secondary></indexterm>
584         Another way this can be done is to log onto the Windows workstation as the user
585         <literal>Administrator</literal>, then open a <command>cmd</command> shell, then execute:
586 <screen>
587 &dosprompt; net localgroup administrators /add <userinput>domain_name\entity</userinput>
588 </screen>
589         where <literal>entity</literal> is either a domain user or a domain group account name.
590         </para>
592         </sect2>
594 </sect1>
596 </chapter>