docs: Fix a typo
[obnox/samba/samba-obnox.git] / docs-xml / manpages / net.8.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="net.8">
4
5 <refmeta>
6         <refentrytitle>net</refentrytitle>
7         <manvolnum>8</manvolnum>
8         <refmiscinfo class="source">Samba</refmiscinfo>
9         <refmiscinfo class="manual">System Administration tools</refmiscinfo>
10         <refmiscinfo class="version">4.0</refmiscinfo>
11 </refmeta>
12
13
14 <refnamediv>
15         <refname>net</refname>
16         <refpurpose>Tool for administration of Samba and remote
17         CIFS servers.
18         </refpurpose>
19 </refnamediv>
20
21 <refsynopsisdiv>
22         <cmdsynopsis>
23                 <command>net</command>
24                 <arg choice="req">&lt;ads|rap|rpc&gt;</arg>
25                 <arg choice="opt">-h</arg>
26                 <arg choice="opt">-w workgroup</arg>
27                 <arg choice="opt">-W myworkgroup</arg>
28                 <arg choice="opt">-U user</arg>
29                 <arg choice="opt">-I ip-address</arg>
30                 <arg choice="opt">-p port</arg>
31                 <arg choice="opt">-n myname</arg>
32                 <arg choice="opt">-s conffile</arg>
33                 <arg choice="opt">-S server</arg>
34                 <arg choice="opt">-l</arg>
35                 <arg choice="opt">-P</arg>
36                 <arg choice="opt">-d debuglevel</arg>
37                 <arg choice="opt">-V</arg>
38                 <arg choice="opt">--request-timeout seconds</arg>
39         </cmdsynopsis>
40 </refsynopsisdiv>
41
42 <refsect1>
43         <title>DESCRIPTION</title>
44
45         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
46         <manvolnum>7</manvolnum></citerefentry> suite.</para>
47
48         <para>The Samba net utility is meant to work just like the net utility 
49         available for windows and DOS. The first argument should be used 
50         to specify the protocol to use when executing a certain command. 
51         ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3) 
52         clients and RPC can be used for NT4 and Windows 2000. If this 
53         argument is omitted, net will try to determine it automatically. 
54         Not all commands are available on all protocols.
55         </para>
56
57 </refsect1>
58
59 <refsect1>
60         <title>OPTIONS</title>
61
62         <variablelist>
63                 &stdarg.help;
64                 &stdarg.kerberos;
65                 
66                 <varlistentry>
67                 <term>-w target-workgroup</term>
68                 <listitem><para>
69                 Sets target workgroup or domain. You have to specify 
70                 either this option or the IP address or the name of a server.
71                 </para></listitem>
72                 </varlistentry>
73
74                 <varlistentry>
75                 <term>-W workgroup</term>
76                 <listitem><para>
77                 Sets client workgroup or domain
78                 </para></listitem>
79                 </varlistentry>
80
81                 <varlistentry>
82                 <term>-U user</term>
83                 <listitem><para>
84                 User name to use
85                 </para></listitem>
86                 </varlistentry>
87
88                 <varlistentry>
89                 <term>-I ip-address</term>
90                 <listitem><para>
91                 IP address of target server to use. You have to
92                 specify either this option or a target workgroup or
93                 a target server.
94                 </para></listitem>
95                 </varlistentry>
96
97                 <varlistentry>
98                 <term>-p port</term>
99                 <listitem><para>
100                 Port on the target server to connect to (usually 139 or 445). 
101                 Defaults to trying 445 first, then 139.
102                 </para></listitem>
103                 </varlistentry>
104
105                 &stdarg.netbios.name;
106                 &stdarg.configfile;
107
108                 <varlistentry>
109                 <term>-S server</term>
110                 <listitem><para>
111                 Name of target server. You should specify either 
112                 this option or a target workgroup or a target IP address.
113                 </para></listitem>
114                 </varlistentry>
115
116                 <varlistentry>
117                 <term>-l</term>
118                 <listitem><para>
119                 When listing data, give more information on each item.
120                 </para></listitem>
121                 </varlistentry>
122
123                 <varlistentry>
124                 <term>-P</term>
125                 <listitem><para>
126                 Make queries to the external server using the machine account of the local server.
127                 </para></listitem>
128                 </varlistentry>
129
130                 <varlistentry>
131                 <term>--request-timeout 30</term>
132                 <listitem><para>
133                 Let client requests timeout after 30 seconds the default is 10
134                 seconds.
135                 </para></listitem>
136                 </varlistentry>
137
138                 &stdarg.server.debug;
139         </variablelist>
140 </refsect1>
141
142 <refsect1>
143 <title>COMMANDS</title>
144
145 <refsect2>
146 <title>CHANGESECRETPW</title>
147
148 <para>This command allows the Samba machine account password to be set from an external application
149 to a machine account password that has already been stored in Active Directory. DO NOT USE this command
150 unless you know exactly what you are doing. The use of this command requires that the force flag (-f)
151 be used also. There will be NO command prompt. Whatever information is piped into stdin, either by
152 typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use
153 this without care and attention as it will overwrite a legitimate machine password without warning.
154 YOU HAVE BEEN WARNED.
155 </para>
156
157 </refsect2>
158
159 <refsect2>
160         <title>TIME</title>
161
162         <para>The <command>NET TIME</command> command allows you to view the time on a remote server
163         or synchronise the time on the local server with the time on the remote server.</para>
164
165 <refsect3>
166 <title>TIME</title>
167
168 <para>Without any options, the <command>NET TIME</command> command 
169 displays the time on the remote server.
170 </para>
171
172 </refsect3>
173
174 <refsect3>
175 <title>TIME SYSTEM</title>
176
177 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.</para>
178
179 </refsect3>
180
181 <refsect3>
182 <title>TIME SET</title>
183 <para>Tries to set the date and time of the local server to that on 
184 the remote server using <command>/bin/date</command>. </para>
185
186 </refsect3>
187
188 <refsect3>
189 <title>TIME ZONE</title>
190
191 <para>Displays the timezone in hours from GMT on the remote computer.</para>
192
193 </refsect3>
194 </refsect2>
195
196 <refsect2>
197 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN]
198 [createcomputer=OU] [machinepass=PASS] [osName=string osVer=string] [options]</title>
199
200 <para>
201 Join a domain.  If the account already exists on the server, and 
202 [TYPE] is MEMBER, the machine will attempt to join automatically. 
203 (Assuming that the machine has been created in server manager)
204 Otherwise, a password will be prompted for, and a new account may
205 be created.</para>
206
207 <para>
208 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
209 joining the domain.
210 </para>
211
212 <para>
213 [UPN] (ADS only) set the principalname attribute during the join.  The default
214 format is host/netbiosname@REALM.
215 </para>
216
217 <para>
218 [OU] (ADS only) Precreate the computer account in a specific OU.  The
219 OU string reads from top to bottom without RDNs, and is delimited by
220 a '/'.  Please note that '\' is used for escape by both the shell
221 and ldap, so it may need to be doubled or quadrupled to pass through, 
222 and it is not used as a delimiter.
223 </para>
224 <para>
225 [PASS] (ADS only) Set a specific password on the computer account
226 being created by the join.
227 </para>
228 <para>
229 [osName=string osVer=String] (ADS only) Set the operatingSystem and
230 operatingSystemVersion attribute during the join.  Both parameters
231 must be specified for either to take effect.
232 </para>
233 </refsect2>
234
235 <refsect2>
236 <title>[RPC] OLDJOIN [options]</title>
237
238 <para>Join a domain. Use the OLDJOIN option to join the domain 
239 using the old style of domain joining - you need to create a trust 
240 account in server manager first.</para>
241 </refsect2>
242
243 <refsect2>
244 <title>[RPC|ADS] USER</title>
245
246 <refsect3>
247 <title>[RPC|ADS] USER</title>
248
249 <para>List all users</para>
250
251 </refsect3>
252
253 <refsect3>
254 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
255
256 <para>Delete specified user</para>
257
258 </refsect3>
259
260 <refsect3>
261 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
262
263 <para>List the domain groups of the specified user.</para>
264
265 </refsect3>
266
267 <refsect3>
268 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
269
270 <para>Rename specified user.</para>
271
272 </refsect3>
273
274 <refsect3>
275 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
276
277 <para>Add specified user.</para>
278 </refsect3>
279 </refsect2>
280
281 <refsect2>
282 <title>[RPC|ADS] GROUP</title>
283
284 <refsect3>
285 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
286 <para>List user groups.</para>
287 </refsect3>
288
289 <refsect3>
290 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
291
292 <para>Delete specified group.</para>
293
294 </refsect3>
295
296 <refsect3>
297 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
298
299 <para>Create specified group.</para>
300
301 </refsect3>
302 </refsect2>
303
304 <refsect2>
305 <title>[RAP|RPC] SHARE</title>
306
307 <refsect3>
308 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
309
310 <para>Enumerates all exported resources (network shares) on target server.</para>
311
312 </refsect3>
313
314 <refsect3>
315 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
316
317 <para>Adds a share from a server (makes the export active). Maxusers 
318 specifies the number of users that can be connected to the 
319 share simultaneously.</para>
320
321 </refsect3>
322
323 <refsect3>
324 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
325
326 <para>Delete specified share.</para>
327 </refsect3>
328 </refsect2>
329
330 <refsect2>
331 <title>[RPC|RAP] FILE</title>
332
333 <refsect3>
334 <title>[RPC|RAP] FILE</title>
335
336 <para>List all open files on remote server.</para>
337
338 </refsect3>
339
340 <refsect3>
341 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
342
343 <para>Close file with specified <replaceable>fileid</replaceable> on 
344 remote server.</para>
345
346 </refsect3>
347
348 <refsect3>
349 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
350
351 <para>
352 Print information on specified <replaceable>fileid</replaceable>. 
353 Currently listed are: file-id, username, locks, path, permissions.
354 </para>
355
356 </refsect3>
357
358 <refsect3>
359 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
360
361 <para>
362 List files opened by specified <replaceable>user</replaceable>.
363 Please note that <command>net rap file user</command> does not work
364 against Samba servers. 
365 </para>
366
367 </refsect3>
368
369 </refsect2>
370
371 <refsect2>
372 <title>SESSION</title>
373
374 <refsect3>
375 <title>RAP SESSION</title>
376
377 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
378 sessions on the target server.</para>
379
380 </refsect3>
381
382 <refsect3>
383 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
384
385 <para>Close the specified sessions.</para>
386
387 </refsect3>
388
389 <refsect3>
390 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
391
392 <para>Give a list with all the open files in specified session.</para>
393
394 </refsect3>
395
396 </refsect2>
397
398 <refsect2>
399 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
400
401 <para>List all servers in specified domain or workgroup. Defaults
402 to local domain.</para>
403
404 </refsect2>
405
406 <refsect2>
407 <title>RAP DOMAIN</title>
408
409 <para>Lists all domains and workgroups visible on the 
410 current network.</para>
411
412 </refsect2>
413
414 <refsect2>
415 <title>RAP PRINTQ</title>
416
417 <refsect3>
418 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
419
420 <para>Lists the specified print queue and print jobs on the server.
421 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all 
422 queues are listed.</para>
423
424 </refsect3>
425
426 <refsect3>
427 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
428
429 <para>Delete job with specified id.</para>
430
431 </refsect3>
432
433 </refsect2>
434
435 <refsect2>
436 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
437
438 <para>
439 Validate whether the specified user can log in to the 
440 remote server. If the password is not specified on the commandline, it 
441 will be prompted. 
442 </para>
443
444 &not.implemented;
445
446 </refsect2>
447
448 <refsect2>
449 <title>RAP GROUPMEMBER</title>
450
451 <refsect3>
452 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
453
454 <para>List all members of the specified group.</para>
455
456 </refsect3>
457
458 <refsect3>
459 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
460
461 <para>Delete member from group.</para>
462
463 </refsect3>
464
465 <refsect3>
466 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
467
468 <para>Add member to group.</para>
469
470 </refsect3>
471
472 </refsect2>
473
474 <refsect2>
475 <title>RAP ADMIN <replaceable>command</replaceable></title>
476
477 <para>Execute the specified <replaceable>command</replaceable> on 
478 the remote server. Only works with OS/2 servers.
479 </para>
480
481 &not.implemented;
482
483 </refsect2>
484
485 <refsect2>
486 <title>RAP SERVICE</title>
487
488 <refsect3>
489 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
490
491 <para>Start the specified service on the remote server. Not implemented yet.</para>
492
493 &not.implemented;
494
495 </refsect3>
496
497 <refsect3>
498 <title>RAP SERVICE STOP</title>
499
500 <para>Stop the specified service on the remote server.</para>
501
502 &not.implemented;
503
504 </refsect3>
505
506 </refsect2>
507
508 <refsect2>
509 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
510
511 <para>
512 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
513 </para>
514
515 </refsect2>
516
517 <refsect2>
518 <title>LOOKUP</title>
519
520 <refsect3>
521 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
522
523 <para>
524 Lookup the IP address of the given host with the specified type (netbios suffix). 
525 The type defaults to 0x20 (workstation).
526 </para>
527
528 </refsect3>
529
530 <refsect3>
531 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
532
533 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
534
535 </refsect3>
536
537 <refsect3>
538 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
539
540 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
541 Defaults to local realm.</para>
542
543 </refsect3>
544
545 <refsect3>
546 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
547
548 <para>Give IP's of Domain Controllers for specified <replaceable>
549 DOMAIN</replaceable>. Defaults to local domain.</para>
550
551 </refsect3>
552
553 <refsect3>
554 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
555
556 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
557 or workgroup. Defaults to local domain.</para>
558
559 </refsect3>
560
561 </refsect2>
562
563 <refsect2>
564 <title>CACHE</title>
565
566 <para>Samba uses a general caching interface called 'gencache'. It 
567 can be controlled using 'NET CACHE'.</para>
568
569 <para>All the timeout parameters support the suffixes:
570
571 <simplelist>
572 <member>s - Seconds</member>
573 <member>m - Minutes</member>
574 <member>h - Hours</member>
575 <member>d - Days</member>
576 <member>w - Weeks</member>
577 </simplelist>
578
579 </para>
580
581 <refsect3>
582 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
583
584 <para>Add specified key+data to the cache with the given timeout.</para>
585
586 </refsect3>
587
588 <refsect3>
589 <title>CACHE DEL <replaceable>key</replaceable></title>
590
591 <para>Delete key from the cache.</para>
592
593 </refsect3>
594
595 <refsect3>
596 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
597
598 <para>Update data of existing cache entry.</para>
599
600 </refsect3>
601
602 <refsect3>
603 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
604
605 <para>Search for the specified pattern in the cache data.</para>
606
607 </refsect3>
608
609 <refsect3>
610 <title>CACHE LIST</title>
611
612 <para>
613 List all current items in the cache.
614 </para>
615
616 </refsect3>
617
618 <refsect3>
619 <title>CACHE FLUSH</title>
620
621 <para>Remove all the current items from the cache.</para>
622
623 </refsect3>
624
625 </refsect2>
626
627 <refsect2>
628 <title>GETLOCALSID [DOMAIN]</title>
629
630 <para>Prints the SID of the specified domain, or if the parameter is
631 omitted, the SID of the local server.</para>
632
633 </refsect2>
634
635 <refsect2>
636 <title>SETLOCALSID S-1-5-21-x-y-z</title>
637
638 <para>Sets SID for the local server to the specified SID.</para>
639
640 </refsect2>
641
642 <refsect2>
643 <title>GETDOMAINSID</title>
644
645 <para>Prints the local machine SID and the SID of the current 
646 domain.</para>
647
648 </refsect2>
649
650 <refsect2>
651 <title>SETDOMAINSID</title>
652
653 <para>Sets the SID of the current domain.</para>
654
655 </refsect2>
656
657 <refsect2>
658 <title>GROUPMAP</title>
659
660 <para>Manage the mappings between Windows group SIDs and UNIX groups.
661 Common options include:</para>
662
663 <itemizedlist>
664 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
665 <listitem><para>ntgroup - Name of the Windows NT group (must be
666   resolvable to a SID</para></listitem>
667 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
668 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
669 <listitem><para>type - Type of the group; either 'domain', 'local',
670   or 'builtin'</para></listitem>
671 <listitem><para>comment - Freeform text description of the group</para></listitem>
672 </itemizedlist>
673
674 <refsect3>
675 <title>GROUPMAP ADD</title>
676
677 <para>
678 Add a new group mapping entry:
679 <programlisting>
680 net groupmap add {rid=int|sid=string} unixgroup=string \
681         [type={domain|local}] [ntgroup=string] [comment=string]
682 </programlisting>
683 </para>
684
685 </refsect3>
686
687 <refsect3>
688 <title>GROUPMAP DELETE</title>
689
690 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
691
692 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
693
694 </refsect3>
695
696 <refsect3>
697 <title>GROUPMAP MODIFY</title>
698
699 <para>Update an existing group entry.</para>
700
701 <para>
702 <programlisting>
703 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
704        [comment=string] [type={domain|local}]
705 </programlisting>
706 </para>
707 </refsect3>
708
709 <refsect3>
710 <title>GROUPMAP LIST</title>
711
712 <para>List existing group mapping entries.</para>
713
714 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
715
716 </refsect3>
717 </refsect2>
718
719
720
721 <refsect2>
722 <title>MAXRID</title>
723
724 <para>Prints out the highest RID currently in use on the local
725 server (by the active 'passdb backend').
726 </para>
727
728 </refsect2>
729
730 <refsect2>
731 <title>RPC INFO</title>
732
733 <para>Print information about the domain of the remote server,
734 such as domain name, domain sid and number of users and groups.
735 </para>
736
737 </refsect2>
738
739 <refsect2>
740 <title>[RPC|ADS] TESTJOIN</title>
741
742 <para>Check whether participation in a domain is still valid.</para>
743
744 </refsect2>
745
746 <refsect2>
747 <title>[RPC|ADS] CHANGETRUSTPW</title>
748
749 <para>Force change of domain trust password.</para>
750
751 </refsect2>
752
753 <refsect2>
754 <title>RPC TRUSTDOM</title>
755
756 <refsect3>
757 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
758
759 <para>Add a interdomain trust account for <replaceable>DOMAIN</replaceable>. 
760 This is in fact a Samba account named <replaceable>DOMAIN$</replaceable> 
761 with the account flag <constant>'I'</constant> (interdomain trust account). 
762 This is required for incoming trusts to work. It makes Samba be a
763 trusted domain of the foreign (trusting) domain.
764 Users of the Samba domain will be made available in the foreign domain.
765 If the command is used against localhost it has the same effect as 
766 <command>smbpasswd -a -i DOMAIN</command>. Please note that both commands
767 expect a appropriate UNIX account. 
768 </para>
769
770 </refsect3>
771
772 <refsect3>
773 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
774
775 <para>Remove interdomain trust account for 
776 <replaceable>DOMAIN</replaceable>. If it is used against localhost 
777 it has the same effect as <command>smbpasswd -x DOMAIN$</command>. 
778 </para>
779
780 </refsect3>
781
782 <refsect3>
783 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
784
785 <para>
786 Establish a trust relationship to a trusted domain. 
787 Interdomain account must already be created on the remote PDC.
788 This is required for outgoing trusts to work. It makes Samba be a
789 trusting domain of a foreign (trusted) domain.
790 Users of the foreign domain will be made available in our domain.
791 You'll need winbind and a working idmap config to make them
792 appear in your system.
793 </para>
794
795 </refsect3>
796
797 <refsect3>
798 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
799 <para>Abandon relationship to trusted domain</para>
800
801 </refsect3>
802
803 <refsect3>
804 <title>RPC TRUSTDOM LIST</title>
805
806 <para>List all interdomain trust relationships.</para>
807
808 </refsect3>
809 </refsect2>
810
811 <refsect2>
812 <title>RPC TRUST</title>
813
814 <refsect3>
815 <title>RPC TRUST CREATE</title>
816
817 <para>Create a trust object by calling lsaCreateTrustedDomainEx2.
818 The can be done on a single server or on two servers at once with the
819 possibility to use a random trust password.</para>
820
821 <variablelist><title>Options:</title>
822 <varlistentry>
823 <term>otherserver</term>
824 <listitem><para>Domain controller of the second domain</para></listitem>
825 </varlistentry>
826
827 <varlistentry>
828 <term>otheruser</term>
829 <listitem><para>Admin user in the second domain</para></listitem>
830 </varlistentry>
831
832 <varlistentry>
833 <term>otherdomainsid</term>
834 <listitem><para>SID of the second domain</para></listitem>
835 </varlistentry>
836
837 <varlistentry>
838 <term>other_netbios_domain</term>
839 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
840 </varlistentry>
841
842 <varlistentry>
843 <term>otherdomain</term>
844 <listitem><para>DNS (full) name of the second domain</para></listitem>
845 </varlistentry>
846
847 <varlistentry>
848 <term>trustpw</term>
849 <listitem><para>Trust password</para></listitem>
850 </varlistentry>
851 </variablelist>
852
853 <variablelist><title>Examples:</title>
854 <varlistentry>
855 <term>Create a trust object on srv1.dom1.dom for the domain dom2</term>
856 <listitem><literallayout>
857 net rpc trust create \
858     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
859     other_netbios_domain=dom2 \
860     otherdomain=dom2.dom \
861     trustpw=12345678 \
862     -S srv1.dom1.dom
863 </literallayout></listitem>
864 </varlistentry>
865 <varlistentry>
866 <term>Create a trust relationship between dom1 and dom2</term>
867 <listitem><literallayout>
868 net rpc trust create \
869     otherserver=srv2.dom2.test \
870     otheruser=dom2adm \
871     -S srv1.dom1.dom
872 </literallayout></listitem>
873 </varlistentry>
874 </variablelist>
875 </refsect3>
876
877 <refsect3>
878 <title>RPC TRUST DELETE</title>
879
880 <para>Delete a trust trust object by calling lsaDeleteTrustedDomain.
881 The can be done on a single server or on two servers at once.</para>
882
883 <variablelist><title>Options:</title>
884 <varlistentry>
885 <term>otherserver</term>
886 <listitem><para>Domain controller of the second domain</para></listitem>
887 </varlistentry>
888
889 <varlistentry>
890 <term>otheruser</term>
891 <listitem><para>Admin user in the second domain</para></listitem>
892 </varlistentry>
893
894 <varlistentry>
895 <term>otherdomainsid</term>
896 <listitem><para>SID of the second domain</para></listitem>
897 </varlistentry>
898 </variablelist>
899
900 <variablelist><title>Examples:</title>
901 <varlistentry>
902 <term>Delete a trust object on srv1.dom1.dom for the domain dom2</term>
903 <listitem><literallayout>
904 net rpc trust delete \
905     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
906     -S srv1.dom1.dom
907 </literallayout></listitem>
908 </varlistentry>
909 <varlistentry>
910 <term>Delete a trust relationship between dom1 and dom2</term>
911 <listitem><literallayout>
912 net rpc trust delete \
913     otherserver=srv2.dom2.test \
914     otheruser=dom2adm \
915     -S srv1.dom1.dom
916 </literallayout></listitem>
917 </varlistentry>
918 </variablelist>
919 </refsect3>
920
921 </refsect2>
922
923 <refsect2>
924 <refsect3>
925 <title>RPC RIGHTS</title>
926
927 <para>This subcommand is used to view and manage Samba's rights assignments (also 
928 referred to as privileges).  There are three options currently available: 
929 <parameter>list</parameter>, <parameter>grant</parameter>, and 
930 <parameter>revoke</parameter>.  More details on Samba's privilege model and its use
931 can be found in the Samba-HOWTO-Collection.</para>
932
933 </refsect3>
934
935
936 </refsect2>
937
938 <refsect2>
939 <title>RPC ABORTSHUTDOWN</title>
940
941 <para>Abort the shutdown of a remote server.</para>
942
943 </refsect2>
944
945 <refsect2>
946 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
947
948 <para>Shut down the remote server.</para>
949
950 <variablelist>
951 <varlistentry>
952 <term>-r</term>
953 <listitem><para>
954 Reboot after shutdown.
955 </para></listitem>
956 </varlistentry>
957
958 <varlistentry>
959 <term>-f</term>
960 <listitem><para>
961 Force shutting down all applications.
962 </para></listitem>
963 </varlistentry>
964
965 <varlistentry>
966 <term>-t timeout</term>
967 <listitem><para>
968 Timeout before system will be shut down. An interactive 
969 user of the system can use this time to cancel the shutdown.
970 </para></listitem>
971 </varlistentry>
972
973 <varlistentry>
974 <term>-C message</term>
975 <listitem><para>Display the specified message on the screen to 
976 announce the shutdown.</para></listitem>
977 </varlistentry>
978 </variablelist>
979
980 </refsect2>
981
982 <refsect2>
983 <title>RPC SAMDUMP</title>
984
985 <para>Print out sam database of remote server. You need
986 to run this against the PDC, from a Samba machine joined as a BDC. </para>
987 </refsect2>
988
989 <refsect2>
990 <title>RPC VAMPIRE</title>
991
992 <para>Export users, aliases and groups from remote server to 
993 local server.  You need to run this against the PDC, from a Samba machine joined as a BDC. 
994 </para>
995 </refsect2>
996
997 <refsect2>
998 <title>RPC VAMPIRE KEYTAB</title>
999
1000 <para>Dump remote SAM database to local Kerberos keytab file.
1001 </para>
1002 </refsect2>
1003
1004 <refsect2>
1005 <title>RPC VAMPIRE LDIF</title>
1006
1007 <para>Dump remote SAM database to local LDIF file or standard output.
1008 </para>
1009 </refsect2>
1010
1011 <refsect2>
1012 <title>RPC GETSID</title>
1013
1014 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename> (or <filename>secrets.ntdb</filename>). </para>
1015
1016 </refsect2>
1017
1018 <refsect2>
1019 <title>ADS LEAVE</title>
1020
1021 <para>Make the remote host leave the domain it is part of. </para>
1022
1023 </refsect2>
1024
1025 <refsect2>
1026 <title>ADS STATUS</title>
1027
1028 <para>Print out status of machine account of the local machine in ADS.
1029 Prints out quite some debug info. Aimed at developers, regular 
1030 users should use <command>NET ADS TESTJOIN</command>.</para>
1031
1032 </refsect2>
1033
1034 <refsect2>
1035 <title>ADS PRINTER</title>
1036
1037 <refsect3>
1038 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1039
1040 <para>
1041 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the 
1042 server name defaults to the local host.</para>
1043
1044 </refsect3>
1045
1046 <refsect3>
1047 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1048
1049 <para>Publish specified printer using ADS.</para>
1050
1051 </refsect3>
1052
1053 <refsect3>
1054 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1055
1056 <para>Remove specified printer from ADS directory.</para>
1057
1058 </refsect3>
1059
1060 </refsect2>
1061
1062 <refsect2>
1063 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1064
1065 <para>Perform a raw LDAP search on a ADS server and dump the results. The 
1066 expression is a standard LDAP search expression, and the 
1067 attributes are a list of LDAP fields to show in the results.</para>
1068
1069 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1070 </para>
1071
1072 </refsect2>
1073
1074 <refsect2>
1075 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1076
1077 <para>
1078 Perform a raw LDAP search on a ADS server and dump the results. The 
1079 DN standard LDAP DN, and the attributes are a list of LDAP fields 
1080 to show in the result. 
1081 </para>
1082
1083 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1084
1085 </refsect2>
1086
1087 <refsect2>
1088 <title>ADS WORKGROUP</title>
1089
1090 <para>Print out workgroup name for specified kerberos realm.</para>
1091
1092 </refsect2>
1093
1094 <refsect2>
1095 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
1096
1097 <para>
1098 (Re)Create a BUILTIN group.
1099 Only a wellknown set of BUILTIN groups can be created with this command.
1100 This is the list of currently recognized group names: Administrators,
1101 Users, Guests, Power Users, Account Operators, Server Operators, Print
1102 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1103 compatible Access.
1104
1105 This command requires a running Winbindd with idmap allocation properly
1106 configured. The group gid will be allocated out of the winbindd range.
1107 </para>
1108
1109 </refsect2>
1110
1111 <refsect2>
1112 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
1113
1114 <para>
1115 Create a LOCAL group (also known as Alias).
1116
1117 This command requires a running Winbindd with idmap allocation properly
1118 configured. The group gid will be allocated out of the winbindd range.
1119 </para>
1120
1121 </refsect2>
1122
1123 <refsect2>
1124 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
1125
1126 <para>
1127 Delete an existing LOCAL group (also known as Alias).
1128
1129 </para>
1130
1131 </refsect2>
1132
1133 <refsect2>
1134 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
1135
1136 <para>
1137 Map an existing Unix group and make it a Domain Group, the domain group
1138 will have the same name.
1139 </para>
1140
1141 </refsect2>
1142
1143 <refsect2>
1144 <title>SAM UNMAPUNIXGROUP &lt;NAME&gt;</title>
1145
1146 <para>
1147 Remove an existing group mapping entry.
1148 </para>
1149
1150 </refsect2>
1151
1152 <refsect2>
1153 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1154
1155 <para>
1156 Add a member to a Local group. The group can be specified only by name,
1157 the member can be specified by name or SID.
1158 </para>
1159
1160 </refsect2>
1161
1162 <refsect2>
1163 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1164
1165 <para>
1166 Remove a member from a Local group. The group and the member must be
1167 specified by name.
1168 </para>
1169
1170 </refsect2>
1171
1172 <refsect2>
1173 <title>SAM LISTMEM &lt;GROUP&gt;</title>
1174
1175 <para>
1176 List Local group members. The group must be specified by name.
1177 </para>
1178
1179 </refsect2>
1180
1181 <refsect2>
1182 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
1183
1184 <para>
1185 List the specified set of accounts by name. If verbose is specified,
1186 the rid and description is also provided for each account.
1187 </para>
1188
1189 </refsect2>
1190
1191 <refsect2>
1192 <title>SAM RIGHTS LIST</title>
1193
1194 <para>
1195 List all available privileges.
1196 </para>
1197
1198 </refsect2>
1199
1200 <refsect2>
1201 <title>SAM RIGHTS GRANT &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1202
1203 <para>
1204 Grant one or more privileges to a user.
1205 </para>
1206
1207 </refsect2>
1208
1209 <refsect2>
1210 <title>SAM RIGHTS REVOKE &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1211
1212 <para>
1213 Revoke one or more privileges from a user.
1214 </para>
1215
1216 </refsect2>
1217
1218 <refsect2>
1219 <title>SAM SHOW &lt;NAME&gt;</title>
1220
1221 <para>
1222 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1223 account.
1224 </para>
1225
1226 </refsect2>
1227
1228 <refsect2>
1229 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1230
1231 <para>
1232 Set the home directory for a user account.
1233 </para>
1234
1235 </refsect2>
1236
1237 <refsect2>
1238 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1239
1240 <para>
1241 Set the profile path for a user account.
1242 </para>
1243
1244 </refsect2>
1245
1246 <refsect2>
1247 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1248
1249 <para>
1250 Set the comment for a user or group account.
1251 </para>
1252
1253 </refsect2>
1254
1255 <refsect2>
1256 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1257
1258 <para>
1259 Set the full name for a user account.
1260 </para>
1261
1262 </refsect2>
1263
1264 <refsect2>
1265 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1266
1267 <para>
1268 Set the logon script for a user account.
1269 </para>
1270
1271 </refsect2>
1272
1273 <refsect2>
1274 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1275
1276 <para>
1277 Set the home drive for a user account.
1278 </para>
1279
1280 </refsect2>
1281
1282 <refsect2>
1283 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1284
1285 <para>
1286 Set the workstations a user account is allowed to log in from.
1287 </para>
1288
1289 </refsect2>
1290
1291 <refsect2>
1292 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1293
1294 <para>
1295 Set the "disabled" flag for a user account.
1296 </para>
1297
1298 </refsect2>
1299
1300 <refsect2>
1301 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1302
1303 <para>
1304 Set the "password not required" flag for a user account.
1305 </para>
1306
1307 </refsect2>
1308
1309 <refsect2>
1310 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1311
1312 <para>
1313 Set the "autolock" flag for a user account.
1314 </para>
1315
1316 </refsect2>
1317
1318 <refsect2>
1319 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1320
1321 <para>
1322 Set the "password do not expire" flag for a user account.
1323 </para>
1324
1325 </refsect2>
1326
1327 <refsect2>
1328 <title>SAM SET PWDMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1329
1330 <para>
1331 Set or unset the "password must change" flag for a user account.
1332 </para>
1333
1334 </refsect2>
1335
1336 <refsect2>
1337 <title>SAM POLICY LIST</title>
1338
1339 <para>
1340 List the available account policies.
1341 </para>
1342
1343 </refsect2>
1344
1345 <refsect2>
1346 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1347
1348 <para>
1349 Show the account policy value.
1350 </para>
1351
1352 </refsect2>
1353
1354 <refsect2>
1355 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1356
1357 <para>
1358 Set a value for the account policy.
1359 Valid values can be: "forever", "never", "off", or a number.
1360 </para>
1361
1362 </refsect2>
1363
1364 <refsect2>
1365 <title>SAM PROVISION</title>
1366
1367 <para>
1368 Only available if ldapsam:editposix is set and winbindd is running.
1369 Properly populates the ldap tree with the basic accounts (Administrator)
1370 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1371 </para>
1372
1373 </refsect2>
1374
1375 <refsect2>
1376 <title>IDMAP DUMP &lt;local tdb file name&gt;</title>
1377
1378 <para>
1379 Dumps the mappings contained in the local tdb file specified.
1380 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1381 </para>
1382
1383 </refsect2>
1384
1385 <refsect2>
1386 <title>IDMAP RESTORE [input file]</title>
1387
1388 <para>
1389 Restore the mappings from the specified file or stdin.
1390 </para>
1391
1392 </refsect2>
1393
1394 <refsect2>
1395 <title>IDMAP SECRET &lt;DOMAIN&gt; &lt;secret&gt;</title>
1396
1397 <para>
1398 Store a secret for the specified domain, used primarily for domains
1399 that use idmap_ldap as a backend. In this case the secret is used
1400 as the password for the user DN used to bind to the ldap server.
1401 </para>
1402
1403 </refsect2>
1404
1405 <refsect2>
1406
1407 <title>IDMAP DELETE [-f] [--db=&lt;DB&gt;] &lt;ID&gt;</title>
1408
1409 <para>
1410 Delete a mapping sid &lt;-&gt; gid or sid &lt;-&gt; uid from the IDMAP database.
1411 The mapping is given by &lt;ID&gt; which may either be a sid: S-x-..., a gid: "GID number" or a uid: "UID number".
1412 Use -f to delete an invalid partial mapping &lt;ID&gt; -&gt; xx
1413 </para>
1414 <para>
1415   Use "smbcontrol all idmap ..." to notify running smbd instances.
1416   See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
1417   <manvolnum>1</manvolnum></citerefentry> manpage for details.
1418 </para>
1419 </refsect2>
1420
1421 <refsect2>
1422
1423 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=&lt;DB&gt;]</title>
1424
1425 <para>
1426   Check and repair the IDMAP database. If no option is given a read only check
1427   of the database is done. Among others an interactive or automatic repair mode
1428   may be chosen with one of the following options:
1429
1430   <variablelist>
1431     <varlistentry><term>-r|--repair</term>
1432     <listitem><para>
1433       Interactive repair mode, ask a lot of questions.
1434     </para></listitem>
1435     </varlistentry>
1436
1437     <varlistentry><term>-a|--auto</term>
1438     <listitem><para>
1439       Noninteractive repair mode, use default answers.
1440     </para></listitem>
1441     </varlistentry>
1442
1443     <varlistentry><term>-v|--verbose</term>
1444       <listitem><para>
1445         Produce more output.
1446       </para></listitem>
1447     </varlistentry>
1448
1449     <varlistentry><term>-f|--force</term>
1450       <listitem><para>
1451         Try to apply changes, even if they do not apply cleanly.
1452       </para></listitem>
1453     </varlistentry>
1454
1455     <varlistentry><term>-T|--test</term>
1456       <listitem><para>
1457         Dry run, show what changes would be made but don't touch anything.
1458       </para></listitem>
1459     </varlistentry>
1460
1461     <varlistentry><term>-l|--lock</term>
1462       <listitem><para>
1463         Lock the database while doing the check.
1464       </para></listitem>
1465     </varlistentry>
1466
1467     <varlistentry><term>--db &lt;DB&gt;</term>
1468       <listitem><para>
1469         Check the specified database.
1470       </para></listitem>
1471     </varlistentry>
1472     <varlistentry><term></term>
1473       <listitem><para>
1474       </para></listitem>
1475     </varlistentry>
1476   </variablelist>
1477
1478   It reports about the finding of the following errors:
1479
1480   <variablelist>
1481     <varlistentry><term>Missing reverse mapping:</term>
1482     <listitem><para>
1483       A record with mapping A-&gt;B where there is no B-&gt;A. Default action
1484       in repair mode is to "fix" this by adding the reverse mapping.
1485     </para></listitem>
1486     </varlistentry>
1487
1488     <varlistentry><term>Invalid mapping:</term>
1489     <listitem><para>
1490       A record with mapping A-&gt;B where B-&gt;C. Default action
1491       is to "delete" this record.
1492     </para></listitem>
1493   </varlistentry>
1494
1495   <varlistentry><term>Missing or invalid HWM:</term>
1496     <listitem><para>
1497       A high water mark is not at least equal to the largest ID in the
1498       database. Default action is to "fix" this by setting it to the
1499       largest ID found +1.
1500     </para></listitem>
1501   </varlistentry>
1502
1503   <varlistentry><term>Invalid record:</term>
1504     <listitem><para>
1505       Something we failed to parse. Default action is to "edit" it
1506       in interactive and "delete" it in automatic mode.
1507     </para></listitem>
1508   </varlistentry>
1509 </variablelist>
1510 </para>
1511 </refsect2>
1512
1513
1514 <refsect2>
1515 <title>USERSHARE</title>
1516
1517 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1518 non-root users to add user defined shares to be exported using the "net usershare"
1519 commands.
1520 </para>
1521
1522 <para>
1523 To set this up, first set up your smb.conf by adding to the [global] section:
1524
1525 usershare path = /usr/local/samba/lib/usershares
1526
1527 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1528 set the group owner to the UNIX group who should have the ability to create usershares,
1529 for example a group called "serverops".
1530
1531 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1532
1533 (Owner and group all access, no access for others, plus the sticky bit,
1534 which means that a file in that directory can be renamed or deleted only
1535 by the owner of the file).
1536
1537 Finally, tell smbd how many usershares you will allow by adding to the [global]
1538 section of smb.conf a line such as :
1539
1540 usershare max shares = 100.
1541
1542 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1543 can create user defined shares on demand using the commands below.
1544 </para>
1545
1546 <para>The usershare commands are:
1547
1548 <simplelist>
1549 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
1550 <member>net usershare delete sharename - to delete a user defined share.</member>
1551 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1552 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1553 </simplelist>
1554
1555 </para>
1556
1557 <refsect3>
1558 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1559
1560 <para>
1561 Add or replace a new user defined share, with name "sharename".
1562 </para>
1563
1564 <para>
1565 "path" specifies the absolute pathname on the system to be exported.
1566 Restrictions may be put on this, see the global smb.conf parameters:
1567 "usershare owner only", "usershare prefix allow list", and
1568 "usershare prefix deny list".
1569 </para>
1570
1571 <para>
1572 The optional "comment" parameter is the comment that will appear
1573 on the share when browsed to by a client.
1574 </para>
1575
1576 <para>The optional "acl" field
1577 specifies which users have read and write access to the entire share.
1578 Note that guest connections are not allowed unless the smb.conf parameter
1579 "usershare allow guests" has been set. The definition of a user
1580 defined share acl is: "user:permission", where user is a valid
1581 username on the system and permission can be "F", "R", or "D".
1582 "F" stands for "full permissions", ie. read and write permissions.
1583 "D" stands for "deny" for a user, ie. prevent this user from accessing
1584 this share.
1585 "R" stands for "read only", ie. only allow read access to this
1586 share (no creation of new files or directories or writing to files).
1587 </para>
1588
1589 <para>
1590 The default if no "acl" is given is "Everyone:R", which means any 
1591 authenticated user has read-only access.
1592 </para>
1593
1594 <para>
1595 The optional "guest_ok" has the same effect as the parameter of the
1596 same name in smb.conf, in that it allows guest access to this user
1597 defined share. This parameter is only allowed if the global parameter
1598 "usershare allow guests" has been set to true in the smb.conf.
1599 </para>
1600
1601 There is no separate command to modify an existing user defined share,
1602 just use the "net usershare add [sharename]" command using the same
1603 sharename as the one you wish to modify and specify the new options
1604 you wish. The Samba smbd daemon notices user defined share modifications
1605 at connect time so will see the change immediately, there is no need
1606 to restart smbd on adding, deleting or changing a user defined share.
1607 </refsect3>
1608
1609 <refsect3>
1610 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1611
1612 <para>
1613 Deletes the user defined share by name. The Samba smbd daemon
1614 immediately notices this change, although it will not disconnect
1615 any users currently connected to the deleted share.
1616 </para>
1617
1618 </refsect3>
1619
1620 <refsect3>
1621 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1622
1623 <para>
1624 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1625 </para>
1626
1627 <para>
1628 net usershare info on its own dumps out info on the user defined shares that were
1629 created by the current user, or restricts them to share names that match the given
1630 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1631 If the '-l' or '--long' option is also given, it prints out info on user defined
1632 shares created by other users.
1633 </para>
1634
1635 <para>
1636 The information given about a share looks like:
1637
1638 [foobar]
1639 path=/home/jeremy
1640 comment=testme
1641 usershare_acl=Everyone:F
1642 guest_ok=n
1643
1644 And is a list of the current settings of the user defined share that can be
1645 modified by the "net usershare add" command.
1646 </para>
1647
1648 </refsect3>
1649
1650 <refsect3>
1651 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1652
1653 <para>
1654 List all the user defined shares owned by the current user matching the given pattern, or all users.
1655 </para>
1656
1657 <para>
1658 net usershare list on its own list out the names of the user defined shares that were
1659 created by the current user, or restricts the list to share names that match the given
1660 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1661 If the '-l' or '--long' option is also given, it includes the names of user defined
1662 shares created by other users.
1663 </para>
1664
1665 </refsect3>
1666
1667 </refsect2>
1668
1669 <refsect2>
1670 <title>[RPC] CONF</title>
1671
1672 <para>Starting with version 3.2.0, a Samba server can be configured by data
1673 stored in registry. This configuration data can be edited with the new "net
1674 conf" commands. There is also the possiblity to configure a remote Samba server
1675 by enabling the RPC conf mode and specifying the the address of the remote server.
1676 </para>
1677
1678 <para>
1679 The deployment of this configuration data can be activated in two levels from the
1680 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
1681 activated by setting <parameter>registry shares</parameter> to
1682 <quote>yes</quote> in the [global] section and global configuration options are
1683 activated by setting <smbconfoption name="include">registry</smbconfoption> in
1684 the [global] section for a mixed configuration or by setting
1685 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
1686 section for a registry-only configuration.
1687 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
1688 <manvolnum>5</manvolnum></citerefentry> manpage for details.
1689 </para>
1690
1691 <para>The conf commands are:
1692 <simplelist>
1693 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
1694 format.</member>
1695 <member>net [rpc] conf import - Import configuration from file in smb.conf
1696 format.</member>
1697 <member>net [rpc] conf listshares - List the registry shares.</member>
1698 <member>net [rpc] conf drop - Delete the complete configuration from
1699 registry.</member>
1700 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
1701 <member>net [rpc] conf addshare - Create a new registry share.</member>
1702 <member>net [rpc] conf delshare - Delete a registry share.</member>
1703 <member>net [rpc] conf setparm - Store a parameter.</member>
1704 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
1705 <member>net [rpc] conf delparm - Delete a parameter.</member>
1706 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
1707 <member>net [rpc] conf setincludes - Set includes for a share.</member>
1708 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
1709 </simplelist>
1710 </para>
1711
1712 <refsect3>
1713 <title>[RPC] CONF LIST</title>
1714
1715 <para>
1716 Print the configuration data stored in the registry in a smb.conf-like format to
1717 standard output.
1718 </para>
1719 </refsect3>
1720
1721 <refsect3>
1722 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
1723
1724 <para>
1725 This command imports configuration from a file in smb.conf format.
1726 If a section encountered in the input file is present in registry,
1727 its contents is replaced. Sections of registry configuration that have
1728 no counterpart in the input file are not affected. If you want to delete these,
1729 you will have to use the "net conf drop" or "net conf delshare" commands.
1730 Optionally, a section may be specified to restrict the effect of the
1731 import command to that specific section. A test mode is enabled by specifying
1732 the parameter "-T" on the commandline. In test mode, no changes are made to the
1733 registry, and the resulting configuration is printed to standard output instead.
1734 </para>
1735 </refsect3>
1736
1737 <refsect3>
1738 <title>[RPC] CONF LISTSHARES</title>
1739
1740 <para>
1741 List the names of the shares defined in registry.
1742 </para>
1743 </refsect3>
1744
1745 <refsect3>
1746 <title>[RPC] CONF DROP</title>
1747
1748 <para>
1749 Delete the complete configuration data from registry.
1750 </para>
1751 </refsect3>
1752
1753 <refsect3>
1754 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
1755
1756 <para>
1757 Show the definition of the share or section specified. It is valid to specify
1758 "global" as sharename to retrieve the global configuration options from
1759 registry.
1760 </para>
1761 </refsect3>
1762
1763 <refsect3>
1764 <title>[RPC] CONF ADDSHARE <replaceable>sharename</replaceable> <replaceable>path</replaceable> [<replaceable>writeable={y|N}</replaceable> [<replaceable>guest_ok={y|N}</replaceable> [<replaceable>comment</replaceable>]]] </title>
1765
1766 <para>Create a new share definition in registry.
1767 The sharename and path have to be given. The share name may
1768 <emphasis>not</emphasis> be "global". Optionally, values for the very
1769 common options "writeable", "guest ok" and a "comment" may be specified.
1770 The same result may be obtained by a sequence of "net conf setparm"
1771 commands.
1772 </para>
1773 </refsect3>
1774
1775 <refsect3>
1776 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
1777
1778 <para>
1779 Delete a share definition from registry.
1780 </para>
1781 </refsect3>
1782
1783 <refsect3>
1784 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
1785
1786 <para>
1787 Store a parameter in registry. The section may be global or a sharename.
1788 The section is created if it does not exist yet.
1789 </para>
1790 </refsect3>
1791
1792 <refsect3>
1793 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1794
1795 <para>
1796 Show a parameter stored in registry.
1797 </para>
1798 </refsect3>
1799
1800 <refsect3>
1801 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1802
1803 <para>
1804 Delete a parameter stored in registry.
1805 </para>
1806 </refsect3>
1807
1808 <refsect3>
1809 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
1810
1811 <para>
1812 Get the list of includes for the provided section (global or share).
1813 </para>
1814
1815 <para>
1816 Note that due to the nature of the registry database and the nature of include directives,
1817 the includes need special treatment: Parameters are stored in registry by the parameter
1818 name as valuename, so there is only ever one instance of a parameter per share.
1819 Also, a specific order like in a text file is not guaranteed. For all real
1820 parameters, this is perfectly ok, but the include directive is rather a meta
1821 parameter, for which, in the smb.conf text file, the place where it is specified
1822 between the other parameters is very important. This can not be achieved by the
1823 simple registry smbconf data model, so there is one ordered list of includes
1824 per share, and this list is evaluated after all the parameters of the share.
1825 </para>
1826
1827 <para>
1828 Further note that currently, only files can be included from registry
1829 configuration. In the future, there will be the ability to include configuration
1830 data from other registry keys.
1831 </para>
1832 </refsect3>
1833
1834 <refsect3>
1835 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
1836
1837 <para>
1838 Set the list of includes for the provided section (global or share) to the given
1839 list of one or more filenames. The filenames may contain the usual smb.conf
1840 macros like %I.
1841 </para>
1842 </refsect3>
1843
1844 <refsect3>
1845 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
1846
1847 <para>
1848 Delete the list of includes from the provided section (global or share).
1849 </para>
1850 </refsect3>
1851
1852 </refsect2>
1853
1854 <refsect2>
1855 <title>REGISTRY</title>
1856 <para>
1857 Manipulate Samba's registry.
1858 </para>
1859
1860 <para>The registry commands are:
1861 <simplelist>
1862 <member>net registry enumerate   - Enumerate registry keys and values.</member>
1863 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
1864 <member>net registry createkey   - Create a new registry key.</member>
1865 <member>net registry deletekey   - Delete a registry key.</member>
1866 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
1867 <member>net registry getvalue    - Print a registry value.</member>
1868 <member>net registry getvalueraw - Print a registry value (raw format).</member>
1869 <member>net registry setvalue    - Set a new registry value.</member>
1870 <member>net registry increment   - Increment a DWORD registry value under a lock.
1871 </member>
1872 <member>net registry deletevalue - Delete a registry value.</member>
1873 <member>net registry getsd       - Get security descriptor.</member>
1874 <member>net registry getsd_sdd1  - Get security descriptor in sddl format.
1875 </member>
1876 <member>net registry setsd_sdd1  - Set security descriptor from sddl format
1877 string.</member>
1878 <member>net registry import      - Import a registration entries (.reg) file.
1879 </member>
1880 <member>net registry export      - Export a registration entries (.reg) file.
1881 </member>
1882 <member>net registry convert     - Convert a registration entries (.reg) file.
1883 </member>
1884 <member>net registry check       - Check and repair a registry database.
1885 </member>
1886 </simplelist>
1887 </para>
1888
1889 <refsect3>
1890   <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
1891   <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
1892   </para>
1893 </refsect3>
1894
1895 <refsect3>
1896   <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
1897   <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
1898   </para>
1899 </refsect3>
1900
1901 <refsect3>
1902   <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
1903   <para>Create a new <emphasis>key</emphasis> if not yet existing.
1904   </para>
1905 </refsect3>
1906
1907 <refsect3>
1908   <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
1909   <para>Delete the given <emphasis>key</emphasis> and its
1910   values from the registry, if it has no subkeys.
1911   </para>
1912 </refsect3>
1913
1914 <refsect3>
1915   <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
1916   <para>Delete the given <emphasis>key</emphasis> and all of its
1917   subkeys and values from the registry.
1918   </para>
1919 </refsect3>
1920
1921 <refsect3>
1922   <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
1923   --><replaceable>name</replaceable></title>
1924
1925   <para>Output type and actual value of the value <emphasis>name</emphasis>
1926   of the given <emphasis>key</emphasis>.
1927   </para>
1928 </refsect3>
1929
1930 <refsect3>
1931   <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
1932   --><replaceable>name</replaceable></title>
1933   <para>Output the actual value of the value <emphasis>name</emphasis>
1934   of the given <emphasis>key</emphasis>.
1935   </para>
1936 </refsect3>
1937
1938 <refsect3>
1939   <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
1940   --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
1941   --><replaceable>value</replaceable> ...<!--
1942   --></title>
1943
1944   <para>Set the value <emphasis>name</emphasis>
1945   of an existing <emphasis>key</emphasis>.
1946   <emphasis>type</emphasis> may be one of
1947   <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
1948   <emphasis>dword</emphasis>.
1949   In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
1950   be given multiple times.
1951   </para>
1952 </refsect3>
1953
1954 <refsect3>
1955   <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
1956   --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
1957   --></title>
1958
1959   <para>Increment the DWORD value <emphasis>name</emphasis>
1960   of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
1961   while holding a g_lock.
1962   <emphasis>inc</emphasis> defaults to 1.
1963   </para>
1964 </refsect3>
1965
1966 <refsect3>
1967   <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
1968   --><replaceable>name</replaceable></title>
1969
1970   <para>Delete the value <emphasis>name</emphasis>
1971   of the given <emphasis>key</emphasis>.
1972   </para>
1973 </refsect3>
1974
1975 <refsect3>
1976   <title>REGISTRY GETSD <replaceable>key</replaceable></title>
1977
1978   <para>Get the security descriptor of the given <emphasis>key</emphasis>.
1979   </para>
1980 </refsect3>
1981
1982 <refsect3>
1983   <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
1984
1985   <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
1986   Security Descriptor Definition Language (SDDL) string.
1987   </para>
1988 </refsect3>
1989
1990 <refsect3>
1991   <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
1992   --><replaceable>sd</replaceable></title>
1993
1994   <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
1995   Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
1996   </para>
1997 </refsect3>
1998
1999 <refsect3>
2000   <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
2001   --><replaceable> [--precheck &lt;check-file&gt;] [opt]</replaceable></title>
2002   <para>Import a registration entries (.reg) <emphasis>file</emphasis>.</para>
2003   <para>The following options are available:</para>
2004   <variablelist>
2005     <varlistentry><term>--precheck <replaceable>check-file</replaceable></term>
2006     <listitem><para>
2007       This is a mechanism to check the existence or non-existence of
2008       certain keys or values specified in a precheck file before applying
2009       the import file.
2010       The import file will only be applied if the precheck succeeds.
2011     </para>
2012     <para>
2013       The check-file follows the normal registry file syntax with the
2014       following semantics:
2015     </para>
2016       <itemizedlist>
2017         <listitem><para>&lt;value name&gt;=&lt;value&gt; checks whether the
2018           value exists and has the given value.</para></listitem>
2019         <listitem><para>&lt;value name&gt;=- checks whether the value does
2020           not exist.</para></listitem>
2021         <listitem><para>[key] checks whether the key exists.</para>
2022         </listitem>
2023         <listitem><para>[-key] checks whether the key does not exist.</para>
2024         </listitem>
2025       </itemizedlist>
2026     </listitem>
2027     </varlistentry>
2028   </variablelist>
2029 </refsect3>
2030
2031 <refsect3>
2032   <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2033   --><replaceable>file</replaceable><!--
2034   --><replaceable>[opt]</replaceable></title>
2035
2036   <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2037   <emphasis>file</emphasis>.
2038   </para>
2039 </refsect3>
2040
2041 <refsect3>
2042   <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2043   --><replaceable>out</replaceable> <!--
2044   --><replaceable>[[inopt] outopt]</replaceable></title>
2045
2046   <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2047   </para>
2048 </refsect3>
2049
2050 <refsect3>
2051   <title>REGISTRY CHECK [-ravTl] [-o &lt;ODB&gt;] [--wipe] [&lt;DB&gt;]</title>
2052   <para>Check and repair the registry database. If no option is given a read only check of the database is done. Among others an interactive or automatic repair mode may be chosen with one of the following options
2053
2054   <variablelist>
2055     <varlistentry><term>-r|--repair</term>
2056     <listitem><para>
2057       Interactive repair mode, ask a lot of questions.
2058     </para></listitem>
2059     </varlistentry>
2060
2061     <varlistentry><term>-a|--auto</term>
2062     <listitem><para>
2063       Noninteractive repair mode, use default answers.
2064     </para></listitem>
2065     </varlistentry>
2066
2067     <varlistentry><term>-v|--verbose</term>
2068       <listitem><para>
2069         Produce more output.
2070       </para></listitem>
2071     </varlistentry>
2072
2073     <varlistentry><term>-T|--test</term>
2074       <listitem><para>
2075         Dry run, show what changes would be made but don't touch anything.
2076       </para></listitem>
2077     </varlistentry>
2078
2079     <varlistentry><term>-l|--lock</term>
2080       <listitem><para>
2081         Lock the database while doing the check.
2082       </para></listitem>
2083     </varlistentry>
2084
2085    <varlistentry><term>--reg-version={1,2,3}</term>
2086       <listitem><para>
2087         Specify the format of the registry database. If not given it defaults to
2088         the value of the binary or, if an registry.tdb is explizitly stated at
2089         the commandline, to the value found in the INFO/version record.
2090       </para></listitem>
2091     </varlistentry>
2092
2093     <varlistentry><term>[--db] &lt;DB&gt;</term>
2094       <listitem><para>
2095         Check the specified database.
2096       </para></listitem>
2097     </varlistentry>
2098
2099     <varlistentry><term>-o|--output &lt;ODB&gt;</term>
2100       <listitem><para>
2101         Create a new registry database &lt;ODB&gt; instead of modifying the
2102         input. If &lt;ODB&gt; is already existing --wipe may be used to
2103         overwrite it.
2104       </para></listitem>
2105     </varlistentry>
2106
2107    <varlistentry><term>--wipe</term>
2108       <listitem><para>
2109         Replace the registry database instead of modifying the input or
2110         overwrite an existing output database.
2111       </para></listitem>
2112     </varlistentry>
2113
2114     <varlistentry><term></term>
2115       <listitem><para>
2116       </para></listitem>
2117     </varlistentry>
2118   </variablelist>
2119   </para>
2120 </refsect3>
2121
2122 </refsect2>
2123
2124 <refsect2>
2125 <title>EVENTLOG</title>
2126
2127 <para>Starting with version 3.4.0 net can read, dump, import and export native
2128 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2129 </para>
2130
2131 <para>
2132 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2133 <emphasis>smb.conf</emphasis> file.
2134 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2135 </para>
2136
2137 <para>The eventlog commands are:
2138 <simplelist>
2139 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2140 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2141 tdb based representation of eventlogs.</member>
2142 <member>net eventlog export - Export the samba internal tdb based representation
2143 of eventlogs into an eventlog *.evt file.</member>
2144 </simplelist>
2145 </para>
2146
2147 <refsect3>
2148 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2149
2150 <para>
2151 Prints a eventlog *.evt file to standard output.
2152 </para>
2153 </refsect3>
2154
2155 <refsect3>
2156 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2157
2158 <para>
2159 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2160 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2161 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2162 defined in smb.conf.
2163 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2164 </para>
2165
2166 </refsect3>
2167
2168 <refsect3>
2169 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2170
2171 <para>
2172 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2173 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2174 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2175 defined in smb.conf.
2176 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2177 </para>
2178
2179 </refsect3>
2180
2181 </refsect2>
2182
2183 <refsect2>
2184 <title>DOM</title>
2185
2186 <para>Starting with version 3.2.0 Samba has support for remote join and unjoin APIs, both client and server-side. Windows supports remote join capabilities since Windows 2000.
2187 </para>
2188 <para>In order for Samba to be joined or unjoined remotely an account must be used that is either member of the Domain Admins group, a member of the local Administrators group or a user that is granted the SeMachineAccountPrivilege privilege.
2189 </para>
2190
2191 <para>The client side support for remote join is implemented in the net dom commands which are:
2192 <simplelist>
2193 <member>net dom join - Join a remote computer into a domain.</member>
2194 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2195 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2196 </simplelist>
2197 </para>
2198
2199 <refsect3>
2200 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2201
2202 <para>
2203 Joins a computer into a domain. This command supports the following additional parameters:
2204 </para>
2205
2206 <itemizedlist>
2207
2208 <listitem><para><replaceable>DOMAIN</replaceable> can be a NetBIOS domain name (also known as short domain name) or a DNS domain name for Active Directory Domains. As in Windows, it is also possible to control which Domain Controller to use. This can be achieved by appending the DC name using the \ separator character. Example: MYDOM\MYDC. The <replaceable>DOMAIN</replaceable> parameter cannot be NULL.</para></listitem>
2209
2210 <listitem><para><replaceable>OU</replaceable> can be set to a RFC 1779 LDAP DN, like <emphasis>ou=mymachines,cn=Users,dc=example,dc=com</emphasis> in order to create the machine account in a non-default LDAP container. This optional parameter is only supported when joining Active Directory Domains.</para></listitem>
2211
2212 <listitem><para><replaceable>ACCOUNT</replaceable> defines a domain account that will be used to join the machine to the domain. This domain account needs to have sufficient privileges to join machines.</para></listitem>
2213
2214 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2215
2216 <listitem><para><replaceable>REBOOT</replaceable> is an optional parameter that can be set to reboot the remote machine after successful join to the domain.</para></listitem>
2217
2218 </itemizedlist>
2219
2220 <para>
2221 Note that you also need to use standard net parameters to connect and authenticate to the remote machine that you want to join. These additional parameters include: -S computer and -U user.
2222 </para>
2223 <para>
2224         Example:
2225         net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2226 </para>
2227 <para>
2228 This example would connect to a computer named XP as the local administrator using password secret, and join the computer into a domain called MYDOM using the MYDOM domain administrator account and password topsecret. After successful join, the computer would reboot.
2229 </para>
2230
2231 </refsect3>
2232
2233 <refsect3>
2234 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2235
2236 <para>
2237 Unjoins a computer from a domain. This command supports the following additional parameters:
2238 </para>
2239
2240 <itemizedlist>
2241
2242 <listitem><para><replaceable>ACCOUNT</replaceable> defines a domain account that will be used to unjoin the machine from the domain. This domain account needs to have sufficient privileges to unjoin machines.</para></listitem>
2243
2244 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2245
2246 <listitem><para><replaceable>REBOOT</replaceable> is an optional parameter that can be set to reboot the remote machine after successful unjoin from the domain.</para></listitem>
2247
2248 </itemizedlist>
2249
2250 <para>
2251 Note that you also need to use standard net parameters to connect and authenticate to the remote machine that you want to unjoin. These additional parameters include: -S computer and -U user.
2252 </para>
2253 <para>
2254         Example:
2255         net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2256 </para>
2257 <para>
2258 This example would connect to a computer named XP as the local administrator using password secret, and unjoin the computer from the domain using the MYDOM domain administrator account and password topsecret. After successful unjoin, the computer would reboot.
2259 </para>
2260
2261 </refsect3>
2262
2263 <refsect3>
2264 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2265
2266 <para>
2267 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2268 </para>
2269
2270 <itemizedlist>
2271
2272 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2273
2274 <listitem><para><replaceable>ACCOUNT</replaceable> defines a domain account that will be used to rename the machine in the domain. This domain account needs to have sufficient privileges to rename machines.</para></listitem>
2275
2276 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2277
2278 <listitem><para><replaceable>REBOOT</replaceable> is an optional parameter that can be set to reboot the remote machine after successful rename in the domain.</para></listitem>
2279
2280 </itemizedlist>
2281
2282 <para>
2283 Note that you also need to use standard net parameters to connect and authenticate to the remote machine that you want to rename in the domain. These additional parameters include: -S computer and -U user.
2284 </para>
2285 <para>
2286         Example:
2287         net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2288 </para>
2289 <para>
2290 This example would connect to a computer named XP as the local administrator using password secret, and rename the joined computer to XPNEW using the MYDOM domain administrator account and password topsecret. After successful rename, the computer would reboot.
2291 </para>
2292
2293 </refsect3>
2294
2295 </refsect2>
2296
2297 <refsect2>
2298 <title>G_LOCK</title>
2299
2300 <para>Manage global locks.</para>
2301
2302 <refsect3>
2303 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2304
2305 <para>
2306 Execute a shell command under a global lock. This might be useful to define the
2307 order in which several shell commands will be executed. The locking information
2308 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2309 running, the locking information will be available on all cluster nodes.
2310 </para>
2311
2312 <itemizedlist>
2313 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2314 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2315 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2316 </itemizedlist>
2317 </refsect3>
2318
2319 <refsect3>
2320 <title>G_LOCK LOCKS</title>
2321
2322 <para>
2323 Print a list of all currently existing locknames.
2324 </para>
2325 </refsect3>
2326
2327 <refsect3>
2328 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2329
2330 <para>
2331 Dump the locking table of a certain global lock.
2332 </para>
2333 </refsect3>
2334
2335 </refsect2>
2336
2337 <refsect2>
2338 <title>HELP [COMMAND]</title>
2339
2340 <para>Gives usage information for the specified command.</para>
2341
2342 </refsect2>
2343
2344 </refsect1>
2345
2346 <refsect1>
2347         <title>VERSION</title>
2348
2349         <para>This man page is complete for version 3 of the Samba 
2350         suite.</para>
2351 </refsect1>
2352
2353 <refsect1>
2354         <title>AUTHOR</title>
2355         
2356         <para>The original Samba software and related utilities 
2357         were created by Andrew Tridgell. Samba is now developed
2358         by the Samba Team as an Open Source project similar 
2359         to the way the Linux kernel is developed.</para>
2360
2361         <para>The net manpage was written by Jelmer Vernooij.</para>
2362         
2363 </refsect1>
2364
2365 </refentry>