smbd: Fix bug 10284
[Samba.git] / docs-xml / manpages / net.8.xml
blob49cab42e32eacf5448a8d0a29838e259942921a4
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">
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>
14 <refnamediv>
15         <refname>net</refname>
16         <refpurpose>Tool for administration of Samba and remote
17         CIFS servers.
18         </refpurpose>
19 </refnamediv>
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>
47 <refsect1>
48         <title>DESCRIPTION</title>
50         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
51         <manvolnum>7</manvolnum></citerefentry> suite.</para>
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>
62 </refsect1>
64 <refsect1>
65         <title>OPTIONS</title>
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>
79                 <varlistentry>
80                 <term>-W|--myworkgroup workgroup</term>
81                 <listitem><para>
82                 Sets client workgroup or domain
83                 </para></listitem>
84                 </varlistentry>
86                 <varlistentry>
87                 <term>-U|--user user</term>
88                 <listitem><para>
89                 User name to use
90                 </para></listitem>
91                 </varlistentry>
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>
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>
110                 &stdarg.netbios.name;
111                 &stdarg.configfile;
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>
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>
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>
135                 <varlistentry>
136                 <term>-f|--force</term>
137                 <listitem><para>
138                                 Enforcing a net command.
139                 </para></listitem>
140                 </varlistentry>
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>
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>
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>
164                 <varlistentry>
165                 <term>--use-ccache</term>
166                 <listitem><para>
167                 Try to use the credentials cached by winbind.
168                 </para></listitem>
169                 </varlistentry>
171                 <varlistentry>
172                 <term>-i|--stdin</term>
173                 <listitem><para>
174                                 Take input for net commands from standard input.
175                 </para></listitem>
176                 </varlistentry>
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>
186                 <varlistentry>
187                 <term>-T|--test</term>
188                 <listitem><para>Only test command sequence, dry-run.
189                 </para></listitem>
190                 </varlistentry>
192                 <varlistentry>
193                 <term>-F|--flags FLAGS</term>
194                 <listitem><para>Pass down integer flags to a net subcommand.
195                 </para></listitem>
196                 </varlistentry>
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>
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>
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>
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>
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>
228                 <!-- Options for net rpc vampire -->
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>
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>
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>
254                 <!-- Options for net idmap -->
256                 <varlistentry>
257                 <term>--db</term>
258                 <listitem><para>Define dbfile for "net idmap" commands.
259                 </para></listitem>
260                 </varlistentry>
262                 <varlistentry>
263                 <term>--lock</term>
264                 <listitem><para>Activates locking of the dbfile for "net idmap check" command.
265                 </para></listitem>
266                 </varlistentry>
268                 <varlistentry>
269                 <term>-a|--auto</term>
270                 <listitem><para>Activates noninteractive mode in "net idmap check".
271                 </para></listitem>
272                 </varlistentry>
274                 <varlistentry>
275                 <term>--repair</term>
276                 <listitem><para>Activates repair mode in "net idmap check".
277                 </para></listitem>
278                 </varlistentry>
280                 <!-- Options for net rpc share migrate -->
282                 <varlistentry>
283                 <term>--acls</term>
284                 <listitem><para>Includes ACLs to be copied in "net rpc share migrate".
285                 </para></listitem>
286                 </varlistentry>
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>
294                 <varlistentry>
295                 <term>--timestamps</term>
296                 <listitem><para>Includes timestamps to be copied in "net rpc share migrate".
297                 </para></listitem>
298                 </varlistentry>
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>
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>
312                 <!-- Options for net groupmap set -->
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>
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>
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>
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>
342                 <!-- Options for net registry check -->
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>
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>
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>
365                 <!-- Options for net registry import -->
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>
374                 &stdarg.encrypt;
375                 &popt.common.samba.client;
377         </variablelist>
378 </refsect1>
380 <refsect1>
381 <title>COMMANDS</title>
383 <refsect2>
384 <title>CHANGESECRETPW</title>
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>
395 </refsect2>
397 <refsect2>
398         <title>TIME</title>
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>
403 <refsect3>
404 <title>TIME</title>
406 <para>Without any options, the <command>NET TIME</command> command 
407 displays the time on the remote server.
408 </para>
410 </refsect3>
412 <refsect3>
413 <title>TIME SYSTEM</title>
415 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.</para>
417 </refsect3>
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>
424 </refsect3>
426 <refsect3>
427 <title>TIME ZONE</title>
429 <para>Displays the timezone in hours from GMT on the remote computer.</para>
431 </refsect3>
432 </refsect2>
434 <refsect2>
435 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN]
436 [createcomputer=OU] [machinepass=PASS] [osName=string osVer=string] [options]</title>
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>
445 <para>
446 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
447 joining the domain.
448 </para>
450 <para>
451 [UPN] (ADS only) set the principalname attribute during the join.  The default
452 format is host/netbiosname@REALM.
453 </para>
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>
473 <refsect2>
474 <title>[RPC] OLDJOIN [options]</title>
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>
481 <refsect2>
482 <title>[RPC|ADS] USER</title>
484 <refsect3>
485 <title>[RPC|ADS] USER</title>
487 <para>List all users</para>
489 </refsect3>
491 <refsect3>
492 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
494 <para>Delete specified user</para>
496 </refsect3>
498 <refsect3>
499 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
501 <para>List the domain groups of the specified user.</para>
503 </refsect3>
505 <refsect3>
506 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
508 <para>Rename specified user.</para>
510 </refsect3>
512 <refsect3>
513 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
515 <para>Add specified user.</para>
516 </refsect3>
517 </refsect2>
519 <refsect2>
520 <title>[RPC|ADS] GROUP</title>
522 <refsect3>
523 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
524 <para>List user groups.</para>
525 </refsect3>
527 <refsect3>
528 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
530 <para>Delete specified group.</para>
532 </refsect3>
534 <refsect3>
535 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
537 <para>Create specified group.</para>
539 </refsect3>
540 </refsect2>
542 <refsect2>
543 <title>[RAP|RPC] SHARE</title>
545 <refsect3>
546 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
548 <para>Enumerates all exported resources (network shares) on target server.</para>
550 </refsect3>
552 <refsect3>
553 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
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>
559 </refsect3>
561 <refsect3>
562 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
564 <para>Delete specified share.</para>
565 </refsect3>
566 </refsect2>
568 <refsect2>
569 <title>[RPC|RAP] FILE</title>
571 <refsect3>
572 <title>[RPC|RAP] FILE</title>
574 <para>List all open files on remote server.</para>
576 </refsect3>
578 <refsect3>
579 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
581 <para>Close file with specified <replaceable>fileid</replaceable> on 
582 remote server.</para>
584 </refsect3>
586 <refsect3>
587 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
589 <para>
590 Print information on specified <replaceable>fileid</replaceable>. 
591 Currently listed are: file-id, username, locks, path, permissions.
592 </para>
594 </refsect3>
596 <refsect3>
597 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
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>
605 </refsect3>
607 </refsect2>
609 <refsect2>
610 <title>SESSION</title>
612 <refsect3>
613 <title>RAP SESSION</title>
615 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
616 sessions on the target server.</para>
618 </refsect3>
620 <refsect3>
621 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
623 <para>Close the specified sessions.</para>
625 </refsect3>
627 <refsect3>
628 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
630 <para>Give a list with all the open files in specified session.</para>
632 </refsect3>
634 </refsect2>
636 <refsect2>
637 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
639 <para>List all servers in specified domain or workgroup. Defaults
640 to local domain.</para>
642 </refsect2>
644 <refsect2>
645 <title>RAP DOMAIN</title>
647 <para>Lists all domains and workgroups visible on the 
648 current network.</para>
650 </refsect2>
652 <refsect2>
653 <title>RAP PRINTQ</title>
655 <refsect3>
656 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
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>
662 </refsect3>
664 <refsect3>
665 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
667 <para>Delete job with specified id.</para>
669 </refsect3>
671 </refsect2>
673 <refsect2>
674 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
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>
682 &not.implemented;
684 </refsect2>
686 <refsect2>
687 <title>RAP GROUPMEMBER</title>
689 <refsect3>
690 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
692 <para>List all members of the specified group.</para>
694 </refsect3>
696 <refsect3>
697 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
699 <para>Delete member from group.</para>
701 </refsect3>
703 <refsect3>
704 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
706 <para>Add member to group.</para>
708 </refsect3>
710 </refsect2>
712 <refsect2>
713 <title>RAP ADMIN <replaceable>command</replaceable></title>
715 <para>Execute the specified <replaceable>command</replaceable> on 
716 the remote server. Only works with OS/2 servers.
717 </para>
719 &not.implemented;
721 </refsect2>
723 <refsect2>
724 <title>RAP SERVICE</title>
726 <refsect3>
727 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
729 <para>Start the specified service on the remote server. Not implemented yet.</para>
731 &not.implemented;
733 </refsect3>
735 <refsect3>
736 <title>RAP SERVICE STOP</title>
738 <para>Stop the specified service on the remote server.</para>
740 &not.implemented;
742 </refsect3>
744 </refsect2>
746 <refsect2>
747 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
749 <para>
750 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
751 </para>
753 </refsect2>
755 <refsect2>
756 <title>LOOKUP</title>
758 <refsect3>
759 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
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>
766 </refsect3>
768 <refsect3>
769 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
771 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
773 </refsect3>
775 <refsect3>
776 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
778 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
779 Defaults to local realm.</para>
781 </refsect3>
783 <refsect3>
784 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
786 <para>Give IP's of Domain Controllers for specified <replaceable>
787 DOMAIN</replaceable>. Defaults to local domain.</para>
789 </refsect3>
791 <refsect3>
792 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
794 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
795 or workgroup. Defaults to local domain.</para>
797 </refsect3>
799 </refsect2>
801 <refsect2>
802 <title>CACHE</title>
804 <para>Samba uses a general caching interface called 'gencache'. It 
805 can be controlled using 'NET CACHE'.</para>
807 <para>All the timeout parameters support the suffixes:
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>
817 </para>
819 <refsect3>
820 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
822 <para>Add specified key+data to the cache with the given timeout.</para>
824 </refsect3>
826 <refsect3>
827 <title>CACHE DEL <replaceable>key</replaceable></title>
829 <para>Delete key from the cache.</para>
831 </refsect3>
833 <refsect3>
834 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
836 <para>Update data of existing cache entry.</para>
838 </refsect3>
840 <refsect3>
841 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
843 <para>Search for the specified pattern in the cache data.</para>
845 </refsect3>
847 <refsect3>
848 <title>CACHE LIST</title>
850 <para>
851 List all current items in the cache.
852 </para>
854 </refsect3>
856 <refsect3>
857 <title>CACHE FLUSH</title>
859 <para>Remove all the current items from the cache.</para>
861 </refsect3>
863 </refsect2>
865 <refsect2>
866 <title>GETLOCALSID [DOMAIN]</title>
868 <para>Prints the SID of the specified domain, or if the parameter is
869 omitted, the SID of the local server.</para>
871 </refsect2>
873 <refsect2>
874 <title>SETLOCALSID S-1-5-21-x-y-z</title>
876 <para>Sets SID for the local server to the specified SID.</para>
878 </refsect2>
880 <refsect2>
881 <title>GETDOMAINSID</title>
883 <para>Prints the local machine SID and the SID of the current 
884 domain.</para>
886 </refsect2>
888 <refsect2>
889 <title>SETDOMAINSID</title>
891 <para>Sets the SID of the current domain.</para>
893 </refsect2>
895 <refsect2>
896 <title>GROUPMAP</title>
898 <para>Manage the mappings between Windows group SIDs and UNIX groups.
899 Common options include:</para>
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>
912 <refsect3>
913 <title>GROUPMAP ADD</title>
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>
923 </refsect3>
925 <refsect3>
926 <title>GROUPMAP DELETE</title>
928 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
930 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
932 </refsect3>
934 <refsect3>
935 <title>GROUPMAP MODIFY</title>
937 <para>Update an existing group entry.</para>
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>
947 <refsect3>
948 <title>GROUPMAP LIST</title>
950 <para>List existing group mapping entries.</para>
952 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
954 </refsect3>
955 </refsect2>
959 <refsect2>
960 <title>MAXRID</title>
962 <para>Prints out the highest RID currently in use on the local
963 server (by the active 'passdb backend').
964 </para>
966 </refsect2>
968 <refsect2>
969 <title>RPC INFO</title>
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>
975 </refsect2>
977 <refsect2>
978 <title>[RPC|ADS] TESTJOIN</title>
980 <para>Check whether participation in a domain is still valid.</para>
982 </refsect2>
984 <refsect2>
985 <title>[RPC|ADS] CHANGETRUSTPW</title>
987 <para>Force change of domain trust password.</para>
989 </refsect2>
991 <refsect2>
992 <title>RPC TRUSTDOM</title>
994 <refsect3>
995 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
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>
1008 </refsect3>
1010 <refsect3>
1011 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
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>
1018 </refsect3>
1020 <refsect3>
1021 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
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>
1033 </refsect3>
1035 <refsect3>
1036 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
1037 <para>Abandon relationship to trusted domain</para>
1039 </refsect3>
1041 <refsect3>
1042 <title>RPC TRUSTDOM LIST</title>
1044 <para>List all interdomain trust relationships.</para>
1046 </refsect3>
1047 </refsect2>
1049 <refsect2>
1050 <title>RPC TRUST</title>
1052 <refsect3>
1053 <title>RPC TRUST CREATE</title>
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>
1059 <variablelist><title>Options:</title>
1060 <varlistentry>
1061 <term>otherserver</term>
1062 <listitem><para>Domain controller of the second domain</para></listitem>
1063 </varlistentry>
1065 <varlistentry>
1066 <term>otheruser</term>
1067 <listitem><para>Admin user in the second domain</para></listitem>
1068 </varlistentry>
1070 <varlistentry>
1071 <term>otherdomainsid</term>
1072 <listitem><para>SID of the second domain</para></listitem>
1073 </varlistentry>
1075 <varlistentry>
1076 <term>other_netbios_domain</term>
1077 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
1078 </varlistentry>
1080 <varlistentry>
1081 <term>otherdomain</term>
1082 <listitem><para>DNS (full) name of the second domain</para></listitem>
1083 </varlistentry>
1085 <varlistentry>
1086 <term>trustpw</term>
1087 <listitem><para>Trust password</para></listitem>
1088 </varlistentry>
1089 </variablelist>
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>
1115 <refsect3>
1116 <title>RPC TRUST DELETE</title>
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>
1121 <variablelist><title>Options:</title>
1122 <varlistentry>
1123 <term>otherserver</term>
1124 <listitem><para>Domain controller of the second domain</para></listitem>
1125 </varlistentry>
1127 <varlistentry>
1128 <term>otheruser</term>
1129 <listitem><para>Admin user in the second domain</para></listitem>
1130 </varlistentry>
1132 <varlistentry>
1133 <term>otherdomainsid</term>
1134 <listitem><para>SID of the second domain</para></listitem>
1135 </varlistentry>
1136 </variablelist>
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>
1159 </refsect2>
1161 <refsect2>
1162 <refsect3>
1163 <title>RPC RIGHTS</title>
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>
1171 </refsect3>
1174 </refsect2>
1176 <refsect2>
1177 <title>RPC ABORTSHUTDOWN</title>
1179 <para>Abort the shutdown of a remote server.</para>
1181 </refsect2>
1183 <refsect2>
1184 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
1186 <para>Shut down the remote server.</para>
1188 <variablelist>
1189 <varlistentry>
1190 <term>-r</term>
1191 <listitem><para>
1192 Reboot after shutdown.
1193 </para></listitem>
1194 </varlistentry>
1196 <varlistentry>
1197 <term>-f</term>
1198 <listitem><para>
1199 Force shutting down all applications.
1200 </para></listitem>
1201 </varlistentry>
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>
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>
1218 </refsect2>
1220 <refsect2>
1221 <title>RPC SAMDUMP</title>
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>
1227 <refsect2>
1228 <title>RPC VAMPIRE</title>
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 </para>
1233 </refsect2>
1235 <refsect2>
1236 <title>RPC VAMPIRE KEYTAB</title>
1238 <para>Dump remote SAM database to local Kerberos keytab file.
1239 </para>
1240 </refsect2>
1242 <refsect2>
1243 <title>RPC VAMPIRE LDIF</title>
1245 <para>Dump remote SAM database to local LDIF file or standard output.
1246 </para>
1247 </refsect2>
1249 <refsect2>
1250 <title>RPC GETSID</title>
1252 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename> (or <filename>secrets.ntdb</filename>). </para>
1254 </refsect2>
1256 <refsect2>
1257 <title>ADS LEAVE</title>
1259 <para>Make the remote host leave the domain it is part of. </para>
1261 </refsect2>
1263 <refsect2>
1264 <title>ADS STATUS</title>
1266 <para>Print out status of machine account of the local machine in ADS.
1267 Prints out quite some debug info. Aimed at developers, regular 
1268 users should use <command>NET ADS TESTJOIN</command>.</para>
1270 </refsect2>
1272 <refsect2>
1273 <title>ADS PRINTER</title>
1275 <refsect3>
1276 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1278 <para>
1279 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the 
1280 server name defaults to the local host.</para>
1282 </refsect3>
1284 <refsect3>
1285 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1287 <para>Publish specified printer using ADS.</para>
1289 </refsect3>
1291 <refsect3>
1292 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1294 <para>Remove specified printer from ADS directory.</para>
1296 </refsect3>
1298 </refsect2>
1300 <refsect2>
1301 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1303 <para>Perform a raw LDAP search on a ADS server and dump the results. The 
1304 expression is a standard LDAP search expression, and the 
1305 attributes are a list of LDAP fields to show in the results.</para>
1307 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1308 </para>
1310 </refsect2>
1312 <refsect2>
1313 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1315 <para>
1316 Perform a raw LDAP search on a ADS server and dump the results. The 
1317 DN standard LDAP DN, and the attributes are a list of LDAP fields 
1318 to show in the result. 
1319 </para>
1321 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1323 </refsect2>
1325 <refsect2>
1326 <title>ADS WORKGROUP</title>
1328 <para>Print out workgroup name for specified kerberos realm.</para>
1330 </refsect2>
1332 <refsect2>
1333 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
1335 <para>
1336 (Re)Create a BUILTIN group.
1337 Only a wellknown set of BUILTIN groups can be created with this command.
1338 This is the list of currently recognized group names: Administrators,
1339 Users, Guests, Power Users, Account Operators, Server Operators, Print
1340 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1341 compatible Access.
1343 This command requires a running Winbindd with idmap allocation properly
1344 configured. The group gid will be allocated out of the winbindd range.
1345 </para>
1347 </refsect2>
1349 <refsect2>
1350 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
1352 <para>
1353 Create a LOCAL group (also known as Alias).
1355 This command requires a running Winbindd with idmap allocation properly
1356 configured. The group gid will be allocated out of the winbindd range.
1357 </para>
1359 </refsect2>
1361 <refsect2>
1362 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
1364 <para>
1365 Delete an existing LOCAL group (also known as Alias).
1367 </para>
1369 </refsect2>
1371 <refsect2>
1372 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
1374 <para>
1375 Map an existing Unix group and make it a Domain Group, the domain group
1376 will have the same name.
1377 </para>
1379 </refsect2>
1381 <refsect2>
1382 <title>SAM UNMAPUNIXGROUP &lt;NAME&gt;</title>
1384 <para>
1385 Remove an existing group mapping entry.
1386 </para>
1388 </refsect2>
1390 <refsect2>
1391 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1393 <para>
1394 Add a member to a Local group. The group can be specified only by name,
1395 the member can be specified by name or SID.
1396 </para>
1398 </refsect2>
1400 <refsect2>
1401 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1403 <para>
1404 Remove a member from a Local group. The group and the member must be
1405 specified by name.
1406 </para>
1408 </refsect2>
1410 <refsect2>
1411 <title>SAM LISTMEM &lt;GROUP&gt;</title>
1413 <para>
1414 List Local group members. The group must be specified by name.
1415 </para>
1417 </refsect2>
1419 <refsect2>
1420 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
1422 <para>
1423 List the specified set of accounts by name. If verbose is specified,
1424 the rid and description is also provided for each account.
1425 </para>
1427 </refsect2>
1429 <refsect2>
1430 <title>SAM RIGHTS LIST</title>
1432 <para>
1433 List all available privileges.
1434 </para>
1436 </refsect2>
1438 <refsect2>
1439 <title>SAM RIGHTS GRANT &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1441 <para>
1442 Grant one or more privileges to a user.
1443 </para>
1445 </refsect2>
1447 <refsect2>
1448 <title>SAM RIGHTS REVOKE &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1450 <para>
1451 Revoke one or more privileges from a user.
1452 </para>
1454 </refsect2>
1456 <refsect2>
1457 <title>SAM SHOW &lt;NAME&gt;</title>
1459 <para>
1460 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1461 account.
1462 </para>
1464 </refsect2>
1466 <refsect2>
1467 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1469 <para>
1470 Set the home directory for a user account.
1471 </para>
1473 </refsect2>
1475 <refsect2>
1476 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1478 <para>
1479 Set the profile path for a user account.
1480 </para>
1482 </refsect2>
1484 <refsect2>
1485 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1487 <para>
1488 Set the comment for a user or group account.
1489 </para>
1491 </refsect2>
1493 <refsect2>
1494 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1496 <para>
1497 Set the full name for a user account.
1498 </para>
1500 </refsect2>
1502 <refsect2>
1503 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1505 <para>
1506 Set the logon script for a user account.
1507 </para>
1509 </refsect2>
1511 <refsect2>
1512 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1514 <para>
1515 Set the home drive for a user account.
1516 </para>
1518 </refsect2>
1520 <refsect2>
1521 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1523 <para>
1524 Set the workstations a user account is allowed to log in from.
1525 </para>
1527 </refsect2>
1529 <refsect2>
1530 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1532 <para>
1533 Set the "disabled" flag for a user account.
1534 </para>
1536 </refsect2>
1538 <refsect2>
1539 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1541 <para>
1542 Set the "password not required" flag for a user account.
1543 </para>
1545 </refsect2>
1547 <refsect2>
1548 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1550 <para>
1551 Set the "autolock" flag for a user account.
1552 </para>
1554 </refsect2>
1556 <refsect2>
1557 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1559 <para>
1560 Set the "password do not expire" flag for a user account.
1561 </para>
1563 </refsect2>
1565 <refsect2>
1566 <title>SAM SET PWDMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1568 <para>
1569 Set or unset the "password must change" flag for a user account.
1570 </para>
1572 </refsect2>
1574 <refsect2>
1575 <title>SAM POLICY LIST</title>
1577 <para>
1578 List the available account policies.
1579 </para>
1581 </refsect2>
1583 <refsect2>
1584 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1586 <para>
1587 Show the account policy value.
1588 </para>
1590 </refsect2>
1592 <refsect2>
1593 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1595 <para>
1596 Set a value for the account policy.
1597 Valid values can be: "forever", "never", "off", or a number.
1598 </para>
1600 </refsect2>
1602 <refsect2>
1603 <title>SAM PROVISION</title>
1605 <para>
1606 Only available if ldapsam:editposix is set and winbindd is running.
1607 Properly populates the ldap tree with the basic accounts (Administrator)
1608 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1609 </para>
1611 </refsect2>
1613 <refsect2>
1614 <title>IDMAP DUMP &lt;local tdb file name&gt;</title>
1616 <para>
1617 Dumps the mappings contained in the local tdb file specified.
1618 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1619 </para>
1621 </refsect2>
1623 <refsect2>
1624 <title>IDMAP RESTORE [input file]</title>
1626 <para>
1627 Restore the mappings from the specified file or stdin.
1628 </para>
1630 </refsect2>
1632 <refsect2>
1633 <title>IDMAP SET SECRET &lt;DOMAIN&gt; &lt;secret&gt;</title>
1635 <para>
1636 Store a secret for the specified domain, used primarily for domains
1637 that use idmap_ldap as a backend. In this case the secret is used
1638 as the password for the user DN used to bind to the ldap server.
1639 </para>
1641 </refsect2>
1643 <refsect2>
1644 <title>IDMAP SET RANGE &lt;RANGE&gt; &lt;SID&gt; [index] [--db=&lt;DB&gt;]</title>
1646 <para>
1647 Store a domain-range mapping for a given domain (and index) in autorid database.
1648 </para>
1650 </refsect2>
1652 <refsect2>
1653 <title>IDMAP SET CONFIG &lt;config&gt; [--db=&lt;DB&gt;]</title>
1655 <para>
1656 Update CONFIG entry in autorid database.
1657 </para>
1659 </refsect2>
1661 <refsect2>
1662 <title>IDMAP GET RANGE &lt;SID&gt; [index] [--db=&lt;DB&gt;]</title>
1664 <para>
1665 Get the range for a given domain and index from autorid database.
1666 </para>
1668 </refsect2>
1670 <refsect2>
1671 <title>IDMAP GET RANGES [&lt;SID&gt;] [--db=&lt;DB&gt;]</title>
1673 <para>
1674 Get ranges for all domains or for one identified by given SID.
1675 </para>
1677 </refsect2>
1679 <refsect2>
1680 <title>IDMAP GET CONFIG [--db=&lt;DB&gt;]</title>
1682 <para>
1683 Get CONFIG entry from autorid database.
1684 </para>
1686 </refsect2>
1688 <refsect2>
1690 <title>IDMAP DELETE MAPPING [-f] [--db=&lt;DB&gt;] &lt;ID&gt;</title>
1692 <para>
1693 Delete a mapping sid &lt;-&gt; gid or sid &lt;-&gt; uid from the IDMAP database.
1694 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".
1695 Use -f to delete an invalid partial mapping &lt;ID&gt; -&gt; xx
1696 </para>
1697 <para>
1698   Use "smbcontrol all idmap ..." to notify running smbd instances.
1699   See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
1700   <manvolnum>1</manvolnum></citerefentry> manpage for details.
1701 </para>
1702 </refsect2>
1704 <refsect2>
1705 <title>IDMAP DELETE RANGE [-f] [--db=&lt;TDB&gt;] &lt;RANGE&gt;|(&lt;SID&gt; [&lt;INDEX&gt;])</title>
1707 <para>
1708 Delete a domain range mapping identified by 'RANGE' or "domain SID and INDEX" from autorid database.
1709 Use -f to delete invalid mappings.
1710 </para>
1712 </refsect2>
1714 <refsect2>
1715 <title>IDMAP DELETE RANGES [-f] [--db=&lt;TDB&gt;] &lt;SID&gt;</title>
1717 <para>
1718 Delete all domain range mappings for a domain identified by SID.
1719 Use -f to delete invalid mappings.
1720 </para>
1722 </refsect2>
1724 <refsect2>
1726 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=&lt;DB&gt;]</title>
1728 <para>
1729   Check and repair the IDMAP database. If no option is given a read only check
1730   of the database is done. Among others an interactive or automatic repair mode
1731   may be chosen with one of the following options:
1733   <variablelist>
1734     <varlistentry><term>-r|--repair</term>
1735     <listitem><para>
1736       Interactive repair mode, ask a lot of questions.
1737     </para></listitem>
1738     </varlistentry>
1740     <varlistentry><term>-a|--auto</term>
1741     <listitem><para>
1742       Noninteractive repair mode, use default answers.
1743     </para></listitem>
1744     </varlistentry>
1746     <varlistentry><term>-v|--verbose</term>
1747       <listitem><para>
1748         Produce more output.
1749       </para></listitem>
1750     </varlistentry>
1752     <varlistentry><term>-f|--force</term>
1753       <listitem><para>
1754         Try to apply changes, even if they do not apply cleanly.
1755       </para></listitem>
1756     </varlistentry>
1758     <varlistentry><term>-T|--test</term>
1759       <listitem><para>
1760         Dry run, show what changes would be made but don't touch anything.
1761       </para></listitem>
1762     </varlistentry>
1764     <varlistentry><term>-l|--lock</term>
1765       <listitem><para>
1766         Lock the database while doing the check.
1767       </para></listitem>
1768     </varlistentry>
1770     <varlistentry><term>--db &lt;DB&gt;</term>
1771       <listitem><para>
1772         Check the specified database.
1773       </para></listitem>
1774     </varlistentry>
1775     <varlistentry><term></term>
1776       <listitem><para>
1777       </para></listitem>
1778     </varlistentry>
1779   </variablelist>
1781   It reports about the finding of the following errors:
1783   <variablelist>
1784     <varlistentry><term>Missing reverse mapping:</term>
1785     <listitem><para>
1786       A record with mapping A-&gt;B where there is no B-&gt;A. Default action
1787       in repair mode is to "fix" this by adding the reverse mapping.
1788     </para></listitem>
1789     </varlistentry>
1791     <varlistentry><term>Invalid mapping:</term>
1792     <listitem><para>
1793       A record with mapping A-&gt;B where B-&gt;C. Default action
1794       is to "delete" this record.
1795     </para></listitem>
1796   </varlistentry>
1798   <varlistentry><term>Missing or invalid HWM:</term>
1799     <listitem><para>
1800       A high water mark is not at least equal to the largest ID in the
1801       database. Default action is to "fix" this by setting it to the
1802       largest ID found +1.
1803     </para></listitem>
1804   </varlistentry>
1806   <varlistentry><term>Invalid record:</term>
1807     <listitem><para>
1808       Something we failed to parse. Default action is to "edit" it
1809       in interactive and "delete" it in automatic mode.
1810     </para></listitem>
1811   </varlistentry>
1812 </variablelist>
1813 </para>
1814 </refsect2>
1817 <refsect2>
1818 <title>USERSHARE</title>
1820 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1821 non-root users to add user defined shares to be exported using the "net usershare"
1822 commands.
1823 </para>
1825 <para>
1826 To set this up, first set up your smb.conf by adding to the [global] section:
1828 usershare path = /usr/local/samba/lib/usershares
1830 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1831 set the group owner to the UNIX group who should have the ability to create usershares,
1832 for example a group called "serverops".
1834 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1836 (Owner and group all access, no access for others, plus the sticky bit,
1837 which means that a file in that directory can be renamed or deleted only
1838 by the owner of the file).
1840 Finally, tell smbd how many usershares you will allow by adding to the [global]
1841 section of smb.conf a line such as :
1843 usershare max shares = 100.
1845 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1846 can create user defined shares on demand using the commands below.
1847 </para>
1849 <para>The usershare commands are:
1851 <simplelist>
1852 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
1853 <member>net usershare delete sharename - to delete a user defined share.</member>
1854 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1855 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1856 </simplelist>
1858 </para>
1860 <refsect3>
1861 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1863 <para>
1864 Add or replace a new user defined share, with name "sharename".
1865 </para>
1867 <para>
1868 "path" specifies the absolute pathname on the system to be exported.
1869 Restrictions may be put on this, see the global smb.conf parameters:
1870 "usershare owner only", "usershare prefix allow list", and
1871 "usershare prefix deny list".
1872 </para>
1874 <para>
1875 The optional "comment" parameter is the comment that will appear
1876 on the share when browsed to by a client.
1877 </para>
1879 <para>The optional "acl" field
1880 specifies which users have read and write access to the entire share.
1881 Note that guest connections are not allowed unless the smb.conf parameter
1882 "usershare allow guests" has been set. The definition of a user
1883 defined share acl is: "user:permission", where user is a valid
1884 username on the system and permission can be "F", "R", or "D".
1885 "F" stands for "full permissions", ie. read and write permissions.
1886 "D" stands for "deny" for a user, ie. prevent this user from accessing
1887 this share.
1888 "R" stands for "read only", ie. only allow read access to this
1889 share (no creation of new files or directories or writing to files).
1890 </para>
1892 <para>
1893 The default if no "acl" is given is "Everyone:R", which means any 
1894 authenticated user has read-only access.
1895 </para>
1897 <para>
1898 The optional "guest_ok" has the same effect as the parameter of the
1899 same name in smb.conf, in that it allows guest access to this user
1900 defined share. This parameter is only allowed if the global parameter
1901 "usershare allow guests" has been set to true in the smb.conf.
1902 </para>
1904 There is no separate command to modify an existing user defined share,
1905 just use the "net usershare add [sharename]" command using the same
1906 sharename as the one you wish to modify and specify the new options
1907 you wish. The Samba smbd daemon notices user defined share modifications
1908 at connect time so will see the change immediately, there is no need
1909 to restart smbd on adding, deleting or changing a user defined share.
1910 </refsect3>
1912 <refsect3>
1913 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1915 <para>
1916 Deletes the user defined share by name. The Samba smbd daemon
1917 immediately notices this change, although it will not disconnect
1918 any users currently connected to the deleted share.
1919 </para>
1921 </refsect3>
1923 <refsect3>
1924 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1926 <para>
1927 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1928 </para>
1930 <para>
1931 net usershare info on its own dumps out info on the user defined shares that were
1932 created by the current user, or restricts them to share names that match the given
1933 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1934 If the '-l' or '--long' option is also given, it prints out info on user defined
1935 shares created by other users.
1936 </para>
1938 <para>
1939 The information given about a share looks like:
1941 [foobar]
1942 path=/home/jeremy
1943 comment=testme
1944 usershare_acl=Everyone:F
1945 guest_ok=n
1947 And is a list of the current settings of the user defined share that can be
1948 modified by the "net usershare add" command.
1949 </para>
1951 </refsect3>
1953 <refsect3>
1954 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1956 <para>
1957 List all the user defined shares owned by the current user matching the given pattern, or all users.
1958 </para>
1960 <para>
1961 net usershare list on its own list out the names of the user defined shares that were
1962 created by the current user, or restricts the list to share names that match the given
1963 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1964 If the '-l' or '--long' option is also given, it includes the names of user defined
1965 shares created by other users.
1966 </para>
1968 </refsect3>
1970 </refsect2>
1972 <refsect2>
1973 <title>[RPC] CONF</title>
1975 <para>Starting with version 3.2.0, a Samba server can be configured by data
1976 stored in registry. This configuration data can be edited with the new "net
1977 conf" commands. There is also the possibility to configure a remote Samba server
1978 by enabling the RPC conf mode and specifying the address of the remote server.
1979 </para>
1981 <para>
1982 The deployment of this configuration data can be activated in two levels from the
1983 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
1984 activated by setting <parameter>registry shares</parameter> to
1985 <quote>yes</quote> in the [global] section and global configuration options are
1986 activated by setting <smbconfoption name="include">registry</smbconfoption> in
1987 the [global] section for a mixed configuration or by setting
1988 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
1989 section for a registry-only configuration.
1990 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
1991 <manvolnum>5</manvolnum></citerefentry> manpage for details.
1992 </para>
1994 <para>The conf commands are:
1995 <simplelist>
1996 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
1997 format.</member>
1998 <member>net [rpc] conf import - Import configuration from file in smb.conf
1999 format.</member>
2000 <member>net [rpc] conf listshares - List the registry shares.</member>
2001 <member>net [rpc] conf drop - Delete the complete configuration from
2002 registry.</member>
2003 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
2004 <member>net [rpc] conf addshare - Create a new registry share.</member>
2005 <member>net [rpc] conf delshare - Delete a registry share.</member>
2006 <member>net [rpc] conf setparm - Store a parameter.</member>
2007 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
2008 <member>net [rpc] conf delparm - Delete a parameter.</member>
2009 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
2010 <member>net [rpc] conf setincludes - Set includes for a share.</member>
2011 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
2012 </simplelist>
2013 </para>
2015 <refsect3>
2016 <title>[RPC] CONF LIST</title>
2018 <para>
2019 Print the configuration data stored in the registry in a smb.conf-like format to
2020 standard output.
2021 </para>
2022 </refsect3>
2024 <refsect3>
2025 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
2027 <para>
2028 This command imports configuration from a file in smb.conf format.
2029 If a section encountered in the input file is present in registry,
2030 its contents is replaced. Sections of registry configuration that have
2031 no counterpart in the input file are not affected. If you want to delete these,
2032 you will have to use the "net conf drop" or "net conf delshare" commands.
2033 Optionally, a section may be specified to restrict the effect of the
2034 import command to that specific section. A test mode is enabled by specifying
2035 the parameter "-T" on the commandline. In test mode, no changes are made to the
2036 registry, and the resulting configuration is printed to standard output instead.
2037 </para>
2038 </refsect3>
2040 <refsect3>
2041 <title>[RPC] CONF LISTSHARES</title>
2043 <para>
2044 List the names of the shares defined in registry.
2045 </para>
2046 </refsect3>
2048 <refsect3>
2049 <title>[RPC] CONF DROP</title>
2051 <para>
2052 Delete the complete configuration data from registry.
2053 </para>
2054 </refsect3>
2056 <refsect3>
2057 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
2059 <para>
2060 Show the definition of the share or section specified. It is valid to specify
2061 "global" as sharename to retrieve the global configuration options from
2062 registry.
2063 </para>
2064 </refsect3>
2066 <refsect3>
2067 <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>
2069 <para>Create a new share definition in registry.
2070 The sharename and path have to be given. The share name may
2071 <emphasis>not</emphasis> be "global". Optionally, values for the very
2072 common options "writeable", "guest ok" and a "comment" may be specified.
2073 The same result may be obtained by a sequence of "net conf setparm"
2074 commands.
2075 </para>
2076 </refsect3>
2078 <refsect3>
2079 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
2081 <para>
2082 Delete a share definition from registry.
2083 </para>
2084 </refsect3>
2086 <refsect3>
2087 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
2089 <para>
2090 Store a parameter in registry. The section may be global or a sharename.
2091 The section is created if it does not exist yet.
2092 </para>
2093 </refsect3>
2095 <refsect3>
2096 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2098 <para>
2099 Show a parameter stored in registry.
2100 </para>
2101 </refsect3>
2103 <refsect3>
2104 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2106 <para>
2107 Delete a parameter stored in registry.
2108 </para>
2109 </refsect3>
2111 <refsect3>
2112 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
2114 <para>
2115 Get the list of includes for the provided section (global or share).
2116 </para>
2118 <para>
2119 Note that due to the nature of the registry database and the nature of include directives,
2120 the includes need special treatment: Parameters are stored in registry by the parameter
2121 name as valuename, so there is only ever one instance of a parameter per share.
2122 Also, a specific order like in a text file is not guaranteed. For all real
2123 parameters, this is perfectly ok, but the include directive is rather a meta
2124 parameter, for which, in the smb.conf text file, the place where it is specified
2125 between the other parameters is very important. This can not be achieved by the
2126 simple registry smbconf data model, so there is one ordered list of includes
2127 per share, and this list is evaluated after all the parameters of the share.
2128 </para>
2130 <para>
2131 Further note that currently, only files can be included from registry
2132 configuration. In the future, there will be the ability to include configuration
2133 data from other registry keys.
2134 </para>
2135 </refsect3>
2137 <refsect3>
2138 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
2140 <para>
2141 Set the list of includes for the provided section (global or share) to the given
2142 list of one or more filenames. The filenames may contain the usual smb.conf
2143 macros like %I.
2144 </para>
2145 </refsect3>
2147 <refsect3>
2148 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
2150 <para>
2151 Delete the list of includes from the provided section (global or share).
2152 </para>
2153 </refsect3>
2155 </refsect2>
2157 <refsect2>
2158 <title>REGISTRY</title>
2159 <para>
2160 Manipulate Samba's registry.
2161 </para>
2163 <para>The registry commands are:
2164 <simplelist>
2165 <member>net registry enumerate   - Enumerate registry keys and values.</member>
2166 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
2167 <member>net registry createkey   - Create a new registry key.</member>
2168 <member>net registry deletekey   - Delete a registry key.</member>
2169 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
2170 <member>net registry getvalue    - Print a registry value.</member>
2171 <member>net registry getvalueraw - Print a registry value (raw format).</member>
2172 <member>net registry setvalue    - Set a new registry value.</member>
2173 <member>net registry increment   - Increment a DWORD registry value under a lock.
2174 </member>
2175 <member>net registry deletevalue - Delete a registry value.</member>
2176 <member>net registry getsd       - Get security descriptor.</member>
2177 <member>net registry getsd_sdd1  - Get security descriptor in sddl format.
2178 </member>
2179 <member>net registry setsd_sdd1  - Set security descriptor from sddl format
2180 string.</member>
2181 <member>net registry import      - Import a registration entries (.reg) file.
2182 </member>
2183 <member>net registry export      - Export a registration entries (.reg) file.
2184 </member>
2185 <member>net registry convert     - Convert a registration entries (.reg) file.
2186 </member>
2187 <member>net registry check       - Check and repair a registry database.
2188 </member>
2189 </simplelist>
2190 </para>
2192 <refsect3>
2193   <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
2194   <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
2195   </para>
2196 </refsect3>
2198 <refsect3>
2199   <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
2200   <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
2201   </para>
2202 </refsect3>
2204 <refsect3>
2205   <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
2206   <para>Create a new <emphasis>key</emphasis> if not yet existing.
2207   </para>
2208 </refsect3>
2210 <refsect3>
2211   <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
2212   <para>Delete the given <emphasis>key</emphasis> and its
2213   values from the registry, if it has no subkeys.
2214   </para>
2215 </refsect3>
2217 <refsect3>
2218   <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
2219   <para>Delete the given <emphasis>key</emphasis> and all of its
2220   subkeys and values from the registry.
2221   </para>
2222 </refsect3>
2224 <refsect3>
2225   <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
2226   --><replaceable>name</replaceable></title>
2228   <para>Output type and actual value of the value <emphasis>name</emphasis>
2229   of the given <emphasis>key</emphasis>.
2230   </para>
2231 </refsect3>
2233 <refsect3>
2234   <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
2235   --><replaceable>name</replaceable></title>
2236   <para>Output the actual value of the value <emphasis>name</emphasis>
2237   of the given <emphasis>key</emphasis>.
2238   </para>
2239 </refsect3>
2241 <refsect3>
2242   <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
2243   --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
2244   --><replaceable>value</replaceable> ...<!--
2245   --></title>
2247   <para>Set the value <emphasis>name</emphasis>
2248   of an existing <emphasis>key</emphasis>.
2249   <emphasis>type</emphasis> may be one of
2250   <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
2251   <emphasis>dword</emphasis>.
2252   In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
2253   be given multiple times.
2254   </para>
2255 </refsect3>
2257 <refsect3>
2258   <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
2259   --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
2260   --></title>
2262   <para>Increment the DWORD value <emphasis>name</emphasis>
2263   of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
2264   while holding a g_lock.
2265   <emphasis>inc</emphasis> defaults to 1.
2266   </para>
2267 </refsect3>
2269 <refsect3>
2270   <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
2271   --><replaceable>name</replaceable></title>
2273   <para>Delete the value <emphasis>name</emphasis>
2274   of the given <emphasis>key</emphasis>.
2275   </para>
2276 </refsect3>
2278 <refsect3>
2279   <title>REGISTRY GETSD <replaceable>key</replaceable></title>
2281   <para>Get the security descriptor of the given <emphasis>key</emphasis>.
2282   </para>
2283 </refsect3>
2285 <refsect3>
2286   <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
2288   <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
2289   Security Descriptor Definition Language (SDDL) string.
2290   </para>
2291 </refsect3>
2293 <refsect3>
2294   <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
2295   --><replaceable>sd</replaceable></title>
2297   <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
2298   Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
2299   </para>
2300 </refsect3>
2302 <refsect3>
2303   <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
2304   --><replaceable> [--precheck &lt;check-file&gt;] [opt]</replaceable></title>
2305   <para>Import a registration entries (.reg) <emphasis>file</emphasis>.</para>
2306   <para>The following options are available:</para>
2307   <variablelist>
2308     <varlistentry><term>--precheck <replaceable>check-file</replaceable></term>
2309     <listitem><para>
2310       This is a mechanism to check the existence or non-existence of
2311       certain keys or values specified in a precheck file before applying
2312       the import file.
2313       The import file will only be applied if the precheck succeeds.
2314     </para>
2315     <para>
2316       The check-file follows the normal registry file syntax with the
2317       following semantics:
2318     </para>
2319       <itemizedlist>
2320         <listitem><para>&lt;value name&gt;=&lt;value&gt; checks whether the
2321           value exists and has the given value.</para></listitem>
2322         <listitem><para>&lt;value name&gt;=- checks whether the value does
2323           not exist.</para></listitem>
2324         <listitem><para>[key] checks whether the key exists.</para>
2325         </listitem>
2326         <listitem><para>[-key] checks whether the key does not exist.</para>
2327         </listitem>
2328       </itemizedlist>
2329     </listitem>
2330     </varlistentry>
2331   </variablelist>
2332 </refsect3>
2334 <refsect3>
2335   <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2336   --><replaceable>file</replaceable><!--
2337   --><replaceable>[opt]</replaceable></title>
2339   <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2340   <emphasis>file</emphasis>.
2341   </para>
2342 </refsect3>
2344 <refsect3>
2345   <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2346   --><replaceable>out</replaceable> <!--
2347   --><replaceable>[[inopt] outopt]</replaceable></title>
2349   <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2350   </para>
2351 </refsect3>
2353 <refsect3>
2354   <title>REGISTRY CHECK [-ravTl] [-o &lt;ODB&gt;] [--wipe] [&lt;DB&gt;]</title>
2355   <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
2357   <variablelist>
2358     <varlistentry><term>-r|--repair</term>
2359     <listitem><para>
2360       Interactive repair mode, ask a lot of questions.
2361     </para></listitem>
2362     </varlistentry>
2364     <varlistentry><term>-a|--auto</term>
2365     <listitem><para>
2366       Noninteractive repair mode, use default answers.
2367     </para></listitem>
2368     </varlistentry>
2370     <varlistentry><term>-v|--verbose</term>
2371       <listitem><para>
2372         Produce more output.
2373       </para></listitem>
2374     </varlistentry>
2376     <varlistentry><term>-T|--test</term>
2377       <listitem><para>
2378         Dry run, show what changes would be made but don't touch anything.
2379       </para></listitem>
2380     </varlistentry>
2382     <varlistentry><term>-l|--lock</term>
2383       <listitem><para>
2384         Lock the database while doing the check.
2385       </para></listitem>
2386     </varlistentry>
2388    <varlistentry><term>--reg-version={1,2,3}</term>
2389       <listitem><para>
2390         Specify the format of the registry database. If not given it defaults to
2391         the value of the binary or, if an registry.tdb is explizitly stated at
2392         the commandline, to the value found in the INFO/version record.
2393       </para></listitem>
2394     </varlistentry>
2396     <varlistentry><term>[--db] &lt;DB&gt;</term>
2397       <listitem><para>
2398         Check the specified database.
2399       </para></listitem>
2400     </varlistentry>
2402     <varlistentry><term>-o|--output &lt;ODB&gt;</term>
2403       <listitem><para>
2404         Create a new registry database &lt;ODB&gt; instead of modifying the
2405         input. If &lt;ODB&gt; is already existing --wipe may be used to
2406         overwrite it.
2407       </para></listitem>
2408     </varlistentry>
2410    <varlistentry><term>--wipe</term>
2411       <listitem><para>
2412         Replace the registry database instead of modifying the input or
2413         overwrite an existing output database.
2414       </para></listitem>
2415     </varlistentry>
2417     <varlistentry><term></term>
2418       <listitem><para>
2419       </para></listitem>
2420     </varlistentry>
2421   </variablelist>
2422   </para>
2423 </refsect3>
2425 </refsect2>
2427 <refsect2>
2428 <title>EVENTLOG</title>
2430 <para>Starting with version 3.4.0 net can read, dump, import and export native
2431 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2432 </para>
2434 <para>
2435 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2436 <emphasis>smb.conf</emphasis> file.
2437 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2438 </para>
2440 <para>The eventlog commands are:
2441 <simplelist>
2442 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2443 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2444 tdb based representation of eventlogs.</member>
2445 <member>net eventlog export - Export the samba internal tdb based representation
2446 of eventlogs into an eventlog *.evt file.</member>
2447 </simplelist>
2448 </para>
2450 <refsect3>
2451 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2453 <para>
2454 Prints a eventlog *.evt file to standard output.
2455 </para>
2456 </refsect3>
2458 <refsect3>
2459 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2461 <para>
2462 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2463 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2464 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2465 defined in smb.conf.
2466 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2467 </para>
2469 </refsect3>
2471 <refsect3>
2472 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2474 <para>
2475 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2476 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2477 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2478 defined in smb.conf.
2479 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2480 </para>
2482 </refsect3>
2484 </refsect2>
2486 <refsect2>
2487 <title>DOM</title>
2489 <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.
2490 </para>
2491 <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.
2492 </para>
2494 <para>The client side support for remote join is implemented in the net dom commands which are:
2495 <simplelist>
2496 <member>net dom join - Join a remote computer into a domain.</member>
2497 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2498 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2499 </simplelist>
2500 </para>
2502 <refsect3>
2503 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2505 <para>
2506 Joins a computer into a domain. This command supports the following additional parameters:
2507 </para>
2509 <itemizedlist>
2511 <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>
2513 <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>
2515 <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>
2517 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2519 <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>
2521 </itemizedlist>
2523 <para>
2524 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.
2525 </para>
2526 <para>
2527         Example:
2528         net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2529 </para>
2530 <para>
2531 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.
2532 </para>
2534 </refsect3>
2536 <refsect3>
2537 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2539 <para>
2540 Unjoins a computer from a domain. This command supports the following additional parameters:
2541 </para>
2543 <itemizedlist>
2545 <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>
2547 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2549 <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>
2551 </itemizedlist>
2553 <para>
2554 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.
2555 </para>
2556 <para>
2557         Example:
2558         net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2559 </para>
2560 <para>
2561 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.
2562 </para>
2564 </refsect3>
2566 <refsect3>
2567 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2569 <para>
2570 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2571 </para>
2573 <itemizedlist>
2575 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2577 <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>
2579 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2581 <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>
2583 </itemizedlist>
2585 <para>
2586 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.
2587 </para>
2588 <para>
2589         Example:
2590         net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2591 </para>
2592 <para>
2593 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.
2594 </para>
2596 </refsect3>
2598 </refsect2>
2600 <refsect2>
2601 <title>G_LOCK</title>
2603 <para>Manage global locks.</para>
2605 <refsect3>
2606 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2608 <para>
2609 Execute a shell command under a global lock. This might be useful to define the
2610 order in which several shell commands will be executed. The locking information
2611 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2612 running, the locking information will be available on all cluster nodes.
2613 </para>
2615 <itemizedlist>
2616 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2617 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2618 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2619 </itemizedlist>
2620 </refsect3>
2622 <refsect3>
2623 <title>G_LOCK LOCKS</title>
2625 <para>
2626 Print a list of all currently existing locknames.
2627 </para>
2628 </refsect3>
2630 <refsect3>
2631 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2633 <para>
2634 Dump the locking table of a certain global lock.
2635 </para>
2636 </refsect3>
2638 </refsect2>
2640 <refsect2>
2641 <title>HELP [COMMAND]</title>
2643 <para>Gives usage information for the specified command.</para>
2645 </refsect2>
2647 </refsect1>
2649 <refsect1>
2650         <title>VERSION</title>
2652         <para>This man page is complete for version 3 of the Samba 
2653         suite.</para>
2654 </refsect1>
2656 <refsect1>
2657         <title>AUTHOR</title>
2658         
2659         <para>The original Samba software and related utilities 
2660         were created by Andrew Tridgell. Samba is now developed
2661         by the Samba Team as an Open Source project similar 
2662         to the way the Linux kernel is developed.</para>
2664         <para>The net manpage was written by Jelmer Vernooij.</para>
2665         
2666 </refsect1>
2668 </refentry>