doc: add 'group create' as synonym for 'group add'
[amitay/samba.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">&doc.version;</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|--help</arg>
26                 <arg choice="opt">-w|--workgroup workgroup</arg>
27                 <arg choice="opt">-W|--myworkgroup myworkgroup</arg>
28                 <arg choice="opt">-U|--user user</arg>
29                 <arg choice="opt">-A|--authentication-file authfile</arg>
30                 <arg choice="opt">-I|--ipaddress ip-address</arg>
31                 <arg choice="opt">-p|--port port</arg>
32                 <arg choice="opt">-n myname</arg>
33                 <arg choice="opt">-s conffile</arg>
34                 <arg choice="opt">-S|--server server</arg>
35                 <arg choice="opt">-l|--long</arg>
36                 <arg choice="opt">-v|--verbose</arg>
37                 <arg choice="opt">-f|--force</arg>
38                 <arg choice="opt">-P|--machine-pass</arg>
39                 <arg choice="opt">-d debuglevel</arg>
40                 <arg choice="opt">-V</arg>
41                 <arg choice="opt">--request-timeout seconds</arg>
42                 <arg choice="opt">-t|--timeout seconds</arg>
43                 <arg choice="opt">-i|--stdin</arg>
44                 <arg choice="opt">--tallocreport</arg>
45         </cmdsynopsis>
46 </refsynopsisdiv>
47
48 <refsect1>
49         <title>DESCRIPTION</title>
50
51         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
52         <manvolnum>7</manvolnum></citerefentry> suite.</para>
53
54         <para>The Samba net utility is meant to work just like the net utility 
55         available for windows and DOS. The first argument should be used 
56         to specify the protocol to use when executing a certain command. 
57         ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3) 
58         clients and RPC can be used for NT4 and Windows 2000. If this 
59         argument is omitted, net will try to determine it automatically. 
60         Not all commands are available on all protocols.
61         </para>
62
63 </refsect1>
64
65 <refsect1>
66         <title>OPTIONS</title>
67
68         <variablelist>
69                 &stdarg.help;
70                 &stdarg.kerberos;
71                 
72                 <varlistentry>
73                 <term>-w|--workgroup target-workgroup</term>
74                 <listitem><para>
75                 Sets target workgroup or domain. You have to specify 
76                 either this option or the IP address or the name of a server.
77                 </para></listitem>
78                 </varlistentry>
79
80                 <varlistentry>
81                 <term>-W|--myworkgroup workgroup</term>
82                 <listitem><para>
83                 Sets client workgroup or domain
84                 </para></listitem>
85                 </varlistentry>
86
87                 <varlistentry>
88                 <term>-U|--user user</term>
89                 <listitem><para>
90                 User name to use
91                 </para></listitem>
92                 </varlistentry>
93
94                 <varlistentry>
95                 <term>-I|--ipaddress ip-address</term>
96                 <listitem><para>
97                 IP address of target server to use. You have to
98                 specify either this option or a target workgroup or
99                 a target server.
100                 </para></listitem>
101                 </varlistentry>
102
103                 <varlistentry>
104                 <term>-p|--port port</term>
105                 <listitem><para>
106                 Port on the target server to connect to (usually 139 or 445). 
107                 Defaults to trying 445 first, then 139.
108                 </para></listitem>
109                 </varlistentry>
110
111                 &stdarg.netbios.name;
112
113                 <varlistentry>
114                 <term>-S|--server server</term>
115                 <listitem><para>
116                 Name of target server. You should specify either 
117                 this option or a target workgroup or a target IP address.
118                 </para></listitem>
119                 </varlistentry>
120
121                 <varlistentry>
122                 <term>-l|--long</term>
123                 <listitem><para>
124                 When listing data, give more information on each item.
125                 </para></listitem>
126                 </varlistentry>
127
128                 <varlistentry>
129                 <term>-v|--verbose</term>
130                 <listitem><para>
131                 When listing data, give more verbose information on each item.
132                 </para></listitem>
133                 </varlistentry>
134
135                 <varlistentry>
136                 <term>-f|--force</term>
137                 <listitem><para>
138                                 Enforcing a net command.
139                 </para></listitem>
140                 </varlistentry>
141
142                 <varlistentry>
143                 <term>-P|--machine-pass</term>
144                 <listitem><para>
145                 Make queries to the external server using the machine account of the local server.
146                 </para></listitem>
147                 </varlistentry>
148
149                 <varlistentry>
150                 <term>--request-timeout 30</term>
151                 <listitem><para>
152                 Let client requests timeout after 30 seconds the default is 10
153                 seconds.
154                 </para></listitem>
155                 </varlistentry>
156
157                 <varlistentry>
158                 <term>-t|--timeout 30</term>
159                 <listitem><para>
160                                 Set timeout for client operations to 30 seconds.
161                 </para></listitem>
162                 </varlistentry>
163
164                 <varlistentry>
165                 <term>--use-ccache</term>
166                 <listitem><para>
167                 Try to use the credentials cached by winbind.
168                 </para></listitem>
169                 </varlistentry>
170
171                 <varlistentry>
172                 <term>-i|--stdin</term>
173                 <listitem><para>
174                                 Take input for net commands from standard input.
175                 </para></listitem>
176                 </varlistentry>
177
178                 <varlistentry>
179                 <term>--tallocreport</term>
180                 <listitem><para>
181                                 Generate a talloc report while processing a net
182                                 command.
183                 </para></listitem>
184                 </varlistentry>
185
186                 <varlistentry>
187                 <term>-T|--test</term>
188                 <listitem><para>Only test command sequence, dry-run.
189                 </para></listitem>
190                 </varlistentry>
191
192                 <varlistentry>
193                 <term>-F|--flags FLAGS</term>
194                 <listitem><para>Pass down integer flags to a net subcommand.
195                 </para></listitem>
196                 </varlistentry>
197
198                 <varlistentry>
199                 <term>-C|--comment COMMENT</term>
200                 <listitem><para>Pass down a comment string to a net subcommand.
201                 </para></listitem>
202                 </varlistentry>
203
204                 <varlistentry>
205                 <term>-n|--myname MYNAME</term>
206                 <listitem><para>Use MYNAME as a requester name for a net subcommand.
207                 </para></listitem>
208                 </varlistentry>
209
210                 <varlistentry>
211                 <term>-c|--container CONTAINER</term>
212                 <listitem><para>Use a specific AD container for net ads operations.
213                 </para></listitem>
214                 </varlistentry>
215
216                 <varlistentry>
217                 <term>-M|--maxusers MAXUSERS</term>
218                 <listitem><para>Fill in the maxusers field in net rpc share operations.
219                 </para></listitem>
220                 </varlistentry>
221
222                 <varlistentry>
223                 <term>-r|--reboot</term>
224                 <listitem><para>Reboot a remote machine after a command has been successfully executed (e.g. in remote join operations).
225                 </para></listitem>
226                 </varlistentry>
227
228                 <!-- Options for net rpc vampire -->
229
230                 <varlistentry>
231                 <term>--force-full-repl</term>
232                 <listitem><para>
233                                 When calling "net rpc vampire keytab" this option
234                                 enforces a full re-creation of the generated keytab file.
235                 </para></listitem>
236                 </varlistentry>
237
238                 <varlistentry>
239                 <term>--single-obj-repl</term>
240                 <listitem><para>
241                                 When calling "net rpc vampire keytab" this option
242                                 allows one to replicate just a single object to the generated keytab file.
243                 </para></listitem>
244                 </varlistentry>
245
246                 <varlistentry>
247                 <term>--clean-old-entries</term>
248                 <listitem><para>
249                                 When calling "net rpc vampire keytab" this option
250                                 allows one to cleanup old entries from the generated keytab file.
251                 </para></listitem>
252                 </varlistentry>
253
254                 <!-- Options for net idmap -->
255
256                 <varlistentry>
257                 <term>--db</term>
258                 <listitem><para>Define dbfile for "net idmap" commands.
259                 </para></listitem>
260                 </varlistentry>
261
262                 <varlistentry>
263                 <term>--lock</term>
264                 <listitem><para>Activates locking of the dbfile for "net idmap check" command.
265                 </para></listitem>
266                 </varlistentry>
267
268                 <varlistentry>
269                 <term>-a|--auto</term>
270                 <listitem><para>Activates noninteractive mode in "net idmap check".
271                 </para></listitem>
272                 </varlistentry>
273
274                 <varlistentry>
275                 <term>--repair</term>
276                 <listitem><para>Activates repair mode in "net idmap check".
277                 </para></listitem>
278                 </varlistentry>
279
280                 <!-- Options for net rpc share migrate -->
281
282                 <varlistentry>
283                 <term>--acls</term>
284                 <listitem><para>Includes ACLs to be copied in "net rpc share migrate".
285                 </para></listitem>
286                 </varlistentry>
287
288                 <varlistentry>
289                 <term>--attrs</term>
290                 <listitem><para>Includes file attributes to be copied in "net rpc share migrate".
291                 </para></listitem>
292                 </varlistentry>
293
294                 <varlistentry>
295                 <term>--timestamps</term>
296                 <listitem><para>Includes timestamps to be copied in "net rpc share migrate".
297                 </para></listitem>
298                 </varlistentry>
299
300                 <varlistentry>
301                 <term>-X|--exclude DIRECTORY</term>
302                 <listitem><para>Allows one to exclude directories when copying with "net rpc share migrate".
303                 </para></listitem>
304                 </varlistentry>
305
306                 <varlistentry>
307                 <term>--destination SERVERNAME</term>
308                 <listitem><para>Defines the target servername of migration process (defaults to localhost).
309                 </para></listitem>
310                 </varlistentry>
311
312                 <!-- Options for net groupmap set -->
313
314                 <varlistentry>
315                 <term>-L|--local</term>
316                 <listitem><para>Sets the type of group mapping to local
317                                 (used in "net groupmap set").
318                 </para></listitem>
319                 </varlistentry>
320
321                 <varlistentry>
322                 <term>-D|--domain</term>
323                 <listitem><para>Sets the type of group mapping to domain
324                                 (used in "net groupmap set").
325                 </para></listitem>
326                 </varlistentry>
327
328                 <varlistentry>
329                 <term>-N|--ntname NTNAME</term>
330                 <listitem><para>Sets the ntname of a group mapping
331                                 (used in "net groupmap set").
332                 </para></listitem>
333                 </varlistentry>
334
335                 <varlistentry>
336                 <term>-R|--rid RID</term>
337                 <listitem><para>Sets the rid of a group mapping
338                                 (used in "net groupmap set").
339                 </para></listitem>
340                 </varlistentry>
341
342                 <!-- Options for net registry check -->
343
344                 <varlistentry>
345                 <term>--reg-version REG_VERSION</term>
346                 <listitem><para>Assume database version {n|1,2,3}
347                                 (used in "net registry check").
348                 </para></listitem>
349                 </varlistentry>
350
351                 <varlistentry>
352                 <term>-o|--output FILENAME</term>
353                 <listitem><para>Output database file
354                                 (used in "net registry check").
355                 </para></listitem>
356                 </varlistentry>
357
358                 <varlistentry>
359                 <term>--wipe</term>
360                 <listitem><para>Create a new database from scratch
361                                 (used in "net registry check").
362                 </para></listitem>
363                 </varlistentry>
364
365                 <!-- Options for net registry import -->
366
367                 <varlistentry>
368                 <term>--precheck PRECHECK_DB_FILENAME</term>
369                 <listitem><para>Defines filename for database prechecking
370                                 (used in "net registry import").
371                 </para></listitem>
372                 </varlistentry>
373
374                 <varlistentry>
375                 <term>--no-dns-updates</term>
376                 <listitem><para>Do not perform DNS updates as part of
377                 "net ads join".
378                 </para></listitem>
379                 </varlistentry>
380
381                 <varlistentry>
382                 <term>--keep-account</term>
383                 <listitem><para>Prevent the machine account removal as
384                 part of "net ads leave".
385                 </para></listitem>
386                 </varlistentry>
387
388                 <varlistentry>
389                 <term>--json</term>
390                 <listitem><para>Report results in JSON format for
391                 "net ads info" and "net ads lookup".
392                 </para></listitem>
393                 </varlistentry>
394
395                 <!-- Options for net vfs stream2abouble -->
396
397                 <varlistentry>
398                 <term>--recursive</term>
399                 <listitem><para>Traverse a directory
400                 hierarchy.</para></listitem>
401                 </varlistentry>
402
403                 <varlistentry>
404                 <term>--continue</term>
405                 <listitem><para>Continue traversing a directory hierarchy in
406                 case conversion of one file fails.</para></listitem>
407                 </varlistentry>
408
409                 <varlistentry>
410                 <term>--follow-symlinks</term>
411                 <listitem><para>Follow symlinks encountered while traversing a
412                 directory.</para></listitem>
413                 </varlistentry>
414
415                 &stdarg.encrypt;
416                 &popt.common.samba.client;
417
418         </variablelist>
419 </refsect1>
420
421 <refsect1>
422 <title>COMMANDS</title>
423
424 <refsect2>
425 <title>CHANGESECRETPW</title>
426
427 <para>This command allows the Samba machine account password to be set from an external application
428 to a machine account password that has already been stored in Active Directory. DO NOT USE this command
429 unless you know exactly what you are doing. The use of this command requires that the force flag (-f)
430 be used also. There will be NO command prompt. Whatever information is piped into stdin, either by
431 typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use
432 this without care and attention as it will overwrite a legitimate machine password without warning.
433 YOU HAVE BEEN WARNED.
434 </para>
435
436 </refsect2>
437
438 <refsect2>
439         <title>TIME</title>
440
441         <para>The <command>NET TIME</command> command allows you to view the time on a remote server
442         or synchronise the time on the local server with the time on the remote server.</para>
443
444 <refsect3>
445 <title>TIME</title>
446
447 <para>Without any options, the <command>NET TIME</command> command 
448 displays the time on the remote server. The remote server must be
449 specified with the -S option.
450 </para>
451
452 </refsect3>
453
454 <refsect3>
455 <title>TIME SYSTEM</title>
456
457 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.
458 The remote server must be specified with the -S option.
459 </para>
460
461 </refsect3>
462
463 <refsect3>
464 <title>TIME SET</title>
465 <para>Tries to set the date and time of the local server to that on 
466 the remote server using <command>/bin/date</command>.
467 The remote server must be specified with the -S option.
468 </para>
469
470 </refsect3>
471
472 <refsect3>
473 <title>TIME ZONE</title>
474
475 <para>Displays the timezone in hours from GMT on the remote server.
476 The remote server must be specified with the -S option.
477 </para>
478
479 </refsect3>
480 </refsect2>
481
482 <refsect2>
483 <title>[RPC|ADS] JOIN [TYPE] [--no-dns-updates] [-U username[%password]]
484 [dnshostname=FQDN] [createupn=UPN] [createcomputer=OU] [machinepass=PASS]
485 [osName=string osVer=string] [options]</title>
486
487 <para>
488 Join a domain.  If the account already exists on the server, and 
489 [TYPE] is MEMBER, the machine will attempt to join automatically. 
490 (Assuming that the machine has been created in server manager)
491 Otherwise, a password will be prompted for, and a new account may
492 be created.</para>
493
494 <para>
495 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
496 joining the domain.
497 </para>
498
499 <para>
500 [FQDN] (ADS only) set the dnsHostName attribute during the join.
501 The default format is netbiosname.dnsdomain.
502 </para>
503
504 <para>
505 [UPN] (ADS only) set the principalname attribute during the join.  The default
506 format is host/netbiosname@REALM.
507 </para>
508
509 <para>
510 [OU] (ADS only) Precreate the computer account in a specific OU.  The
511 OU string reads from top to bottom without RDNs, and is delimited by
512 a '/'.  Please note that '\' is used for escape by both the shell
513 and ldap, so it may need to be doubled or quadrupled to pass through, 
514 and it is not used as a delimiter.
515 </para>
516 <para>
517 [PASS] (ADS only) Set a specific password on the computer account
518 being created by the join.
519 </para>
520 <para>
521 [osName=string osVer=String] (ADS only) Set the operatingSystem and
522 operatingSystemVersion attribute during the join.  Both parameters
523 must be specified for either to take effect.
524 </para>
525 </refsect2>
526
527 <refsect2>
528 <title>[RPC] OLDJOIN [options]</title>
529
530 <para>Join a domain. Use the OLDJOIN option to join the domain 
531 using the old style of domain joining - you need to create a trust 
532 account in server manager first.</para>
533 </refsect2>
534
535 <refsect2>
536 <title>[RPC|ADS] USER</title>
537
538 <refsect3>
539 <title>[RPC|ADS] USER</title>
540
541 <para>List all users</para>
542
543 </refsect3>
544
545 <refsect3>
546 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
547
548 <para>Delete specified user</para>
549
550 </refsect3>
551
552 <refsect3>
553 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
554
555 <para>List the domain groups of the specified user.</para>
556
557 </refsect3>
558
559 <refsect3>
560 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
561
562 <para>Rename specified user.</para>
563
564 </refsect3>
565
566 <refsect3>
567 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
568
569 <para>Add specified user.</para>
570 </refsect3>
571 </refsect2>
572
573 <refsect2>
574 <title>[RPC|ADS] GROUP</title>
575
576 <refsect3>
577 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
578 <para>List user groups.</para>
579 </refsect3>
580
581 <refsect3>
582 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
583
584 <para>Delete specified group.</para>
585
586 </refsect3>
587
588 <refsect3>
589 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
590
591 <para>Create specified group.</para>
592
593 </refsect3>
594 <refsect3>
595 <title>[ADS] LOOKUP</title>
596
597 <para>Lookup the closest Domain Controller in our domain and retrieve server information about it.</para>
598
599 </refsect3>
600 </refsect2>
601
602 <refsect2>
603 <title>[RAP|RPC] SHARE</title>
604
605 <refsect3>
606 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
607
608 <para>Enumerates all exported resources (network shares) on target server.</para>
609
610 </refsect3>
611
612 <refsect3>
613 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
614
615 <para>Adds a share from a server (makes the export active). Maxusers 
616 specifies the number of users that can be connected to the 
617 share simultaneously.</para>
618
619 </refsect3>
620
621 <refsect3>
622 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
623
624 <para>Delete specified share.</para>
625 </refsect3>
626 </refsect2>
627
628 <refsect2>
629 <title>[RPC|RAP] FILE</title>
630
631 <refsect3>
632 <title>[RPC|RAP] FILE</title>
633
634 <para>List all open files on remote server.</para>
635
636 </refsect3>
637
638 <refsect3>
639 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
640
641 <para>Close file with specified <replaceable>fileid</replaceable> on 
642 remote server.</para>
643
644 </refsect3>
645
646 <refsect3>
647 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
648
649 <para>
650 Print information on specified <replaceable>fileid</replaceable>. 
651 Currently listed are: file-id, username, locks, path, permissions.
652 </para>
653
654 </refsect3>
655
656 <refsect3>
657 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
658
659 <para>
660 List files opened by specified <replaceable>user</replaceable>.
661 Please note that <command>net rap file user</command> does not work
662 against Samba servers. 
663 </para>
664
665 </refsect3>
666
667 </refsect2>
668
669 <refsect2>
670 <title>SESSION</title>
671
672 <refsect3>
673 <title>RAP SESSION</title>
674
675 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
676 sessions on the target server.</para>
677
678 </refsect3>
679
680 <refsect3>
681 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
682
683 <para>Close the specified sessions.</para>
684
685 </refsect3>
686
687 <refsect3>
688 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
689
690 <para>Give a list with all the open files in specified session.</para>
691
692 </refsect3>
693
694 </refsect2>
695
696 <refsect2>
697 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
698
699 <para>List all servers in specified domain or workgroup. Defaults
700 to local domain.</para>
701
702 </refsect2>
703
704 <refsect2>
705 <title>RAP DOMAIN</title>
706
707 <para>Lists all domains and workgroups visible on the 
708 current network.</para>
709
710 </refsect2>
711
712 <refsect2>
713 <title>RAP PRINTQ</title>
714
715 <refsect3>
716 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
717
718 <para>Lists the specified print queue and print jobs on the server.
719 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all 
720 queues are listed.</para>
721
722 </refsect3>
723
724 <refsect3>
725 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
726
727 <para>Delete job with specified id.</para>
728
729 </refsect3>
730
731 </refsect2>
732
733 <refsect2>
734 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
735
736 <para>
737 Validate whether the specified user can log in to the 
738 remote server. If the password is not specified on the commandline, it 
739 will be prompted. 
740 </para>
741
742 &not.implemented;
743
744 </refsect2>
745
746 <refsect2>
747 <title>RAP GROUPMEMBER</title>
748
749 <refsect3>
750 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
751
752 <para>List all members of the specified group.</para>
753
754 </refsect3>
755
756 <refsect3>
757 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
758
759 <para>Delete member from group.</para>
760
761 </refsect3>
762
763 <refsect3>
764 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
765
766 <para>Add member to group.</para>
767
768 </refsect3>
769
770 </refsect2>
771
772 <refsect2>
773 <title>RAP ADMIN <replaceable>command</replaceable></title>
774
775 <para>Execute the specified <replaceable>command</replaceable> on 
776 the remote server. Only works with OS/2 servers.
777 </para>
778
779 &not.implemented;
780
781 </refsect2>
782
783 <refsect2>
784 <title>RAP SERVICE</title>
785
786 <refsect3>
787 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
788
789 <para>Start the specified service on the remote server. Not implemented yet.</para>
790
791 &not.implemented;
792
793 </refsect3>
794
795 <refsect3>
796 <title>RAP SERVICE STOP</title>
797
798 <para>Stop the specified service on the remote server.</para>
799
800 &not.implemented;
801
802 </refsect3>
803
804 </refsect2>
805
806 <refsect2>
807 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
808
809 <para>
810 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
811 </para>
812
813 </refsect2>
814
815 <refsect2>
816 <title>LOOKUP</title>
817
818 <refsect3>
819 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
820
821 <para>
822 Lookup the IP address of the given host with the specified type (netbios suffix). 
823 The type defaults to 0x20 (workstation).
824 </para>
825
826 </refsect3>
827
828 <refsect3>
829 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
830
831 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
832
833 </refsect3>
834
835 <refsect3>
836 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
837
838 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
839 Defaults to local realm.</para>
840
841 </refsect3>
842
843 <refsect3>
844 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
845
846 <para>Give IP's of Domain Controllers for specified <replaceable>
847 DOMAIN</replaceable>. Defaults to local domain.</para>
848
849 </refsect3>
850
851 <refsect3>
852 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
853
854 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
855 or workgroup. Defaults to local domain.</para>
856
857 </refsect3>
858
859 <refsect3>
860 <title>LOOKUP NAME [<replaceable>NAME</replaceable>]</title>
861
862 <para>Lookup username's sid and type for specified <replaceable>NAME</replaceable>
863 </para>
864
865 </refsect3>
866
867 <refsect3>
868 <title>LOOKUP SID [<replaceable>SID</replaceable>]</title>
869
870 <para>Give sid's name and type for specified <replaceable>SID</replaceable>
871 </para>
872
873 </refsect3>
874
875 <refsect3>
876 <title>LOOKUP DSGETDCNAME [<replaceable>NAME</replaceable>] [<replaceable>FLAGS</replaceable>] [<replaceable>SITENAME</replaceable>]</title>
877
878 <para>Give Domain Controller information for specified domain <replaceable>NAME</replaceable>
879 </para>
880
881 </refsect3>
882
883 </refsect2>
884
885 <refsect2>
886 <title>CACHE</title>
887
888 <para>Samba uses a general caching interface called 'gencache'. It 
889 can be controlled using 'NET CACHE'.</para>
890
891 <para>All the timeout parameters support the suffixes:
892
893 <simplelist>
894 <member>s - Seconds</member>
895 <member>m - Minutes</member>
896 <member>h - Hours</member>
897 <member>d - Days</member>
898 <member>w - Weeks</member>
899 </simplelist>
900
901 </para>
902
903 <refsect3>
904 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
905
906 <para>Add specified key+data to the cache with the given timeout.</para>
907
908 </refsect3>
909
910 <refsect3>
911 <title>CACHE DEL <replaceable>key</replaceable></title>
912
913 <para>Delete key from the cache.</para>
914
915 </refsect3>
916
917 <refsect3>
918 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
919
920 <para>Update data of existing cache entry.</para>
921
922 </refsect3>
923
924 <refsect3>
925 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
926
927 <para>Search for the specified pattern in the cache data.</para>
928
929 </refsect3>
930
931 <refsect3>
932 <title>CACHE LIST</title>
933
934 <para>
935 List all current items in the cache.
936 </para>
937
938 </refsect3>
939
940 <refsect3>
941 <title>CACHE FLUSH</title>
942
943 <para>Remove all the current items from the cache.</para>
944
945 </refsect3>
946
947 </refsect2>
948
949 <refsect2>
950 <title>GETLOCALSID [DOMAIN]</title>
951
952 <para>Prints the SID of the specified domain, or if the parameter is
953 omitted, the SID of the local server.</para>
954
955 </refsect2>
956
957 <refsect2>
958 <title>SETLOCALSID S-1-5-21-x-y-z</title>
959
960 <para>Sets SID for the local server to the specified SID.</para>
961
962 </refsect2>
963
964 <refsect2>
965 <title>GETDOMAINSID</title>
966
967 <para>Prints the local machine SID and the SID of the current 
968 domain.</para>
969
970 </refsect2>
971
972 <refsect2>
973 <title>SETDOMAINSID</title>
974
975 <para>Sets the SID of the current domain.</para>
976
977 </refsect2>
978
979 <refsect2>
980 <title>GROUPMAP</title>
981
982 <para>Manage the mappings between Windows group SIDs and UNIX groups.
983 Common options include:</para>
984
985 <itemizedlist>
986 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
987 <listitem><para>ntgroup - Name of the Windows NT group (must be
988   resolvable to a SID</para></listitem>
989 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
990 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
991 <listitem><para>type - Type of the group; either 'domain', 'local',
992   or 'builtin'</para></listitem>
993 <listitem><para>comment - Freeform text description of the group</para></listitem>
994 </itemizedlist>
995
996 <refsect3>
997 <title>GROUPMAP ADD</title>
998
999 <para>
1000 Add a new group mapping entry:
1001 <programlisting>
1002 net groupmap add {rid=int|sid=string} unixgroup=string \
1003         [type={domain|local}] [ntgroup=string] [comment=string]
1004 </programlisting>
1005 </para>
1006
1007 </refsect3>
1008
1009 <refsect3>
1010 <title>GROUPMAP DELETE</title>
1011
1012 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
1013
1014 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
1015
1016 </refsect3>
1017
1018 <refsect3>
1019 <title>GROUPMAP MODIFY</title>
1020
1021 <para>Update an existing group entry.</para>
1022
1023 <para>
1024 <programlisting>
1025 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
1026        [comment=string] [type={domain|local}]
1027 </programlisting>
1028 </para>
1029 </refsect3>
1030
1031 <refsect3>
1032 <title>GROUPMAP LIST</title>
1033
1034 <para>List existing group mapping entries.</para>
1035
1036 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
1037
1038 </refsect3>
1039 </refsect2>
1040
1041
1042
1043 <refsect2>
1044 <title>MAXRID</title>
1045
1046 <para>Prints out the highest RID currently in use on the local
1047 server (by the active 'passdb backend').
1048 </para>
1049
1050 </refsect2>
1051
1052 <refsect2>
1053 <title>RPC INFO</title>
1054
1055 <para>Print information about the domain of the remote server,
1056 such as domain name, domain sid and number of users and groups.
1057 </para>
1058
1059 </refsect2>
1060
1061 <refsect2>
1062 <title>[RPC|ADS] TESTJOIN</title>
1063
1064 <para>Check whether participation in a domain is still valid.</para>
1065
1066 </refsect2>
1067
1068 <refsect2>
1069 <title>[RPC|ADS] CHANGETRUSTPW</title>
1070
1071 <para>Force change of domain trust password.</para>
1072
1073 </refsect2>
1074
1075 <refsect2>
1076 <title>RPC TRUSTDOM</title>
1077
1078 <refsect3>
1079 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
1080
1081 <para>Add a interdomain trust account for <replaceable>DOMAIN</replaceable>. 
1082 This is in fact a Samba account named <replaceable>DOMAIN$</replaceable> 
1083 with the account flag <constant>'I'</constant> (interdomain trust account). 
1084 This is required for incoming trusts to work. It makes Samba be a
1085 trusted domain of the foreign (trusting) domain.
1086 Users of the Samba domain will be made available in the foreign domain.
1087 If the command is used against localhost it has the same effect as 
1088 <command>smbpasswd -a -i DOMAIN</command>. Please note that both commands
1089 expect a appropriate UNIX account. 
1090 </para>
1091
1092 </refsect3>
1093
1094 <refsect3>
1095 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
1096
1097 <para>Remove interdomain trust account for 
1098 <replaceable>DOMAIN</replaceable>. If it is used against localhost 
1099 it has the same effect as <command>smbpasswd -x DOMAIN$</command>. 
1100 </para>
1101
1102 </refsect3>
1103
1104 <refsect3>
1105 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
1106
1107 <para>
1108 Establish a trust relationship to a trusted domain. 
1109 Interdomain account must already be created on the remote PDC.
1110 This is required for outgoing trusts to work. It makes Samba be a
1111 trusting domain of a foreign (trusted) domain.
1112 Users of the foreign domain will be made available in our domain.
1113 You'll need winbind and a working idmap config to make them
1114 appear in your system.
1115 </para>
1116
1117 </refsect3>
1118
1119 <refsect3>
1120 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
1121 <para>Abandon relationship to trusted domain</para>
1122
1123 </refsect3>
1124
1125 <refsect3>
1126 <title>RPC TRUSTDOM LIST</title>
1127
1128 <para>List all interdomain trust relationships.</para>
1129
1130 </refsect3>
1131 </refsect2>
1132
1133 <refsect2>
1134 <title>RPC TRUST</title>
1135
1136 <refsect3>
1137 <title>RPC TRUST CREATE</title>
1138
1139 <para>Create a trust object by calling lsaCreateTrustedDomainEx2.
1140 The can be done on a single server or on two servers at once with the
1141 possibility to use a random trust password.</para>
1142
1143 <variablelist><title>Options:</title>
1144 <varlistentry>
1145 <term>otherserver</term>
1146 <listitem><para>Domain controller of the second domain</para></listitem>
1147 </varlistentry>
1148
1149 <varlistentry>
1150 <term>otheruser</term>
1151 <listitem><para>Admin user in the second domain</para></listitem>
1152 </varlistentry>
1153
1154 <varlistentry>
1155 <term>otherdomainsid</term>
1156 <listitem><para>SID of the second domain</para></listitem>
1157 </varlistentry>
1158
1159 <varlistentry>
1160 <term>other_netbios_domain</term>
1161 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
1162 </varlistentry>
1163
1164 <varlistentry>
1165 <term>otherdomain</term>
1166 <listitem><para>DNS (full) name of the second domain</para></listitem>
1167 </varlistentry>
1168
1169 <varlistentry>
1170 <term>trustpw</term>
1171 <listitem><para>Trust password</para></listitem>
1172 </varlistentry>
1173 </variablelist>
1174
1175 <variablelist><title>Examples:</title>
1176 <varlistentry>
1177 <term>Create a trust object on srv1.dom1.dom for the domain dom2</term>
1178 <listitem><literallayout>
1179 net rpc trust create \
1180     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
1181     other_netbios_domain=dom2 \
1182     otherdomain=dom2.dom \
1183     trustpw=12345678 \
1184     -S srv1.dom1.dom
1185 </literallayout></listitem>
1186 </varlistentry>
1187 <varlistentry>
1188 <term>Create a trust relationship between dom1 and dom2</term>
1189 <listitem><literallayout>
1190 net rpc trust create \
1191     otherserver=srv2.dom2.test \
1192     otheruser=dom2adm \
1193     -S srv1.dom1.dom
1194 </literallayout></listitem>
1195 </varlistentry>
1196 </variablelist>
1197 </refsect3>
1198
1199 <refsect3>
1200 <title>RPC TRUST DELETE</title>
1201
1202 <para>Delete a trust object by calling lsaDeleteTrustedDomain.
1203 The can be done on a single server or on two servers at once.</para>
1204
1205 <variablelist><title>Options:</title>
1206 <varlistentry>
1207 <term>otherserver</term>
1208 <listitem><para>Domain controller of the second domain</para></listitem>
1209 </varlistentry>
1210
1211 <varlistentry>
1212 <term>otheruser</term>
1213 <listitem><para>Admin user in the second domain</para></listitem>
1214 </varlistentry>
1215
1216 <varlistentry>
1217 <term>otherdomainsid</term>
1218 <listitem><para>SID of the second domain</para></listitem>
1219 </varlistentry>
1220 </variablelist>
1221
1222 <variablelist><title>Examples:</title>
1223 <varlistentry>
1224 <term>Delete a trust object on srv1.dom1.dom for the domain dom2</term>
1225 <listitem><literallayout>
1226 net rpc trust delete \
1227     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
1228     -S srv1.dom1.dom
1229 </literallayout></listitem>
1230 </varlistentry>
1231 <varlistentry>
1232 <term>Delete a trust relationship between dom1 and dom2</term>
1233 <listitem><literallayout>
1234 net rpc trust delete \
1235     otherserver=srv2.dom2.test \
1236     otheruser=dom2adm \
1237     -S srv1.dom1.dom
1238 </literallayout></listitem>
1239 </varlistentry>
1240 </variablelist>
1241 </refsect3>
1242
1243 </refsect2>
1244
1245 <refsect2>
1246 <refsect3>
1247 <title>RPC RIGHTS</title>
1248
1249 <para>This subcommand is used to view and manage Samba's rights assignments (also 
1250 referred to as privileges).  There are three options currently available: 
1251 <parameter>list</parameter>, <parameter>grant</parameter>, and 
1252 <parameter>revoke</parameter>.  More details on Samba's privilege model and its use
1253 can be found in the Samba-HOWTO-Collection.</para>
1254
1255 </refsect3>
1256
1257
1258 </refsect2>
1259
1260 <refsect2>
1261 <title>RPC ABORTSHUTDOWN</title>
1262
1263 <para>Abort the shutdown of a remote server.</para>
1264
1265 </refsect2>
1266
1267 <refsect2>
1268 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
1269
1270 <para>Shut down the remote server.</para>
1271
1272 <variablelist>
1273 <varlistentry>
1274 <term>-r</term>
1275 <listitem><para>
1276 Reboot after shutdown.
1277 </para></listitem>
1278 </varlistentry>
1279
1280 <varlistentry>
1281 <term>-f</term>
1282 <listitem><para>
1283 Force shutting down all applications.
1284 </para></listitem>
1285 </varlistentry>
1286
1287 <varlistentry>
1288 <term>-t timeout</term>
1289 <listitem><para>
1290 Timeout before system will be shut down. An interactive 
1291 user of the system can use this time to cancel the shutdown.
1292 </para></listitem>
1293 </varlistentry>
1294
1295 <varlistentry>
1296 <term>-C message</term>
1297 <listitem><para>Display the specified message on the screen to 
1298 announce the shutdown.</para></listitem>
1299 </varlistentry>
1300 </variablelist>
1301
1302 </refsect2>
1303
1304 <refsect2>
1305 <title>RPC SAMDUMP</title>
1306
1307 <para>Print out sam database of remote server. You need
1308 to run this against the PDC, from a Samba machine joined as a BDC. </para>
1309 </refsect2>
1310
1311 <refsect2>
1312 <title>RPC VAMPIRE</title>
1313
1314 <para>Export users, aliases and groups from remote server to 
1315 local server.  You need to run this against the PDC, from a Samba machine joined as a BDC. 
1316 This vampire command cannot be used against an Active Directory, only
1317 against an NT4 Domain Controller.
1318 </para>
1319 </refsect2>
1320
1321 <refsect2>
1322 <title>RPC VAMPIRE KEYTAB</title>
1323
1324 <para>Dump remote SAM database to local Kerberos keytab file.
1325 </para>
1326 </refsect2>
1327
1328 <refsect2>
1329 <title>RPC VAMPIRE LDIF</title>
1330
1331 <para>Dump remote SAM database to local LDIF file or standard output.
1332 </para>
1333 </refsect2>
1334
1335 <refsect2>
1336 <title>RPC GETSID</title>
1337
1338 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
1339
1340 </refsect2>
1341
1342 <refsect2>
1343
1344 <title>ADS GPO</title>
1345 <refsect3>
1346 <title>ADS GPO APPLY &lt;USERNAME|MACHINENAME&gt; </title>
1347 <para>Apply GPOs for a username or machine name. Either username or machine name should be provided to the command, not both. </para>
1348 </refsect3>
1349
1350 <refsect3>
1351 <title>ADS GPO GETGPO [<replaceable>GPO</replaceable>]</title>
1352 <para>List specified GPO.</para>
1353 </refsect3>
1354
1355 <refsect3>
1356 <title>ADS GPO LINKADD [<replaceable>LINKDN</replaceable>] [<replaceable>GPODN</replaceable>]</title>
1357 <para>Link a container to a GPO. <replaceable>LINKDN</replaceable> Container to link to a GPO. <replaceable>GPODN</replaceable> GPO to link container to. DNs must be provided properly escaped. See RFC 4514 for details.</para>
1358 </refsect3>
1359
1360 <refsect3>
1361 <title>ADS GPO LINKGET [<replaceable>CONTAINER</replaceable>]</title>
1362 <para>Lists gPLink of a containter.</para>
1363 </refsect3>
1364
1365 <refsect3>
1366 <title>ADS GPO LIST &lt;USERNAME|MACHINENAME&gt; </title>
1367 <para>Lists all GPOs for a username or machine name. Either username or machine name should be provided to the command, not both. </para>
1368 </refsect3>
1369
1370 <refsect3>
1371 <title>ADS GPO LISTALL</title>
1372 <para>Lists all GPOs on a DC.</para>
1373 </refsect3>
1374
1375 <refsect3>
1376 <title>ADS GPO REFRESH [<replaceable>USERNAME</replaceable>] [<replaceable>MACHINENAME</replaceable>]</title>
1377 <para>Lists all GPOs assigned to an account and download them. <replaceable>USERNAME</replaceable> User to refresh GPOs for. <replaceable>MACHINENAME</replaceable> Machine to refresh GPOs for.</para>
1378 </refsect3>
1379
1380 </refsect2>
1381
1382 <refsect2>
1383
1384 <title>ADS DNS</title>
1385
1386 <refsect3>
1387 <title>ADS DNS REGISTER [HOSTNAME [IP [IP.....]]]</title>
1388 <para>Add host dns entry to Active Directory.</para>
1389 </refsect3>
1390
1391 <refsect3>
1392 <title>ADS DNS UNREGISTER &lt;HOSTNAME&gt;</title>
1393 <para>Remove host dns entry from Active Directory.</para>
1394 </refsect3>
1395
1396 <refsect3>
1397 <title>ADS DNS GETHOSTBYNAME &lt;NAMESERVER|HOSTNAME&gt;</title>
1398 <para>Look up the hostname from Active Directory. You can either provide nameserver ie IPv4|IPv6 address or the hostname. Only one should be provided at a time.</para>
1399 </refsect3>
1400
1401 </refsect2>
1402
1403 <refsect2>
1404 <title>ADS LEAVE [--keep-account]</title>
1405
1406 <para>Make the remote host leave the domain it is part of. </para>
1407
1408 </refsect2>
1409
1410 <refsect2>
1411 <title>ADS STATUS</title>
1412
1413 <para>Print out status of machine account of the local machine in ADS.
1414 Prints out quite some debug info. Aimed at developers, regular 
1415 users should use <command>NET ADS TESTJOIN</command>.</para>
1416
1417 </refsect2>
1418
1419 <refsect2>
1420 <title>ADS PRINTER</title>
1421
1422 <refsect3>
1423 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1424
1425 <para>
1426 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the 
1427 server name defaults to the local host.</para>
1428
1429 </refsect3>
1430
1431 <refsect3>
1432 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1433
1434 <para>Publish specified printer using ADS.</para>
1435
1436 </refsect3>
1437
1438 <refsect3>
1439 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1440
1441 <para>Remove specified printer from ADS directory.</para>
1442
1443 </refsect3>
1444
1445 </refsect2>
1446
1447 <refsect2>
1448 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1449
1450 <para>Perform a raw LDAP search on a ADS server and dump the results. The 
1451 expression is a standard LDAP search expression, and the 
1452 attributes are a list of LDAP fields to show in the results.</para>
1453
1454 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1455 </para>
1456
1457 </refsect2>
1458
1459 <refsect2>
1460 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1461
1462 <para>
1463 Perform a raw LDAP search on a ADS server and dump the results. The 
1464 DN standard LDAP DN, and the attributes are a list of LDAP fields 
1465 to show in the result. 
1466 </para>
1467
1468 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1469
1470 </refsect2>
1471
1472 <refsect2>
1473 <title>ADS KEYTAB <replaceable>CREATE</replaceable></title>
1474
1475 <para>
1476 Creates a new keytab file if one doesn't exist with default entries. Default
1477 entries are kerberos principals created from the machinename of the
1478 client, the UPN (if it exists) and any Windows SPN(s) associated with the
1479 computer AD account for the client. If a keytab file already exists then only
1480 missing kerberos principals from the default entries are added. No changes
1481 are made to the computer AD account.
1482 </para>
1483 </refsect2>
1484
1485 <refsect2>
1486 <title>ADS KEYTAB <replaceable>ADD</replaceable> <replaceable>(principal | machine | serviceclass | windows SPN</replaceable></title>
1487
1488 <para>
1489 Adds a new keytab entry, the entry can be either;
1490   <variablelist>
1491     <varlistentry><term>kerberos principal</term>
1492     <listitem><para>
1493       A kerberos principal (identified by the presence of '@') is just
1494       added to the keytab file.
1495     </para></listitem>
1496     </varlistentry>
1497     <varlistentry><term>machinename</term>
1498     <listitem><para>
1499       A machinename (identified by the trailing '$') is used to create a
1500       a kerberos principal 'machinename@realm' which is added to the
1501       keytab file.
1502     </para></listitem>
1503     </varlistentry>
1504     <varlistentry><term>serviceclass</term>
1505     <listitem><para>
1506     A serviceclass (such as 'cifs', 'html' etc.) is used to create a pair
1507     of kerberos principals 'serviceclass/fully_qualified_dns_name@realm' &amp;
1508     'serviceclass/netbios_name@realm' which are added to the keytab file.
1509     </para></listitem>
1510     </varlistentry>
1511     <varlistentry><term>Windows SPN</term>
1512     <listitem><para>
1513     A Windows SPN is of the format 'serviceclass/host:port', it is used to
1514     create a kerberos principal 'serviceclass/host@realm' which will
1515     be written to the keytab file.
1516     </para></listitem>
1517     </varlistentry>
1518   </variablelist>
1519 </para>
1520 <para>
1521 Unlike old versions no computer AD objects are modified by this command. To
1522 preserve the bevhaviour of older clients 'net ads keytab ad_update_ads' is
1523 available.
1524 </para>
1525 </refsect2>
1526
1527 <refsect2>
1528 <title>ADS KEYTAB <replaceable>ADD_UPDATE_ADS</replaceable> <replaceable>(principal | machine | serviceclass | windows SPN</replaceable></title>
1529
1530 <para>
1531 Adds a new keytab entry (see section for net ads keytab add). In addition to
1532 adding entries to the keytab file corrosponding Windows SPNs are created
1533 from the entry passed to this command. These SPN(s) added to the AD computer
1534 account object associated with the client machine running this command for
1535 the following entry types;
1536   <variablelist>
1537     <varlistentry><term>serviceclass</term>
1538     <listitem><para>
1539     A serviceclass (such as 'cifs', 'html' etc.) is used to create a
1540     pair of Windows SPN(s) 'param/full_qualified_dns' &amp;
1541     'param/netbios_name' which are added to the AD computer account object
1542    for this client.
1543     </para></listitem>
1544     </varlistentry>
1545     <varlistentry><term>Windows SPN</term>
1546     <listitem><para>
1547     A Windows SPN is of the format 'serviceclass/host:port', it is
1548     added as passed to the AD computer account object for this client.
1549     </para></listitem>
1550     </varlistentry>
1551   </variablelist>
1552 </para>
1553 </refsect2>
1554
1555 <refsect2>
1556 <title>ADS setspn <replaceable>SETSPN LIST [machine]</replaceable></title>
1557
1558 <para>
1559    Lists the Windows SPNs stored in the 'machine' Windows AD Computer object.
1560    If 'machine' is not specified then computer account for this client is used
1561    instead.
1562 </para>
1563 </refsect2>
1564
1565 <refsect2>
1566 <title>ADS setspn <replaceable>SETSPN ADD SPN [machine]</replaceable></title>
1567
1568 <para>
1569    Adds the specified Windows SPN to the 'machine' Windows AD Computer object.
1570    If 'machine' is not specified then computer account for this client is used
1571    instead.
1572 </para>
1573 </refsect2>
1574
1575
1576 <refsect2>
1577 <title>ADS setspn <replaceable>SETSPN DELETE SPN [machine]</replaceable></title>
1578
1579 <para>
1580    DELETE the specified Window SPN from the 'machine' Windows AD Computer
1581    object. If 'machine' is not specified then computer account for this
1582    client is used
1583    instead.
1584 </para>
1585
1586 </refsect2>
1587
1588 <refsect2>
1589 <title>ADS WORKGROUP</title>
1590
1591 <para>Print out workgroup name for specified kerberos realm.</para>
1592
1593 </refsect2>
1594
1595 <refsect2>
1596         <title>ADS ENCTYPES</title>
1597
1598 <para>
1599         List, modify or delete the value of the "msDS-SupportedEncryptionTypes" attribute of an account in AD.
1600 </para>
1601
1602 <para>
1603         This attribute allows one to control which Kerberos encryption types are used for the generation of initial and service tickets. The value consists of an integer bitmask with the following values:
1604 </para>
1605
1606 <para>0x00000001 DES-CBC-CRC</para>
1607 <para>0x00000002 DES-CBC-MD5</para>
1608 <para>0x00000004 RC4-HMAC</para>
1609 <para>0x00000008 AES128-CTS-HMAC-SHA1-96</para>
1610 <para>0x00000010 AES256-CTS-HMAC-SHA1-96</para>
1611
1612 </refsect2>
1613
1614 <refsect2>
1615         <title>ADS ENCTYPES LIST <replaceable>&lt;ACCOUNTNAME&gt;</replaceable></title>
1616
1617 <para>
1618         List the value of the "msDS-SupportedEncryptionTypes" attribute of a given account.
1619 </para>
1620
1621 <para>Example: <userinput>net ads enctypes list Computername</userinput></para>
1622
1623 </refsect2>
1624
1625 <refsect2>
1626         <title>ADS ENCTYPES SET <replaceable>&lt;ACCOUNTNAME&gt;</replaceable> <replaceable>[enctypes]</replaceable></title>
1627
1628 <para>
1629         Set the value of the "msDS-SupportedEncryptionTypes" attribute of the LDAP object of ACCOUNTNAME to a given value. If the value is omitted, the value is set to 31 which enables all the currently supported encryption types.
1630 </para>
1631
1632 <para>Example: <userinput>net ads enctypes set Computername 24</userinput></para>
1633
1634 </refsect2>
1635
1636 <refsect2>
1637         <title>ADS ENCTYPES DELETE <replaceable>&lt;ACCOUNTNAME&gt;</replaceable></title>
1638
1639 <para>
1640         Deletes the "msDS-SupportedEncryptionTypes" attribute of the LDAP object of ACCOUNTNAME.
1641 </para>
1642
1643 <para>Example: <userinput>net ads enctypes set Computername 24</userinput></para>
1644
1645 </refsect2>
1646
1647
1648 <refsect2>
1649 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
1650
1651 <para>
1652 (Re)Create a BUILTIN group.
1653 Only a wellknown set of BUILTIN groups can be created with this command.
1654 This is the list of currently recognized group names: Administrators,
1655 Users, Guests, Power Users, Account Operators, Server Operators, Print
1656 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1657 compatible Access.
1658
1659 This command requires a running Winbindd with idmap allocation properly
1660 configured. The group gid will be allocated out of the winbindd range.
1661 </para>
1662
1663 </refsect2>
1664
1665 <refsect2>
1666 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
1667
1668 <para>
1669 Create a LOCAL group (also known as Alias).
1670
1671 This command requires a running Winbindd with idmap allocation properly
1672 configured. The group gid will be allocated out of the winbindd range.
1673 </para>
1674
1675 </refsect2>
1676
1677 <refsect2>
1678 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
1679
1680 <para>
1681 Delete an existing LOCAL group (also known as Alias).
1682
1683 </para>
1684
1685 </refsect2>
1686
1687 <refsect2>
1688 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
1689
1690 <para>
1691 Map an existing Unix group and make it a Domain Group, the domain group
1692 will have the same name.
1693 </para>
1694
1695 </refsect2>
1696
1697 <refsect2>
1698 <title>SAM UNMAPUNIXGROUP &lt;NAME&gt;</title>
1699
1700 <para>
1701 Remove an existing group mapping entry.
1702 </para>
1703
1704 </refsect2>
1705
1706 <refsect2>
1707 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1708
1709 <para>
1710 Add a member to a Local group. The group can be specified only by name,
1711 the member can be specified by name or SID.
1712 </para>
1713
1714 </refsect2>
1715
1716 <refsect2>
1717 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1718
1719 <para>
1720 Remove a member from a Local group. The group and the member must be
1721 specified by name.
1722 </para>
1723
1724 </refsect2>
1725
1726 <refsect2>
1727 <title>SAM LISTMEM &lt;GROUP&gt;</title>
1728
1729 <para>
1730 List Local group members. The group must be specified by name.
1731 </para>
1732
1733 </refsect2>
1734
1735 <refsect2>
1736 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
1737
1738 <para>
1739 List the specified set of accounts by name. If verbose is specified,
1740 the rid and description is also provided for each account.
1741 </para>
1742
1743 </refsect2>
1744
1745 <refsect2>
1746 <title>SAM RIGHTS LIST</title>
1747
1748 <para>
1749 List all available privileges.
1750 </para>
1751
1752 </refsect2>
1753
1754 <refsect2>
1755 <title>SAM RIGHTS GRANT &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1756
1757 <para>
1758 Grant one or more privileges to a user.
1759 </para>
1760
1761 </refsect2>
1762
1763 <refsect2>
1764 <title>SAM RIGHTS REVOKE &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1765
1766 <para>
1767 Revoke one or more privileges from a user.
1768 </para>
1769
1770 </refsect2>
1771
1772 <refsect2>
1773 <title>SAM SHOW &lt;NAME&gt;</title>
1774
1775 <para>
1776 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1777 account.
1778 </para>
1779
1780 </refsect2>
1781
1782 <refsect2>
1783 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1784
1785 <para>
1786 Set the home directory for a user account.
1787 </para>
1788
1789 </refsect2>
1790
1791 <refsect2>
1792 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1793
1794 <para>
1795 Set the profile path for a user account.
1796 </para>
1797
1798 </refsect2>
1799
1800 <refsect2>
1801 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1802
1803 <para>
1804 Set the comment for a user or group account.
1805 </para>
1806
1807 </refsect2>
1808
1809 <refsect2>
1810 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1811
1812 <para>
1813 Set the full name for a user account.
1814 </para>
1815
1816 </refsect2>
1817
1818 <refsect2>
1819 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1820
1821 <para>
1822 Set the logon script for a user account.
1823 </para>
1824
1825 </refsect2>
1826
1827 <refsect2>
1828 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1829
1830 <para>
1831 Set the home drive for a user account.
1832 </para>
1833
1834 </refsect2>
1835
1836 <refsect2>
1837 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1838
1839 <para>
1840 Set the workstations a user account is allowed to log in from.
1841 </para>
1842
1843 </refsect2>
1844
1845 <refsect2>
1846 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1847
1848 <para>
1849 Set the "disabled" flag for a user account.
1850 </para>
1851
1852 </refsect2>
1853
1854 <refsect2>
1855 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1856
1857 <para>
1858 Set the "password not required" flag for a user account.
1859 </para>
1860
1861 </refsect2>
1862
1863 <refsect2>
1864 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1865
1866 <para>
1867 Set the "autolock" flag for a user account.
1868 </para>
1869
1870 </refsect2>
1871
1872 <refsect2>
1873 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1874
1875 <para>
1876 Set the "password do not expire" flag for a user account.
1877 </para>
1878
1879 </refsect2>
1880
1881 <refsect2>
1882 <title>SAM SET PWDMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1883
1884 <para>
1885 Set or unset the "password must change" flag for a user account.
1886 </para>
1887
1888 </refsect2>
1889
1890 <refsect2>
1891 <title>SAM POLICY LIST</title>
1892
1893 <para>
1894 List the available account policies.
1895 </para>
1896
1897 </refsect2>
1898
1899 <refsect2>
1900 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1901
1902 <para>
1903 Show the account policy value.
1904 </para>
1905
1906 </refsect2>
1907
1908 <refsect2>
1909 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1910
1911 <para>
1912 Set a value for the account policy.
1913 Valid values can be: "forever", "never", "off", or a number.
1914 </para>
1915
1916 </refsect2>
1917
1918 <refsect2>
1919 <title>SAM PROVISION</title>
1920
1921 <para>
1922 Only available if ldapsam:editposix is set and winbindd is running.
1923 Properly populates the ldap tree with the basic accounts (Administrator)
1924 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1925 </para>
1926
1927 </refsect2>
1928
1929 <refsect2>
1930 <title>IDMAP DUMP &lt;local tdb file name&gt;</title>
1931
1932 <para>
1933 Dumps the mappings contained in the local tdb file specified.
1934 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1935 </para>
1936
1937 </refsect2>
1938
1939 <refsect2>
1940 <title>IDMAP RESTORE [input file]</title>
1941
1942 <para>
1943 Restore the mappings from the specified file or stdin.
1944 </para>
1945
1946 </refsect2>
1947
1948 <refsect2>
1949 <title>IDMAP SET SECRET &lt;DOMAIN&gt; &lt;secret&gt;</title>
1950
1951 <para>
1952 Store a secret for the specified domain, used primarily for domains
1953 that use idmap_ldap as a backend. In this case the secret is used
1954 as the password for the user DN used to bind to the ldap server.
1955 </para>
1956
1957 </refsect2>
1958
1959 <refsect2>
1960 <title>IDMAP SET RANGE &lt;RANGE&gt; &lt;SID&gt; [index] [--db=&lt;DB&gt;]</title>
1961
1962 <para>
1963 Store a domain-range mapping for a given domain (and index) in autorid database.
1964 </para>
1965
1966 </refsect2>
1967
1968 <refsect2>
1969 <title>IDMAP SET CONFIG &lt;config&gt; [--db=&lt;DB&gt;]</title>
1970
1971 <para>
1972 Update CONFIG entry in autorid database.
1973 </para>
1974
1975 </refsect2>
1976
1977 <refsect2>
1978 <title>IDMAP GET RANGE &lt;SID&gt; [index] [--db=&lt;DB&gt;]</title>
1979
1980 <para>
1981 Get the range for a given domain and index from autorid database.
1982 </para>
1983
1984 </refsect2>
1985
1986 <refsect2>
1987 <title>IDMAP GET RANGES [&lt;SID&gt;] [--db=&lt;DB&gt;]</title>
1988
1989 <para>
1990 Get ranges for all domains or for one identified by given SID.
1991 </para>
1992
1993 </refsect2>
1994
1995 <refsect2>
1996 <title>IDMAP GET CONFIG [--db=&lt;DB&gt;]</title>
1997
1998 <para>
1999 Get CONFIG entry from autorid database.
2000 </para>
2001
2002 </refsect2>
2003
2004 <refsect2>
2005
2006 <title>IDMAP DELETE MAPPING [-f] [--db=&lt;DB&gt;] &lt;ID&gt;</title>
2007
2008 <para>
2009 Delete a mapping sid &lt;-&gt; gid or sid &lt;-&gt; uid from the IDMAP database.
2010 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".
2011 Use -f to delete an invalid partial mapping &lt;ID&gt; -&gt; xx
2012 </para>
2013 <para>
2014   Use "smbcontrol all idmap ..." to notify running smbd instances.
2015   See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
2016   <manvolnum>1</manvolnum></citerefentry> manpage for details.
2017 </para>
2018 </refsect2>
2019
2020 <refsect2>
2021 <title>IDMAP DELETE RANGE [-f] [--db=&lt;TDB&gt;] &lt;RANGE&gt;|(&lt;SID&gt; [&lt;INDEX&gt;])</title>
2022
2023 <para>
2024 Delete a domain range mapping identified by 'RANGE' or "domain SID and INDEX" from autorid database.
2025 Use -f to delete invalid mappings.
2026 </para>
2027
2028 </refsect2>
2029
2030 <refsect2>
2031 <title>IDMAP DELETE RANGES [-f] [--db=&lt;TDB&gt;] &lt;SID&gt;</title>
2032
2033 <para>
2034 Delete all domain range mappings for a domain identified by SID.
2035 Use -f to delete invalid mappings.
2036 </para>
2037
2038 </refsect2>
2039
2040 <refsect2>
2041
2042 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=&lt;DB&gt;]</title>
2043
2044 <para>
2045   Check and repair the IDMAP database. If no option is given a read only check
2046   of the database is done. Among others an interactive or automatic repair mode
2047   may be chosen with one of the following options:
2048
2049   <variablelist>
2050     <varlistentry><term>-r|--repair</term>
2051     <listitem><para>
2052       Interactive repair mode, ask a lot of questions.
2053     </para></listitem>
2054     </varlistentry>
2055
2056     <varlistentry><term>-a|--auto</term>
2057     <listitem><para>
2058       Noninteractive repair mode, use default answers.
2059     </para></listitem>
2060     </varlistentry>
2061
2062     <varlistentry><term>-v|--verbose</term>
2063       <listitem><para>
2064         Produce more output.
2065       </para></listitem>
2066     </varlistentry>
2067
2068     <varlistentry><term>-f|--force</term>
2069       <listitem><para>
2070         Try to apply changes, even if they do not apply cleanly.
2071       </para></listitem>
2072     </varlistentry>
2073
2074     <varlistentry><term>-T|--test</term>
2075       <listitem><para>
2076         Dry run, show what changes would be made but don't touch anything.
2077       </para></listitem>
2078     </varlistentry>
2079
2080     <varlistentry><term>-l|--lock</term>
2081       <listitem><para>
2082         Lock the database while doing the check.
2083       </para></listitem>
2084     </varlistentry>
2085
2086     <varlistentry><term>--db &lt;DB&gt;</term>
2087       <listitem><para>
2088         Check the specified database.
2089       </para></listitem>
2090     </varlistentry>
2091     <varlistentry><term></term>
2092       <listitem><para>
2093       </para></listitem>
2094     </varlistentry>
2095   </variablelist>
2096
2097   It reports about the finding of the following errors:
2098
2099   <variablelist>
2100     <varlistentry><term>Missing reverse mapping:</term>
2101     <listitem><para>
2102       A record with mapping A-&gt;B where there is no B-&gt;A. Default action
2103       in repair mode is to "fix" this by adding the reverse mapping.
2104     </para></listitem>
2105     </varlistentry>
2106
2107     <varlistentry><term>Invalid mapping:</term>
2108     <listitem><para>
2109       A record with mapping A-&gt;B where B-&gt;C. Default action
2110       is to "delete" this record.
2111     </para></listitem>
2112   </varlistentry>
2113
2114   <varlistentry><term>Missing or invalid HWM:</term>
2115     <listitem><para>
2116       A high water mark is not at least equal to the largest ID in the
2117       database. Default action is to "fix" this by setting it to the
2118       largest ID found +1.
2119     </para></listitem>
2120   </varlistentry>
2121
2122   <varlistentry><term>Invalid record:</term>
2123     <listitem><para>
2124       Something we failed to parse. Default action is to "edit" it
2125       in interactive and "delete" it in automatic mode.
2126     </para></listitem>
2127   </varlistentry>
2128 </variablelist>
2129 </para>
2130 </refsect2>
2131
2132
2133 <refsect2>
2134 <title>USERSHARE</title>
2135
2136 <para>Starting with version 3.0.23, a Samba server now supports the ability for
2137 non-root users to add user defined shares to be exported using the "net usershare"
2138 commands.
2139 </para>
2140
2141 <para>
2142 To set this up, first set up your smb.conf by adding to the [global] section:
2143
2144 usershare path = /usr/local/samba/lib/usershares
2145
2146 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
2147 set the group owner to the UNIX group who should have the ability to create usershares,
2148 for example a group called "serverops".
2149
2150 Set the permissions on /usr/local/samba/lib/usershares to 01770.
2151
2152 (Owner and group all access, no access for others, plus the sticky bit,
2153 which means that a file in that directory can be renamed or deleted only
2154 by the owner of the file).
2155
2156 Finally, tell smbd how many usershares you will allow by adding to the [global]
2157 section of smb.conf a line such as :
2158
2159 usershare max shares = 100.
2160
2161 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
2162 can create user defined shares on demand using the commands below.
2163 </para>
2164
2165 <para>The usershare commands are:
2166
2167 <simplelist>
2168 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
2169 <member>net usershare delete sharename - to delete a user defined share.</member>
2170 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
2171 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
2172 </simplelist>
2173
2174 </para>
2175
2176 <refsect3>
2177 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
2178
2179 <para>
2180 Add or replace a new user defined share, with name "sharename".
2181 </para>
2182
2183 <para>
2184 "path" specifies the absolute pathname on the system to be exported.
2185 Restrictions may be put on this, see the global smb.conf parameters:
2186 "usershare owner only", "usershare prefix allow list", and
2187 "usershare prefix deny list".
2188 </para>
2189
2190 <para>
2191 The optional "comment" parameter is the comment that will appear
2192 on the share when browsed to by a client.
2193 </para>
2194
2195 <para>The optional "acl" field
2196 specifies which users have read and write access to the entire share.
2197 Note that guest connections are not allowed unless the smb.conf parameter
2198 "usershare allow guests" has been set. The definition of a user
2199 defined share acl is: "user:permission", where user is a valid
2200 username on the system and permission can be "F", "R", or "D".
2201 "F" stands for "full permissions", ie. read and write permissions.
2202 "D" stands for "deny" for a user, ie. prevent this user from accessing
2203 this share.
2204 "R" stands for "read only", ie. only allow read access to this
2205 share (no creation of new files or directories or writing to files).
2206 </para>
2207
2208 <para>
2209 The default if no "acl" is given is "Everyone:R", which means any 
2210 authenticated user has read-only access.
2211 </para>
2212
2213 <para>
2214 The optional "guest_ok" has the same effect as the parameter of the
2215 same name in smb.conf, in that it allows guest access to this user
2216 defined share. This parameter is only allowed if the global parameter
2217 "usershare allow guests" has been set to true in the smb.conf.
2218 </para>
2219
2220 There is no separate command to modify an existing user defined share,
2221 just use the "net usershare add [sharename]" command using the same
2222 sharename as the one you wish to modify and specify the new options
2223 you wish. The Samba smbd daemon notices user defined share modifications
2224 at connect time so will see the change immediately, there is no need
2225 to restart smbd on adding, deleting or changing a user defined share.
2226 </refsect3>
2227
2228 <refsect3>
2229 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
2230
2231 <para>
2232 Deletes the user defined share by name. The Samba smbd daemon
2233 immediately notices this change, although it will not disconnect
2234 any users currently connected to the deleted share.
2235 </para>
2236
2237 </refsect3>
2238
2239 <refsect3>
2240 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
2241
2242 <para>
2243 Get info on user defined shares owned by the current user matching the given pattern, or all users.
2244 </para>
2245
2246 <para>
2247 net usershare info on its own dumps out info on the user defined shares that were
2248 created by the current user, or restricts them to share names that match the given
2249 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
2250 If the '-l' or '--long' option is also given, it prints out info on user defined
2251 shares created by other users.
2252 </para>
2253
2254 <para>
2255 The information given about a share looks like:
2256
2257 [foobar]
2258 path=/home/jeremy
2259 comment=testme
2260 usershare_acl=Everyone:F
2261 guest_ok=n
2262
2263 And is a list of the current settings of the user defined share that can be
2264 modified by the "net usershare add" command.
2265 </para>
2266
2267 </refsect3>
2268
2269 <refsect3>
2270 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
2271
2272 <para>
2273 List all the user defined shares owned by the current user matching the given pattern, or all users.
2274 </para>
2275
2276 <para>
2277 net usershare list on its own list out the names of the user defined shares that were
2278 created by the current user, or restricts the list to share names that match the given
2279 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
2280 If the '-l' or '--long' option is also given, it includes the names of user defined
2281 shares created by other users.
2282 </para>
2283
2284 </refsect3>
2285
2286 </refsect2>
2287
2288 <refsect2>
2289 <title>[RPC] CONF</title>
2290
2291 <para>Starting with version 3.2.0, a Samba server can be configured by data
2292 stored in registry. This configuration data can be edited with the new "net
2293 conf" commands. There is also the possibility to configure a remote Samba server
2294 by enabling the RPC conf mode and specifying the address of the remote server.
2295 </para>
2296
2297 <para>
2298 The deployment of this configuration data can be activated in two levels from the
2299 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
2300 activated by setting <parameter>registry shares</parameter> to
2301 <quote>yes</quote> in the [global] section and global configuration options are
2302 activated by setting <smbconfoption name="include">registry</smbconfoption> in
2303 the [global] section for a mixed configuration or by setting
2304 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
2305 section for a registry-only configuration.
2306 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
2307 <manvolnum>5</manvolnum></citerefentry> manpage for details.
2308 </para>
2309
2310 <para>The conf commands are:
2311 <simplelist>
2312 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
2313 format.</member>
2314 <member>net [rpc] conf import - Import configuration from file in smb.conf
2315 format.</member>
2316 <member>net [rpc] conf listshares - List the registry shares.</member>
2317 <member>net [rpc] conf drop - Delete the complete configuration from
2318 registry.</member>
2319 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
2320 <member>net [rpc] conf addshare - Create a new registry share.</member>
2321 <member>net [rpc] conf delshare - Delete a registry share.</member>
2322 <member>net [rpc] conf setparm - Store a parameter.</member>
2323 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
2324 <member>net [rpc] conf delparm - Delete a parameter.</member>
2325 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
2326 <member>net [rpc] conf setincludes - Set includes for a share.</member>
2327 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
2328 </simplelist>
2329 </para>
2330
2331 <refsect3>
2332 <title>[RPC] CONF LIST</title>
2333
2334 <para>
2335 Print the configuration data stored in the registry in a smb.conf-like format to
2336 standard output.
2337 </para>
2338 </refsect3>
2339
2340 <refsect3>
2341 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
2342
2343 <para>
2344 This command imports configuration from a file in smb.conf format.
2345 If a section encountered in the input file is present in registry,
2346 its contents is replaced. Sections of registry configuration that have
2347 no counterpart in the input file are not affected. If you want to delete these,
2348 you will have to use the "net conf drop" or "net conf delshare" commands.
2349 Optionally, a section may be specified to restrict the effect of the
2350 import command to that specific section. A test mode is enabled by specifying
2351 the parameter "-T" on the commandline. In test mode, no changes are made to the
2352 registry, and the resulting configuration is printed to standard output instead.
2353 </para>
2354 </refsect3>
2355
2356 <refsect3>
2357 <title>[RPC] CONF LISTSHARES</title>
2358
2359 <para>
2360 List the names of the shares defined in registry.
2361 </para>
2362 </refsect3>
2363
2364 <refsect3>
2365 <title>[RPC] CONF DROP</title>
2366
2367 <para>
2368 Delete the complete configuration data from registry.
2369 </para>
2370 </refsect3>
2371
2372 <refsect3>
2373 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
2374
2375 <para>
2376 Show the definition of the share or section specified. It is valid to specify
2377 "global" as sharename to retrieve the global configuration options from
2378 registry.
2379 </para>
2380 </refsect3>
2381
2382 <refsect3>
2383 <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>
2384
2385 <para>Create a new share definition in registry.
2386 The sharename and path have to be given. The share name may
2387 <emphasis>not</emphasis> be "global". Optionally, values for the very
2388 common options "writeable", "guest ok" and a "comment" may be specified.
2389 The same result may be obtained by a sequence of "net conf setparm"
2390 commands.
2391 </para>
2392 </refsect3>
2393
2394 <refsect3>
2395 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
2396
2397 <para>
2398 Delete a share definition from registry.
2399 </para>
2400 </refsect3>
2401
2402 <refsect3>
2403 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
2404
2405 <para>
2406 Store a parameter in registry. The section may be global or a sharename.
2407 The section is created if it does not exist yet.
2408 </para>
2409 </refsect3>
2410
2411 <refsect3>
2412 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2413
2414 <para>
2415 Show a parameter stored in registry.
2416 </para>
2417 </refsect3>
2418
2419 <refsect3>
2420 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2421
2422 <para>
2423 Delete a parameter stored in registry.
2424 </para>
2425 </refsect3>
2426
2427 <refsect3>
2428 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
2429
2430 <para>
2431 Get the list of includes for the provided section (global or share).
2432 </para>
2433
2434 <para>
2435 Note that due to the nature of the registry database and the nature of include directives,
2436 the includes need special treatment: Parameters are stored in registry by the parameter
2437 name as valuename, so there is only ever one instance of a parameter per share.
2438 Also, a specific order like in a text file is not guaranteed. For all real
2439 parameters, this is perfectly ok, but the include directive is rather a meta
2440 parameter, for which, in the smb.conf text file, the place where it is specified
2441 between the other parameters is very important. This can not be achieved by the
2442 simple registry smbconf data model, so there is one ordered list of includes
2443 per share, and this list is evaluated after all the parameters of the share.
2444 </para>
2445
2446 <para>
2447 Further note that currently, only files can be included from registry
2448 configuration. In the future, there will be the ability to include configuration
2449 data from other registry keys.
2450 </para>
2451 </refsect3>
2452
2453 <refsect3>
2454 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
2455
2456 <para>
2457 Set the list of includes for the provided section (global or share) to the given
2458 list of one or more filenames. The filenames may contain the usual smb.conf
2459 macros like %I.
2460 </para>
2461 </refsect3>
2462
2463 <refsect3>
2464 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
2465
2466 <para>
2467 Delete the list of includes from the provided section (global or share).
2468 </para>
2469 </refsect3>
2470
2471 </refsect2>
2472
2473 <refsect2>
2474 <title>REGISTRY</title>
2475 <para>
2476 Manipulate Samba's registry.
2477 </para>
2478
2479 <para>The registry commands are:
2480 <simplelist>
2481 <member>net registry enumerate   - Enumerate registry keys and values.</member>
2482 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
2483 <member>net registry createkey   - Create a new registry key.</member>
2484 <member>net registry deletekey   - Delete a registry key.</member>
2485 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
2486 <member>net registry getvalue    - Print a registry value.</member>
2487 <member>net registry getvalueraw - Print a registry value (raw format).</member>
2488 <member>net registry setvalue    - Set a new registry value.</member>
2489 <member>net registry increment   - Increment a DWORD registry value under a lock.
2490 </member>
2491 <member>net registry deletevalue - Delete a registry value.</member>
2492 <member>net registry getsd       - Get security descriptor.</member>
2493 <member>net registry getsd_sdd1  - Get security descriptor in sddl format.
2494 </member>
2495 <member>net registry setsd_sdd1  - Set security descriptor from sddl format
2496 string.</member>
2497 <member>net registry import      - Import a registration entries (.reg) file.
2498 </member>
2499 <member>net registry export      - Export a registration entries (.reg) file.
2500 </member>
2501 <member>net registry convert     - Convert a registration entries (.reg) file.
2502 </member>
2503 <member>net registry check       - Check and repair a registry database.
2504 </member>
2505 </simplelist>
2506 </para>
2507
2508 <refsect3>
2509   <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
2510   <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
2511   </para>
2512 </refsect3>
2513
2514 <refsect3>
2515   <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
2516   <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
2517   </para>
2518 </refsect3>
2519
2520 <refsect3>
2521   <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
2522   <para>Create a new <emphasis>key</emphasis> if not yet existing.
2523   </para>
2524 </refsect3>
2525
2526 <refsect3>
2527   <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
2528   <para>Delete the given <emphasis>key</emphasis> and its
2529   values from the registry, if it has no subkeys.
2530   </para>
2531 </refsect3>
2532
2533 <refsect3>
2534   <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
2535   <para>Delete the given <emphasis>key</emphasis> and all of its
2536   subkeys and values from the registry.
2537   </para>
2538 </refsect3>
2539
2540 <refsect3>
2541   <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
2542   --><replaceable>name</replaceable></title>
2543
2544   <para>Output type and actual value of the value <emphasis>name</emphasis>
2545   of the given <emphasis>key</emphasis>.
2546   </para>
2547 </refsect3>
2548
2549 <refsect3>
2550   <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
2551   --><replaceable>name</replaceable></title>
2552   <para>Output the actual value of the value <emphasis>name</emphasis>
2553   of the given <emphasis>key</emphasis>.
2554   </para>
2555 </refsect3>
2556
2557 <refsect3>
2558   <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
2559   --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
2560   --><replaceable>value</replaceable> ...<!--
2561   --></title>
2562
2563   <para>Set the value <emphasis>name</emphasis>
2564   of an existing <emphasis>key</emphasis>.
2565   <emphasis>type</emphasis> may be one of
2566   <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
2567   <emphasis>dword</emphasis>.
2568   In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
2569   be given multiple times.
2570   </para>
2571 </refsect3>
2572
2573 <refsect3>
2574   <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
2575   --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
2576   --></title>
2577
2578   <para>Increment the DWORD value <emphasis>name</emphasis>
2579   of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
2580   while holding a g_lock.
2581   <emphasis>inc</emphasis> defaults to 1.
2582   </para>
2583 </refsect3>
2584
2585 <refsect3>
2586   <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
2587   --><replaceable>name</replaceable></title>
2588
2589   <para>Delete the value <emphasis>name</emphasis>
2590   of the given <emphasis>key</emphasis>.
2591   </para>
2592 </refsect3>
2593
2594 <refsect3>
2595   <title>REGISTRY GETSD <replaceable>key</replaceable></title>
2596
2597   <para>Get the security descriptor of the given <emphasis>key</emphasis>.
2598   </para>
2599 </refsect3>
2600
2601 <refsect3>
2602   <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
2603
2604   <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
2605   Security Descriptor Definition Language (SDDL) string.
2606   </para>
2607 </refsect3>
2608
2609 <refsect3>
2610   <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
2611   --><replaceable>sd</replaceable></title>
2612
2613   <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
2614   Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
2615   </para>
2616 </refsect3>
2617
2618 <refsect3>
2619   <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
2620   --><replaceable> [--precheck &lt;check-file&gt;] [opt]</replaceable></title>
2621   <para>Import a registration entries (.reg) <emphasis>file</emphasis>.</para>
2622   <para>The following options are available:</para>
2623   <variablelist>
2624     <varlistentry><term>--precheck <replaceable>check-file</replaceable></term>
2625     <listitem><para>
2626       This is a mechanism to check the existence or non-existence of
2627       certain keys or values specified in a precheck file before applying
2628       the import file.
2629       The import file will only be applied if the precheck succeeds.
2630     </para>
2631     <para>
2632       The check-file follows the normal registry file syntax with the
2633       following semantics:
2634     </para>
2635       <itemizedlist>
2636         <listitem><para>&lt;value name&gt;=&lt;value&gt; checks whether the
2637           value exists and has the given value.</para></listitem>
2638         <listitem><para>&lt;value name&gt;=- checks whether the value does
2639           not exist.</para></listitem>
2640         <listitem><para>[key] checks whether the key exists.</para>
2641         </listitem>
2642         <listitem><para>[-key] checks whether the key does not exist.</para>
2643         </listitem>
2644       </itemizedlist>
2645     </listitem>
2646     </varlistentry>
2647   </variablelist>
2648 </refsect3>
2649
2650 <refsect3>
2651   <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2652   --><replaceable>file</replaceable><!--
2653   --><replaceable>[opt]</replaceable></title>
2654
2655   <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2656   <emphasis>file</emphasis>.
2657   </para>
2658 </refsect3>
2659
2660 <refsect3>
2661   <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2662   --><replaceable>out</replaceable> <!--
2663   --><replaceable>[[inopt] outopt]</replaceable></title>
2664
2665   <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2666   </para>
2667 </refsect3>
2668
2669 <refsect3>
2670   <title>REGISTRY CHECK [-ravTl] [-o &lt;ODB&gt;] [--wipe] [&lt;DB&gt;]</title>
2671   <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
2672
2673   <variablelist>
2674     <varlistentry><term>-r|--repair</term>
2675     <listitem><para>
2676       Interactive repair mode, ask a lot of questions.
2677     </para></listitem>
2678     </varlistentry>
2679
2680     <varlistentry><term>-a|--auto</term>
2681     <listitem><para>
2682       Noninteractive repair mode, use default answers.
2683     </para></listitem>
2684     </varlistentry>
2685
2686     <varlistentry><term>-v|--verbose</term>
2687       <listitem><para>
2688         Produce more output.
2689       </para></listitem>
2690     </varlistentry>
2691
2692     <varlistentry><term>-T|--test</term>
2693       <listitem><para>
2694         Dry run, show what changes would be made but don't touch anything.
2695       </para></listitem>
2696     </varlistentry>
2697
2698     <varlistentry><term>-l|--lock</term>
2699       <listitem><para>
2700         Lock the database while doing the check.
2701       </para></listitem>
2702     </varlistentry>
2703
2704    <varlistentry><term>--reg-version={1,2,3}</term>
2705       <listitem><para>
2706         Specify the format of the registry database. If not given it defaults to
2707         the value of the binary or, if an registry.tdb is explicitly stated at
2708         the commandline, to the value found in the INFO/version record.
2709       </para></listitem>
2710     </varlistentry>
2711
2712     <varlistentry><term>[--db] &lt;DB&gt;</term>
2713       <listitem><para>
2714         Check the specified database.
2715       </para></listitem>
2716     </varlistentry>
2717
2718     <varlistentry><term>-o|--output &lt;ODB&gt;</term>
2719       <listitem><para>
2720         Create a new registry database &lt;ODB&gt; instead of modifying the
2721         input. If &lt;ODB&gt; is already existing --wipe may be used to
2722         overwrite it.
2723       </para></listitem>
2724     </varlistentry>
2725
2726    <varlistentry><term>--wipe</term>
2727       <listitem><para>
2728         Replace the registry database instead of modifying the input or
2729         overwrite an existing output database.
2730       </para></listitem>
2731     </varlistentry>
2732
2733     <varlistentry><term></term>
2734       <listitem><para>
2735       </para></listitem>
2736     </varlistentry>
2737   </variablelist>
2738   </para>
2739 </refsect3>
2740
2741 </refsect2>
2742
2743 <refsect2>
2744 <title>EVENTLOG</title>
2745
2746 <para>Starting with version 3.4.0 net can read, dump, import and export native
2747 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2748 </para>
2749
2750 <para>
2751 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2752 <emphasis>smb.conf</emphasis> file.
2753 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2754 </para>
2755
2756 <para>The eventlog commands are:
2757 <simplelist>
2758 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2759 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2760 tdb based representation of eventlogs.</member>
2761 <member>net eventlog export - Export the samba internal tdb based representation
2762 of eventlogs into an eventlog *.evt file.</member>
2763 </simplelist>
2764 </para>
2765
2766 <refsect3>
2767 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2768
2769 <para>
2770 Prints a eventlog *.evt file to standard output.
2771 </para>
2772 </refsect3>
2773
2774 <refsect3>
2775 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2776
2777 <para>
2778 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2779 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2780 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2781 defined in smb.conf.
2782 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2783 </para>
2784
2785 </refsect3>
2786
2787 <refsect3>
2788 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2789
2790 <para>
2791 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2792 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2793 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2794 defined in smb.conf.
2795 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2796 </para>
2797
2798 </refsect3>
2799
2800 </refsect2>
2801
2802 <refsect2>
2803 <title>DOM</title>
2804
2805 <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.
2806 </para>
2807 <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.
2808 </para>
2809
2810 <para>The client side support for remote join is implemented in the net dom commands which are:
2811 <simplelist>
2812 <member>net dom join - Join a remote computer into a domain.</member>
2813 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2814 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2815 </simplelist>
2816 </para>
2817
2818 <refsect3>
2819 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2820
2821 <para>
2822 Joins a computer into a domain. This command supports the following additional parameters:
2823 </para>
2824
2825 <itemizedlist>
2826
2827 <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>
2828
2829 <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>
2830
2831 <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>
2832
2833 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2834
2835 <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>
2836
2837 </itemizedlist>
2838
2839 <para>
2840 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.
2841 </para>
2842 <para>
2843         Example:
2844         net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2845 </para>
2846 <para>
2847 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.
2848 </para>
2849
2850 </refsect3>
2851
2852 <refsect3>
2853 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2854
2855 <para>
2856 Unjoins a computer from a domain. This command supports the following additional parameters:
2857 </para>
2858
2859 <itemizedlist>
2860
2861 <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>
2862
2863 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2864
2865 <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>
2866
2867 </itemizedlist>
2868
2869 <para>
2870 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.
2871 </para>
2872 <para>
2873         Example:
2874         net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2875 </para>
2876 <para>
2877 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.
2878 </para>
2879
2880 </refsect3>
2881
2882 <refsect3>
2883 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2884
2885 <para>
2886 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2887 </para>
2888
2889 <itemizedlist>
2890
2891 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2892
2893 <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>
2894
2895 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2896
2897 <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>
2898
2899 </itemizedlist>
2900
2901 <para>
2902 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.
2903 </para>
2904 <para>
2905         Example:
2906         net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2907 </para>
2908 <para>
2909 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.
2910 </para>
2911
2912 </refsect3>
2913
2914 </refsect2>
2915
2916 <refsect2>
2917 <title>G_LOCK</title>
2918
2919 <para>Manage global locks.</para>
2920
2921 <refsect3>
2922 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2923
2924 <para>
2925 Execute a shell command under a global lock. This might be useful to define the
2926 order in which several shell commands will be executed. The locking information
2927 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2928 running, the locking information will be available on all cluster nodes.
2929 </para>
2930
2931 <itemizedlist>
2932 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2933 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2934 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2935 </itemizedlist>
2936 </refsect3>
2937
2938 <refsect3>
2939 <title>G_LOCK LOCKS</title>
2940
2941 <para>
2942 Print a list of all currently existing locknames.
2943 </para>
2944 </refsect3>
2945
2946 <refsect3>
2947 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2948
2949 <para>
2950 Dump the locking table of a certain global lock.
2951 </para>
2952 </refsect3>
2953
2954 </refsect2>
2955
2956 <refsect2>
2957         <title>TDB</title>
2958
2959         <para>Print information from tdb records.</para>
2960
2961         <refsect3>
2962                 <title>TDB LOCKING <replaceable>key</replaceable> [DUMP]</title>
2963
2964                 <para>List sharename, filename and number of share modes
2965                 for a record from locking.tdb. With the optional DUMP options,
2966                 dump the complete record.</para>
2967
2968                 <itemizedlist>
2969                         <listitem>
2970                                 <para><replaceable>KEY</replaceable>
2971                                 Key of the tdb record as hex string.</para>
2972                         </listitem>
2973                 </itemizedlist>
2974
2975         </refsect3>
2976 </refsect2>
2977
2978 <refsect2>
2979   <title>vfs</title>
2980   <para>Access shared filesystem through the VFS.</para>
2981
2982   <refsect3>
2983     <title>vfs stream2abouble [--recursive] [--verbose] [--continue] [--follow-symlinks] <replaceable>share</replaceable> <replaceable>path</replaceable></title>
2984
2985     <para>Convert file streams to AppleDouble files.</para>
2986     <itemizedlist>
2987       <listitem>
2988         <para><replaceable>share</replaceable>
2989         A Samba share.</para>
2990       </listitem>
2991     </itemizedlist>
2992     <itemizedlist>
2993       <listitem>
2994         <para><replaceable>path</replaceable> A relative path of something in
2995         the Samba share. "." can be used for the root directory of the
2996         share.</para>
2997       </listitem>
2998     </itemizedlist>
2999
3000     <para>Options:</para>
3001     <variablelist>
3002       <varlistentry>
3003         <term>--recursive</term>
3004         <listitem><para>Traverse a directory hierarchy.</para></listitem>
3005       </varlistentry>
3006       <varlistentry>
3007         <term>--verbose</term>
3008         <listitem><para>Verbose output.</para></listitem>
3009       </varlistentry>
3010       <varlistentry>
3011         <term>--continue</term>
3012         <listitem><para>Continue traversing a directory hierarchy if a single
3013         conversion fails.</para></listitem>
3014       </varlistentry>
3015       <varlistentry>
3016         <term>--follow-symlinks</term>
3017         <listitem><para>Follow symlinks encountered while traversing a
3018         directory.</para></listitem>
3019       </varlistentry>
3020     </variablelist>
3021   </refsect3>
3022
3023   <refsect3>
3024     <title>vfs getntacl <replaceable>share</replaceable> <replaceable>path</replaceable></title>
3025
3026     <para>Display the security descriptor of a file or directory.</para>
3027     <itemizedlist>
3028       <listitem>
3029         <para><replaceable>share</replaceable>
3030         A Samba share.</para>
3031       </listitem>
3032     </itemizedlist>
3033     <itemizedlist>
3034       <listitem>
3035         <para><replaceable>path</replaceable> A relative path of something in
3036         the Samba share. "." can be used for the root directory of the
3037         share.</para>
3038       </listitem>
3039     </itemizedlist>
3040   </refsect3>
3041
3042 </refsect2>
3043
3044 <refsect2>
3045 <title>HELP [COMMAND]</title>
3046
3047 <para>Gives usage information for the specified command.</para>
3048
3049 </refsect2>
3050
3051 </refsect1>
3052
3053 <refsect1>
3054         <title>VERSION</title>
3055
3056         <para>This man page is complete for version 3 of the Samba 
3057         suite.</para>
3058 </refsect1>
3059
3060 <refsect1>
3061         <title>AUTHOR</title>
3062         
3063         <para>The original Samba software and related utilities 
3064         were created by Andrew Tridgell. Samba is now developed
3065         by the Samba Team as an Open Source project similar 
3066         to the way the Linux kernel is developed.</para>
3067
3068         <para>The net manpage was written by Jelmer Vernooij.</para>
3069         
3070 </refsect1>
3071
3072 </refentry>