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