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