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