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