docs: Bump version up to 4.3.
[Samba.git] / docs-xml / manpages / net.8.xml
bloba2bca95805a857c2389ac21857f75b62a86c94fe
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.3</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>Create 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. The remote server must be
408 specified with the -S option.
409 </para>
411 </refsect3>
413 <refsect3>
414 <title>TIME SYSTEM</title>
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>
420 </refsect3>
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>
429 </refsect3>
431 <refsect3>
432 <title>TIME ZONE</title>
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>
438 </refsect3>
439 </refsect2>
441 <refsect2>
442 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN]
443 [createcomputer=OU] [machinepass=PASS] [osName=string osVer=string] [options]</title>
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>
452 <para>
453 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
454 joining the domain.
455 </para>
457 <para>
458 [UPN] (ADS only) set the principalname attribute during the join.  The default
459 format is host/netbiosname@REALM.
460 </para>
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>
480 <refsect2>
481 <title>[RPC] OLDJOIN [options]</title>
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>
488 <refsect2>
489 <title>[RPC|ADS] USER</title>
491 <refsect3>
492 <title>[RPC|ADS] USER</title>
494 <para>List all users</para>
496 </refsect3>
498 <refsect3>
499 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
501 <para>Delete specified user</para>
503 </refsect3>
505 <refsect3>
506 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
508 <para>List the domain groups of the specified user.</para>
510 </refsect3>
512 <refsect3>
513 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
515 <para>Rename specified user.</para>
517 </refsect3>
519 <refsect3>
520 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
522 <para>Add specified user.</para>
523 </refsect3>
524 </refsect2>
526 <refsect2>
527 <title>[RPC|ADS] GROUP</title>
529 <refsect3>
530 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
531 <para>List user groups.</para>
532 </refsect3>
534 <refsect3>
535 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
537 <para>Delete specified group.</para>
539 </refsect3>
541 <refsect3>
542 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
544 <para>Create specified group.</para>
546 </refsect3>
547 </refsect2>
549 <refsect2>
550 <title>[RAP|RPC] SHARE</title>
552 <refsect3>
553 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
555 <para>Enumerates all exported resources (network shares) on target server.</para>
557 </refsect3>
559 <refsect3>
560 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
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>
566 </refsect3>
568 <refsect3>
569 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
571 <para>Delete specified share.</para>
572 </refsect3>
573 </refsect2>
575 <refsect2>
576 <title>[RPC|RAP] FILE</title>
578 <refsect3>
579 <title>[RPC|RAP] FILE</title>
581 <para>List all open files on remote server.</para>
583 </refsect3>
585 <refsect3>
586 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
588 <para>Close file with specified <replaceable>fileid</replaceable> on 
589 remote server.</para>
591 </refsect3>
593 <refsect3>
594 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
596 <para>
597 Print information on specified <replaceable>fileid</replaceable>. 
598 Currently listed are: file-id, username, locks, path, permissions.
599 </para>
601 </refsect3>
603 <refsect3>
604 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
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>
612 </refsect3>
614 </refsect2>
616 <refsect2>
617 <title>SESSION</title>
619 <refsect3>
620 <title>RAP SESSION</title>
622 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
623 sessions on the target server.</para>
625 </refsect3>
627 <refsect3>
628 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
630 <para>Close the specified sessions.</para>
632 </refsect3>
634 <refsect3>
635 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
637 <para>Give a list with all the open files in specified session.</para>
639 </refsect3>
641 </refsect2>
643 <refsect2>
644 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
646 <para>List all servers in specified domain or workgroup. Defaults
647 to local domain.</para>
649 </refsect2>
651 <refsect2>
652 <title>RAP DOMAIN</title>
654 <para>Lists all domains and workgroups visible on the 
655 current network.</para>
657 </refsect2>
659 <refsect2>
660 <title>RAP PRINTQ</title>
662 <refsect3>
663 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
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>
669 </refsect3>
671 <refsect3>
672 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
674 <para>Delete job with specified id.</para>
676 </refsect3>
678 </refsect2>
680 <refsect2>
681 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
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>
689 &not.implemented;
691 </refsect2>
693 <refsect2>
694 <title>RAP GROUPMEMBER</title>
696 <refsect3>
697 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
699 <para>List all members of the specified group.</para>
701 </refsect3>
703 <refsect3>
704 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
706 <para>Delete member from group.</para>
708 </refsect3>
710 <refsect3>
711 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
713 <para>Add member to group.</para>
715 </refsect3>
717 </refsect2>
719 <refsect2>
720 <title>RAP ADMIN <replaceable>command</replaceable></title>
722 <para>Execute the specified <replaceable>command</replaceable> on 
723 the remote server. Only works with OS/2 servers.
724 </para>
726 &not.implemented;
728 </refsect2>
730 <refsect2>
731 <title>RAP SERVICE</title>
733 <refsect3>
734 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
736 <para>Start the specified service on the remote server. Not implemented yet.</para>
738 &not.implemented;
740 </refsect3>
742 <refsect3>
743 <title>RAP SERVICE STOP</title>
745 <para>Stop the specified service on the remote server.</para>
747 &not.implemented;
749 </refsect3>
751 </refsect2>
753 <refsect2>
754 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
756 <para>
757 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
758 </para>
760 </refsect2>
762 <refsect2>
763 <title>LOOKUP</title>
765 <refsect3>
766 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
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>
773 </refsect3>
775 <refsect3>
776 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
778 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
780 </refsect3>
782 <refsect3>
783 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
785 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
786 Defaults to local realm.</para>
788 </refsect3>
790 <refsect3>
791 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
793 <para>Give IP's of Domain Controllers for specified <replaceable>
794 DOMAIN</replaceable>. Defaults to local domain.</para>
796 </refsect3>
798 <refsect3>
799 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
801 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
802 or workgroup. Defaults to local domain.</para>
804 </refsect3>
806 </refsect2>
808 <refsect2>
809 <title>CACHE</title>
811 <para>Samba uses a general caching interface called 'gencache'. It 
812 can be controlled using 'NET CACHE'.</para>
814 <para>All the timeout parameters support the suffixes:
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>
824 </para>
826 <refsect3>
827 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
829 <para>Add specified key+data to the cache with the given timeout.</para>
831 </refsect3>
833 <refsect3>
834 <title>CACHE DEL <replaceable>key</replaceable></title>
836 <para>Delete key from the cache.</para>
838 </refsect3>
840 <refsect3>
841 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
843 <para>Update data of existing cache entry.</para>
845 </refsect3>
847 <refsect3>
848 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
850 <para>Search for the specified pattern in the cache data.</para>
852 </refsect3>
854 <refsect3>
855 <title>CACHE LIST</title>
857 <para>
858 List all current items in the cache.
859 </para>
861 </refsect3>
863 <refsect3>
864 <title>CACHE FLUSH</title>
866 <para>Remove all the current items from the cache.</para>
868 </refsect3>
870 </refsect2>
872 <refsect2>
873 <title>GETLOCALSID [DOMAIN]</title>
875 <para>Prints the SID of the specified domain, or if the parameter is
876 omitted, the SID of the local server.</para>
878 </refsect2>
880 <refsect2>
881 <title>SETLOCALSID S-1-5-21-x-y-z</title>
883 <para>Sets SID for the local server to the specified SID.</para>
885 </refsect2>
887 <refsect2>
888 <title>GETDOMAINSID</title>
890 <para>Prints the local machine SID and the SID of the current 
891 domain.</para>
893 </refsect2>
895 <refsect2>
896 <title>SETDOMAINSID</title>
898 <para>Sets the SID of the current domain.</para>
900 </refsect2>
902 <refsect2>
903 <title>GROUPMAP</title>
905 <para>Manage the mappings between Windows group SIDs and UNIX groups.
906 Common options include:</para>
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>
919 <refsect3>
920 <title>GROUPMAP ADD</title>
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>
930 </refsect3>
932 <refsect3>
933 <title>GROUPMAP DELETE</title>
935 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
937 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
939 </refsect3>
941 <refsect3>
942 <title>GROUPMAP MODIFY</title>
944 <para>Update an existing group entry.</para>
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>
954 <refsect3>
955 <title>GROUPMAP LIST</title>
957 <para>List existing group mapping entries.</para>
959 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
961 </refsect3>
962 </refsect2>
966 <refsect2>
967 <title>MAXRID</title>
969 <para>Prints out the highest RID currently in use on the local
970 server (by the active 'passdb backend').
971 </para>
973 </refsect2>
975 <refsect2>
976 <title>RPC INFO</title>
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>
982 </refsect2>
984 <refsect2>
985 <title>[RPC|ADS] TESTJOIN</title>
987 <para>Check whether participation in a domain is still valid.</para>
989 </refsect2>
991 <refsect2>
992 <title>[RPC|ADS] CHANGETRUSTPW</title>
994 <para>Force change of domain trust password.</para>
996 </refsect2>
998 <refsect2>
999 <title>RPC TRUSTDOM</title>
1001 <refsect3>
1002 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
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>
1015 </refsect3>
1017 <refsect3>
1018 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
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>
1025 </refsect3>
1027 <refsect3>
1028 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
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>
1040 </refsect3>
1042 <refsect3>
1043 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
1044 <para>Abandon relationship to trusted domain</para>
1046 </refsect3>
1048 <refsect3>
1049 <title>RPC TRUSTDOM LIST</title>
1051 <para>List all interdomain trust relationships.</para>
1053 </refsect3>
1054 </refsect2>
1056 <refsect2>
1057 <title>RPC TRUST</title>
1059 <refsect3>
1060 <title>RPC TRUST CREATE</title>
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>
1066 <variablelist><title>Options:</title>
1067 <varlistentry>
1068 <term>otherserver</term>
1069 <listitem><para>Domain controller of the second domain</para></listitem>
1070 </varlistentry>
1072 <varlistentry>
1073 <term>otheruser</term>
1074 <listitem><para>Admin user in the second domain</para></listitem>
1075 </varlistentry>
1077 <varlistentry>
1078 <term>otherdomainsid</term>
1079 <listitem><para>SID of the second domain</para></listitem>
1080 </varlistentry>
1082 <varlistentry>
1083 <term>other_netbios_domain</term>
1084 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
1085 </varlistentry>
1087 <varlistentry>
1088 <term>otherdomain</term>
1089 <listitem><para>DNS (full) name of the second domain</para></listitem>
1090 </varlistentry>
1092 <varlistentry>
1093 <term>trustpw</term>
1094 <listitem><para>Trust password</para></listitem>
1095 </varlistentry>
1096 </variablelist>
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>
1122 <refsect3>
1123 <title>RPC TRUST DELETE</title>
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>
1128 <variablelist><title>Options:</title>
1129 <varlistentry>
1130 <term>otherserver</term>
1131 <listitem><para>Domain controller of the second domain</para></listitem>
1132 </varlistentry>
1134 <varlistentry>
1135 <term>otheruser</term>
1136 <listitem><para>Admin user in the second domain</para></listitem>
1137 </varlistentry>
1139 <varlistentry>
1140 <term>otherdomainsid</term>
1141 <listitem><para>SID of the second domain</para></listitem>
1142 </varlistentry>
1143 </variablelist>
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>
1166 </refsect2>
1168 <refsect2>
1169 <refsect3>
1170 <title>RPC RIGHTS</title>
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>
1178 </refsect3>
1181 </refsect2>
1183 <refsect2>
1184 <title>RPC ABORTSHUTDOWN</title>
1186 <para>Abort the shutdown of a remote server.</para>
1188 </refsect2>
1190 <refsect2>
1191 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
1193 <para>Shut down the remote server.</para>
1195 <variablelist>
1196 <varlistentry>
1197 <term>-r</term>
1198 <listitem><para>
1199 Reboot after shutdown.
1200 </para></listitem>
1201 </varlistentry>
1203 <varlistentry>
1204 <term>-f</term>
1205 <listitem><para>
1206 Force shutting down all applications.
1207 </para></listitem>
1208 </varlistentry>
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>
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>
1225 </refsect2>
1227 <refsect2>
1228 <title>RPC SAMDUMP</title>
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>
1234 <refsect2>
1235 <title>RPC VAMPIRE</title>
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>
1244 <refsect2>
1245 <title>RPC VAMPIRE KEYTAB</title>
1247 <para>Dump remote SAM database to local Kerberos keytab file.
1248 </para>
1249 </refsect2>
1251 <refsect2>
1252 <title>RPC VAMPIRE LDIF</title>
1254 <para>Dump remote SAM database to local LDIF file or standard output.
1255 </para>
1256 </refsect2>
1258 <refsect2>
1259 <title>RPC GETSID</title>
1261 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
1263 </refsect2>
1265 <refsect2>
1266 <title>ADS LEAVE</title>
1268 <para>Make the remote host leave the domain it is part of. </para>
1270 </refsect2>
1272 <refsect2>
1273 <title>ADS STATUS</title>
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>
1279 </refsect2>
1281 <refsect2>
1282 <title>ADS PRINTER</title>
1284 <refsect3>
1285 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
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>
1291 </refsect3>
1293 <refsect3>
1294 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1296 <para>Publish specified printer using ADS.</para>
1298 </refsect3>
1300 <refsect3>
1301 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1303 <para>Remove specified printer from ADS directory.</para>
1305 </refsect3>
1307 </refsect2>
1309 <refsect2>
1310 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
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>
1316 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1317 </para>
1319 </refsect2>
1321 <refsect2>
1322 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
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>
1330 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1332 </refsect2>
1334 <refsect2>
1335 <title>ADS WORKGROUP</title>
1337 <para>Print out workgroup name for specified kerberos realm.</para>
1339 </refsect2>
1341 <refsect2>
1342         <title>ADS ENCTYPES</title>
1344 <para>
1345         List, modify or delete the value of the "msDS-SupportedEncryptionTypes" attribute of an account in AD.
1346 </para>
1348 <para>
1349         This attribute allows to control which Kerberos encryption types are used for the generation of initial and service tickets. The value consists of an integer bitmask with the following values:
1350 </para>
1352 <para>0x00000001 DES-CBC-CRC</para>
1353 <para>0x00000002 DES-CBC-MD5</para>
1354 <para>0x00000004 RC4-HMAC</para>
1355 <para>0x00000008 AES128-CTS-HMAC-SHA1-96</para>
1356 <para>0x00000010 AES256-CTS-HMAC-SHA1-96</para>
1358 </refsect2>
1360 <refsect2>
1361         <title>ADS ENCTYPES LIST <replaceable>&lt;ACCOUNTNAME&gt;</replaceable></title>
1363 <para>
1364         List the value of the "msDS-SupportedEncryptionTypes" attribute of a given account.
1365 </para>
1367 <para>Example: <userinput>net ads enctypes list Computername</userinput></para>
1369 </refsect2>
1371 <refsect2>
1372         <title>ADS ENCTYPES SET <replaceable>&lt;ACCOUNTNAME&gt;</replaceable> <replaceable>[enctypes]</replaceable></title>
1374 <para>
1375         Set the value of the "msDS-SupportedEncryptionTypes" attribute of the LDAP object of ACCOUNTNAME to a given value. If the value is ommitted, the value is set to 31 which enables all the currently supported encryption types.
1376 </para>
1378 <para>Example: <userinput>net ads enctypes set Computername 24</userinput></para>
1380 </refsect2>
1382 <refsect2>
1383         <title>ADS ENCTYPES DELETE <replaceable>&lt;ACCOUNTNAME&gt;</replaceable></title>
1385 <para>
1386         Deletes the "msDS-SupportedEncryptionTypes" attribute of the LDAP object of ACCOUNTNAME.
1387 </para>
1389 <para>Example: <userinput>net ads enctypes set Computername 24</userinput></para>
1391 </refsect2>
1394 <refsect2>
1395 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
1397 <para>
1398 (Re)Create a BUILTIN group.
1399 Only a wellknown set of BUILTIN groups can be created with this command.
1400 This is the list of currently recognized group names: Administrators,
1401 Users, Guests, Power Users, Account Operators, Server Operators, Print
1402 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1403 compatible Access.
1405 This command requires a running Winbindd with idmap allocation properly
1406 configured. The group gid will be allocated out of the winbindd range.
1407 </para>
1409 </refsect2>
1411 <refsect2>
1412 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
1414 <para>
1415 Create a LOCAL group (also known as Alias).
1417 This command requires a running Winbindd with idmap allocation properly
1418 configured. The group gid will be allocated out of the winbindd range.
1419 </para>
1421 </refsect2>
1423 <refsect2>
1424 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
1426 <para>
1427 Delete an existing LOCAL group (also known as Alias).
1429 </para>
1431 </refsect2>
1433 <refsect2>
1434 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
1436 <para>
1437 Map an existing Unix group and make it a Domain Group, the domain group
1438 will have the same name.
1439 </para>
1441 </refsect2>
1443 <refsect2>
1444 <title>SAM UNMAPUNIXGROUP &lt;NAME&gt;</title>
1446 <para>
1447 Remove an existing group mapping entry.
1448 </para>
1450 </refsect2>
1452 <refsect2>
1453 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1455 <para>
1456 Add a member to a Local group. The group can be specified only by name,
1457 the member can be specified by name or SID.
1458 </para>
1460 </refsect2>
1462 <refsect2>
1463 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1465 <para>
1466 Remove a member from a Local group. The group and the member must be
1467 specified by name.
1468 </para>
1470 </refsect2>
1472 <refsect2>
1473 <title>SAM LISTMEM &lt;GROUP&gt;</title>
1475 <para>
1476 List Local group members. The group must be specified by name.
1477 </para>
1479 </refsect2>
1481 <refsect2>
1482 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
1484 <para>
1485 List the specified set of accounts by name. If verbose is specified,
1486 the rid and description is also provided for each account.
1487 </para>
1489 </refsect2>
1491 <refsect2>
1492 <title>SAM RIGHTS LIST</title>
1494 <para>
1495 List all available privileges.
1496 </para>
1498 </refsect2>
1500 <refsect2>
1501 <title>SAM RIGHTS GRANT &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1503 <para>
1504 Grant one or more privileges to a user.
1505 </para>
1507 </refsect2>
1509 <refsect2>
1510 <title>SAM RIGHTS REVOKE &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1512 <para>
1513 Revoke one or more privileges from a user.
1514 </para>
1516 </refsect2>
1518 <refsect2>
1519 <title>SAM SHOW &lt;NAME&gt;</title>
1521 <para>
1522 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1523 account.
1524 </para>
1526 </refsect2>
1528 <refsect2>
1529 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1531 <para>
1532 Set the home directory for a user account.
1533 </para>
1535 </refsect2>
1537 <refsect2>
1538 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1540 <para>
1541 Set the profile path for a user account.
1542 </para>
1544 </refsect2>
1546 <refsect2>
1547 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1549 <para>
1550 Set the comment for a user or group account.
1551 </para>
1553 </refsect2>
1555 <refsect2>
1556 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1558 <para>
1559 Set the full name for a user account.
1560 </para>
1562 </refsect2>
1564 <refsect2>
1565 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1567 <para>
1568 Set the logon script for a user account.
1569 </para>
1571 </refsect2>
1573 <refsect2>
1574 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1576 <para>
1577 Set the home drive for a user account.
1578 </para>
1580 </refsect2>
1582 <refsect2>
1583 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1585 <para>
1586 Set the workstations a user account is allowed to log in from.
1587 </para>
1589 </refsect2>
1591 <refsect2>
1592 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1594 <para>
1595 Set the "disabled" flag for a user account.
1596 </para>
1598 </refsect2>
1600 <refsect2>
1601 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1603 <para>
1604 Set the "password not required" flag for a user account.
1605 </para>
1607 </refsect2>
1609 <refsect2>
1610 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1612 <para>
1613 Set the "autolock" flag for a user account.
1614 </para>
1616 </refsect2>
1618 <refsect2>
1619 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1621 <para>
1622 Set the "password do not expire" flag for a user account.
1623 </para>
1625 </refsect2>
1627 <refsect2>
1628 <title>SAM SET PWDMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1630 <para>
1631 Set or unset the "password must change" flag for a user account.
1632 </para>
1634 </refsect2>
1636 <refsect2>
1637 <title>SAM POLICY LIST</title>
1639 <para>
1640 List the available account policies.
1641 </para>
1643 </refsect2>
1645 <refsect2>
1646 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1648 <para>
1649 Show the account policy value.
1650 </para>
1652 </refsect2>
1654 <refsect2>
1655 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1657 <para>
1658 Set a value for the account policy.
1659 Valid values can be: "forever", "never", "off", or a number.
1660 </para>
1662 </refsect2>
1664 <refsect2>
1665 <title>SAM PROVISION</title>
1667 <para>
1668 Only available if ldapsam:editposix is set and winbindd is running.
1669 Properly populates the ldap tree with the basic accounts (Administrator)
1670 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1671 </para>
1673 </refsect2>
1675 <refsect2>
1676 <title>IDMAP DUMP &lt;local tdb file name&gt;</title>
1678 <para>
1679 Dumps the mappings contained in the local tdb file specified.
1680 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1681 </para>
1683 </refsect2>
1685 <refsect2>
1686 <title>IDMAP RESTORE [input file]</title>
1688 <para>
1689 Restore the mappings from the specified file or stdin.
1690 </para>
1692 </refsect2>
1694 <refsect2>
1695 <title>IDMAP SET SECRET &lt;DOMAIN&gt; &lt;secret&gt;</title>
1697 <para>
1698 Store a secret for the specified domain, used primarily for domains
1699 that use idmap_ldap as a backend. In this case the secret is used
1700 as the password for the user DN used to bind to the ldap server.
1701 </para>
1703 </refsect2>
1705 <refsect2>
1706 <title>IDMAP SET RANGE &lt;RANGE&gt; &lt;SID&gt; [index] [--db=&lt;DB&gt;]</title>
1708 <para>
1709 Store a domain-range mapping for a given domain (and index) in autorid database.
1710 </para>
1712 </refsect2>
1714 <refsect2>
1715 <title>IDMAP SET CONFIG &lt;config&gt; [--db=&lt;DB&gt;]</title>
1717 <para>
1718 Update CONFIG entry in autorid database.
1719 </para>
1721 </refsect2>
1723 <refsect2>
1724 <title>IDMAP GET RANGE &lt;SID&gt; [index] [--db=&lt;DB&gt;]</title>
1726 <para>
1727 Get the range for a given domain and index from autorid database.
1728 </para>
1730 </refsect2>
1732 <refsect2>
1733 <title>IDMAP GET RANGES [&lt;SID&gt;] [--db=&lt;DB&gt;]</title>
1735 <para>
1736 Get ranges for all domains or for one identified by given SID.
1737 </para>
1739 </refsect2>
1741 <refsect2>
1742 <title>IDMAP GET CONFIG [--db=&lt;DB&gt;]</title>
1744 <para>
1745 Get CONFIG entry from autorid database.
1746 </para>
1748 </refsect2>
1750 <refsect2>
1752 <title>IDMAP DELETE MAPPING [-f] [--db=&lt;DB&gt;] &lt;ID&gt;</title>
1754 <para>
1755 Delete a mapping sid &lt;-&gt; gid or sid &lt;-&gt; uid from the IDMAP database.
1756 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".
1757 Use -f to delete an invalid partial mapping &lt;ID&gt; -&gt; xx
1758 </para>
1759 <para>
1760   Use "smbcontrol all idmap ..." to notify running smbd instances.
1761   See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
1762   <manvolnum>1</manvolnum></citerefentry> manpage for details.
1763 </para>
1764 </refsect2>
1766 <refsect2>
1767 <title>IDMAP DELETE RANGE [-f] [--db=&lt;TDB&gt;] &lt;RANGE&gt;|(&lt;SID&gt; [&lt;INDEX&gt;])</title>
1769 <para>
1770 Delete a domain range mapping identified by 'RANGE' or "domain SID and INDEX" from autorid database.
1771 Use -f to delete invalid mappings.
1772 </para>
1774 </refsect2>
1776 <refsect2>
1777 <title>IDMAP DELETE RANGES [-f] [--db=&lt;TDB&gt;] &lt;SID&gt;</title>
1779 <para>
1780 Delete all domain range mappings for a domain identified by SID.
1781 Use -f to delete invalid mappings.
1782 </para>
1784 </refsect2>
1786 <refsect2>
1788 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=&lt;DB&gt;]</title>
1790 <para>
1791   Check and repair the IDMAP database. If no option is given a read only check
1792   of the database is done. Among others an interactive or automatic repair mode
1793   may be chosen with one of the following options:
1795   <variablelist>
1796     <varlistentry><term>-r|--repair</term>
1797     <listitem><para>
1798       Interactive repair mode, ask a lot of questions.
1799     </para></listitem>
1800     </varlistentry>
1802     <varlistentry><term>-a|--auto</term>
1803     <listitem><para>
1804       Noninteractive repair mode, use default answers.
1805     </para></listitem>
1806     </varlistentry>
1808     <varlistentry><term>-v|--verbose</term>
1809       <listitem><para>
1810         Produce more output.
1811       </para></listitem>
1812     </varlistentry>
1814     <varlistentry><term>-f|--force</term>
1815       <listitem><para>
1816         Try to apply changes, even if they do not apply cleanly.
1817       </para></listitem>
1818     </varlistentry>
1820     <varlistentry><term>-T|--test</term>
1821       <listitem><para>
1822         Dry run, show what changes would be made but don't touch anything.
1823       </para></listitem>
1824     </varlistentry>
1826     <varlistentry><term>-l|--lock</term>
1827       <listitem><para>
1828         Lock the database while doing the check.
1829       </para></listitem>
1830     </varlistentry>
1832     <varlistentry><term>--db &lt;DB&gt;</term>
1833       <listitem><para>
1834         Check the specified database.
1835       </para></listitem>
1836     </varlistentry>
1837     <varlistentry><term></term>
1838       <listitem><para>
1839       </para></listitem>
1840     </varlistentry>
1841   </variablelist>
1843   It reports about the finding of the following errors:
1845   <variablelist>
1846     <varlistentry><term>Missing reverse mapping:</term>
1847     <listitem><para>
1848       A record with mapping A-&gt;B where there is no B-&gt;A. Default action
1849       in repair mode is to "fix" this by adding the reverse mapping.
1850     </para></listitem>
1851     </varlistentry>
1853     <varlistentry><term>Invalid mapping:</term>
1854     <listitem><para>
1855       A record with mapping A-&gt;B where B-&gt;C. Default action
1856       is to "delete" this record.
1857     </para></listitem>
1858   </varlistentry>
1860   <varlistentry><term>Missing or invalid HWM:</term>
1861     <listitem><para>
1862       A high water mark is not at least equal to the largest ID in the
1863       database. Default action is to "fix" this by setting it to the
1864       largest ID found +1.
1865     </para></listitem>
1866   </varlistentry>
1868   <varlistentry><term>Invalid record:</term>
1869     <listitem><para>
1870       Something we failed to parse. Default action is to "edit" it
1871       in interactive and "delete" it in automatic mode.
1872     </para></listitem>
1873   </varlistentry>
1874 </variablelist>
1875 </para>
1876 </refsect2>
1879 <refsect2>
1880 <title>USERSHARE</title>
1882 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1883 non-root users to add user defined shares to be exported using the "net usershare"
1884 commands.
1885 </para>
1887 <para>
1888 To set this up, first set up your smb.conf by adding to the [global] section:
1890 usershare path = /usr/local/samba/lib/usershares
1892 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1893 set the group owner to the UNIX group who should have the ability to create usershares,
1894 for example a group called "serverops".
1896 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1898 (Owner and group all access, no access for others, plus the sticky bit,
1899 which means that a file in that directory can be renamed or deleted only
1900 by the owner of the file).
1902 Finally, tell smbd how many usershares you will allow by adding to the [global]
1903 section of smb.conf a line such as :
1905 usershare max shares = 100.
1907 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1908 can create user defined shares on demand using the commands below.
1909 </para>
1911 <para>The usershare commands are:
1913 <simplelist>
1914 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
1915 <member>net usershare delete sharename - to delete a user defined share.</member>
1916 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1917 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1918 </simplelist>
1920 </para>
1922 <refsect3>
1923 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1925 <para>
1926 Add or replace a new user defined share, with name "sharename".
1927 </para>
1929 <para>
1930 "path" specifies the absolute pathname on the system to be exported.
1931 Restrictions may be put on this, see the global smb.conf parameters:
1932 "usershare owner only", "usershare prefix allow list", and
1933 "usershare prefix deny list".
1934 </para>
1936 <para>
1937 The optional "comment" parameter is the comment that will appear
1938 on the share when browsed to by a client.
1939 </para>
1941 <para>The optional "acl" field
1942 specifies which users have read and write access to the entire share.
1943 Note that guest connections are not allowed unless the smb.conf parameter
1944 "usershare allow guests" has been set. The definition of a user
1945 defined share acl is: "user:permission", where user is a valid
1946 username on the system and permission can be "F", "R", or "D".
1947 "F" stands for "full permissions", ie. read and write permissions.
1948 "D" stands for "deny" for a user, ie. prevent this user from accessing
1949 this share.
1950 "R" stands for "read only", ie. only allow read access to this
1951 share (no creation of new files or directories or writing to files).
1952 </para>
1954 <para>
1955 The default if no "acl" is given is "Everyone:R", which means any 
1956 authenticated user has read-only access.
1957 </para>
1959 <para>
1960 The optional "guest_ok" has the same effect as the parameter of the
1961 same name in smb.conf, in that it allows guest access to this user
1962 defined share. This parameter is only allowed if the global parameter
1963 "usershare allow guests" has been set to true in the smb.conf.
1964 </para>
1966 There is no separate command to modify an existing user defined share,
1967 just use the "net usershare add [sharename]" command using the same
1968 sharename as the one you wish to modify and specify the new options
1969 you wish. The Samba smbd daemon notices user defined share modifications
1970 at connect time so will see the change immediately, there is no need
1971 to restart smbd on adding, deleting or changing a user defined share.
1972 </refsect3>
1974 <refsect3>
1975 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1977 <para>
1978 Deletes the user defined share by name. The Samba smbd daemon
1979 immediately notices this change, although it will not disconnect
1980 any users currently connected to the deleted share.
1981 </para>
1983 </refsect3>
1985 <refsect3>
1986 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1988 <para>
1989 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1990 </para>
1992 <para>
1993 net usershare info on its own dumps out info on the user defined shares that were
1994 created by the current user, or restricts them to share names that match the given
1995 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1996 If the '-l' or '--long' option is also given, it prints out info on user defined
1997 shares created by other users.
1998 </para>
2000 <para>
2001 The information given about a share looks like:
2003 [foobar]
2004 path=/home/jeremy
2005 comment=testme
2006 usershare_acl=Everyone:F
2007 guest_ok=n
2009 And is a list of the current settings of the user defined share that can be
2010 modified by the "net usershare add" command.
2011 </para>
2013 </refsect3>
2015 <refsect3>
2016 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
2018 <para>
2019 List all the user defined shares owned by the current user matching the given pattern, or all users.
2020 </para>
2022 <para>
2023 net usershare list on its own list out the names of the user defined shares that were
2024 created by the current user, or restricts the list to share names that match the given
2025 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
2026 If the '-l' or '--long' option is also given, it includes the names of user defined
2027 shares created by other users.
2028 </para>
2030 </refsect3>
2032 </refsect2>
2034 <refsect2>
2035 <title>[RPC] CONF</title>
2037 <para>Starting with version 3.2.0, a Samba server can be configured by data
2038 stored in registry. This configuration data can be edited with the new "net
2039 conf" commands. There is also the possibility to configure a remote Samba server
2040 by enabling the RPC conf mode and specifying the address of the remote server.
2041 </para>
2043 <para>
2044 The deployment of this configuration data can be activated in two levels from the
2045 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
2046 activated by setting <parameter>registry shares</parameter> to
2047 <quote>yes</quote> in the [global] section and global configuration options are
2048 activated by setting <smbconfoption name="include">registry</smbconfoption> in
2049 the [global] section for a mixed configuration or by setting
2050 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
2051 section for a registry-only configuration.
2052 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
2053 <manvolnum>5</manvolnum></citerefentry> manpage for details.
2054 </para>
2056 <para>The conf commands are:
2057 <simplelist>
2058 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
2059 format.</member>
2060 <member>net [rpc] conf import - Import configuration from file in smb.conf
2061 format.</member>
2062 <member>net [rpc] conf listshares - List the registry shares.</member>
2063 <member>net [rpc] conf drop - Delete the complete configuration from
2064 registry.</member>
2065 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
2066 <member>net [rpc] conf addshare - Create a new registry share.</member>
2067 <member>net [rpc] conf delshare - Delete a registry share.</member>
2068 <member>net [rpc] conf setparm - Store a parameter.</member>
2069 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
2070 <member>net [rpc] conf delparm - Delete a parameter.</member>
2071 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
2072 <member>net [rpc] conf setincludes - Set includes for a share.</member>
2073 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
2074 </simplelist>
2075 </para>
2077 <refsect3>
2078 <title>[RPC] CONF LIST</title>
2080 <para>
2081 Print the configuration data stored in the registry in a smb.conf-like format to
2082 standard output.
2083 </para>
2084 </refsect3>
2086 <refsect3>
2087 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
2089 <para>
2090 This command imports configuration from a file in smb.conf format.
2091 If a section encountered in the input file is present in registry,
2092 its contents is replaced. Sections of registry configuration that have
2093 no counterpart in the input file are not affected. If you want to delete these,
2094 you will have to use the "net conf drop" or "net conf delshare" commands.
2095 Optionally, a section may be specified to restrict the effect of the
2096 import command to that specific section. A test mode is enabled by specifying
2097 the parameter "-T" on the commandline. In test mode, no changes are made to the
2098 registry, and the resulting configuration is printed to standard output instead.
2099 </para>
2100 </refsect3>
2102 <refsect3>
2103 <title>[RPC] CONF LISTSHARES</title>
2105 <para>
2106 List the names of the shares defined in registry.
2107 </para>
2108 </refsect3>
2110 <refsect3>
2111 <title>[RPC] CONF DROP</title>
2113 <para>
2114 Delete the complete configuration data from registry.
2115 </para>
2116 </refsect3>
2118 <refsect3>
2119 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
2121 <para>
2122 Show the definition of the share or section specified. It is valid to specify
2123 "global" as sharename to retrieve the global configuration options from
2124 registry.
2125 </para>
2126 </refsect3>
2128 <refsect3>
2129 <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>
2131 <para>Create a new share definition in registry.
2132 The sharename and path have to be given. The share name may
2133 <emphasis>not</emphasis> be "global". Optionally, values for the very
2134 common options "writeable", "guest ok" and a "comment" may be specified.
2135 The same result may be obtained by a sequence of "net conf setparm"
2136 commands.
2137 </para>
2138 </refsect3>
2140 <refsect3>
2141 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
2143 <para>
2144 Delete a share definition from registry.
2145 </para>
2146 </refsect3>
2148 <refsect3>
2149 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
2151 <para>
2152 Store a parameter in registry. The section may be global or a sharename.
2153 The section is created if it does not exist yet.
2154 </para>
2155 </refsect3>
2157 <refsect3>
2158 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2160 <para>
2161 Show a parameter stored in registry.
2162 </para>
2163 </refsect3>
2165 <refsect3>
2166 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2168 <para>
2169 Delete a parameter stored in registry.
2170 </para>
2171 </refsect3>
2173 <refsect3>
2174 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
2176 <para>
2177 Get the list of includes for the provided section (global or share).
2178 </para>
2180 <para>
2181 Note that due to the nature of the registry database and the nature of include directives,
2182 the includes need special treatment: Parameters are stored in registry by the parameter
2183 name as valuename, so there is only ever one instance of a parameter per share.
2184 Also, a specific order like in a text file is not guaranteed. For all real
2185 parameters, this is perfectly ok, but the include directive is rather a meta
2186 parameter, for which, in the smb.conf text file, the place where it is specified
2187 between the other parameters is very important. This can not be achieved by the
2188 simple registry smbconf data model, so there is one ordered list of includes
2189 per share, and this list is evaluated after all the parameters of the share.
2190 </para>
2192 <para>
2193 Further note that currently, only files can be included from registry
2194 configuration. In the future, there will be the ability to include configuration
2195 data from other registry keys.
2196 </para>
2197 </refsect3>
2199 <refsect3>
2200 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
2202 <para>
2203 Set the list of includes for the provided section (global or share) to the given
2204 list of one or more filenames. The filenames may contain the usual smb.conf
2205 macros like %I.
2206 </para>
2207 </refsect3>
2209 <refsect3>
2210 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
2212 <para>
2213 Delete the list of includes from the provided section (global or share).
2214 </para>
2215 </refsect3>
2217 </refsect2>
2219 <refsect2>
2220 <title>REGISTRY</title>
2221 <para>
2222 Manipulate Samba's registry.
2223 </para>
2225 <para>The registry commands are:
2226 <simplelist>
2227 <member>net registry enumerate   - Enumerate registry keys and values.</member>
2228 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
2229 <member>net registry createkey   - Create a new registry key.</member>
2230 <member>net registry deletekey   - Delete a registry key.</member>
2231 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
2232 <member>net registry getvalue    - Print a registry value.</member>
2233 <member>net registry getvalueraw - Print a registry value (raw format).</member>
2234 <member>net registry setvalue    - Set a new registry value.</member>
2235 <member>net registry increment   - Increment a DWORD registry value under a lock.
2236 </member>
2237 <member>net registry deletevalue - Delete a registry value.</member>
2238 <member>net registry getsd       - Get security descriptor.</member>
2239 <member>net registry getsd_sdd1  - Get security descriptor in sddl format.
2240 </member>
2241 <member>net registry setsd_sdd1  - Set security descriptor from sddl format
2242 string.</member>
2243 <member>net registry import      - Import a registration entries (.reg) file.
2244 </member>
2245 <member>net registry export      - Export a registration entries (.reg) file.
2246 </member>
2247 <member>net registry convert     - Convert a registration entries (.reg) file.
2248 </member>
2249 <member>net registry check       - Check and repair a registry database.
2250 </member>
2251 </simplelist>
2252 </para>
2254 <refsect3>
2255   <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
2256   <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
2257   </para>
2258 </refsect3>
2260 <refsect3>
2261   <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
2262   <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
2263   </para>
2264 </refsect3>
2266 <refsect3>
2267   <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
2268   <para>Create a new <emphasis>key</emphasis> if not yet existing.
2269   </para>
2270 </refsect3>
2272 <refsect3>
2273   <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
2274   <para>Delete the given <emphasis>key</emphasis> and its
2275   values from the registry, if it has no subkeys.
2276   </para>
2277 </refsect3>
2279 <refsect3>
2280   <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
2281   <para>Delete the given <emphasis>key</emphasis> and all of its
2282   subkeys and values from the registry.
2283   </para>
2284 </refsect3>
2286 <refsect3>
2287   <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
2288   --><replaceable>name</replaceable></title>
2290   <para>Output type and actual value of the value <emphasis>name</emphasis>
2291   of the given <emphasis>key</emphasis>.
2292   </para>
2293 </refsect3>
2295 <refsect3>
2296   <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
2297   --><replaceable>name</replaceable></title>
2298   <para>Output the actual value of the value <emphasis>name</emphasis>
2299   of the given <emphasis>key</emphasis>.
2300   </para>
2301 </refsect3>
2303 <refsect3>
2304   <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
2305   --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
2306   --><replaceable>value</replaceable> ...<!--
2307   --></title>
2309   <para>Set the value <emphasis>name</emphasis>
2310   of an existing <emphasis>key</emphasis>.
2311   <emphasis>type</emphasis> may be one of
2312   <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
2313   <emphasis>dword</emphasis>.
2314   In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
2315   be given multiple times.
2316   </para>
2317 </refsect3>
2319 <refsect3>
2320   <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
2321   --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
2322   --></title>
2324   <para>Increment the DWORD value <emphasis>name</emphasis>
2325   of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
2326   while holding a g_lock.
2327   <emphasis>inc</emphasis> defaults to 1.
2328   </para>
2329 </refsect3>
2331 <refsect3>
2332   <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
2333   --><replaceable>name</replaceable></title>
2335   <para>Delete the value <emphasis>name</emphasis>
2336   of the given <emphasis>key</emphasis>.
2337   </para>
2338 </refsect3>
2340 <refsect3>
2341   <title>REGISTRY GETSD <replaceable>key</replaceable></title>
2343   <para>Get the security descriptor of the given <emphasis>key</emphasis>.
2344   </para>
2345 </refsect3>
2347 <refsect3>
2348   <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
2350   <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
2351   Security Descriptor Definition Language (SDDL) string.
2352   </para>
2353 </refsect3>
2355 <refsect3>
2356   <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
2357   --><replaceable>sd</replaceable></title>
2359   <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
2360   Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
2361   </para>
2362 </refsect3>
2364 <refsect3>
2365   <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
2366   --><replaceable> [--precheck &lt;check-file&gt;] [opt]</replaceable></title>
2367   <para>Import a registration entries (.reg) <emphasis>file</emphasis>.</para>
2368   <para>The following options are available:</para>
2369   <variablelist>
2370     <varlistentry><term>--precheck <replaceable>check-file</replaceable></term>
2371     <listitem><para>
2372       This is a mechanism to check the existence or non-existence of
2373       certain keys or values specified in a precheck file before applying
2374       the import file.
2375       The import file will only be applied if the precheck succeeds.
2376     </para>
2377     <para>
2378       The check-file follows the normal registry file syntax with the
2379       following semantics:
2380     </para>
2381       <itemizedlist>
2382         <listitem><para>&lt;value name&gt;=&lt;value&gt; checks whether the
2383           value exists and has the given value.</para></listitem>
2384         <listitem><para>&lt;value name&gt;=- checks whether the value does
2385           not exist.</para></listitem>
2386         <listitem><para>[key] checks whether the key exists.</para>
2387         </listitem>
2388         <listitem><para>[-key] checks whether the key does not exist.</para>
2389         </listitem>
2390       </itemizedlist>
2391     </listitem>
2392     </varlistentry>
2393   </variablelist>
2394 </refsect3>
2396 <refsect3>
2397   <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2398   --><replaceable>file</replaceable><!--
2399   --><replaceable>[opt]</replaceable></title>
2401   <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2402   <emphasis>file</emphasis>.
2403   </para>
2404 </refsect3>
2406 <refsect3>
2407   <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2408   --><replaceable>out</replaceable> <!--
2409   --><replaceable>[[inopt] outopt]</replaceable></title>
2411   <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2412   </para>
2413 </refsect3>
2415 <refsect3>
2416   <title>REGISTRY CHECK [-ravTl] [-o &lt;ODB&gt;] [--wipe] [&lt;DB&gt;]</title>
2417   <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
2419   <variablelist>
2420     <varlistentry><term>-r|--repair</term>
2421     <listitem><para>
2422       Interactive repair mode, ask a lot of questions.
2423     </para></listitem>
2424     </varlistentry>
2426     <varlistentry><term>-a|--auto</term>
2427     <listitem><para>
2428       Noninteractive repair mode, use default answers.
2429     </para></listitem>
2430     </varlistentry>
2432     <varlistentry><term>-v|--verbose</term>
2433       <listitem><para>
2434         Produce more output.
2435       </para></listitem>
2436     </varlistentry>
2438     <varlistentry><term>-T|--test</term>
2439       <listitem><para>
2440         Dry run, show what changes would be made but don't touch anything.
2441       </para></listitem>
2442     </varlistentry>
2444     <varlistentry><term>-l|--lock</term>
2445       <listitem><para>
2446         Lock the database while doing the check.
2447       </para></listitem>
2448     </varlistentry>
2450    <varlistentry><term>--reg-version={1,2,3}</term>
2451       <listitem><para>
2452         Specify the format of the registry database. If not given it defaults to
2453         the value of the binary or, if an registry.tdb is explizitly stated at
2454         the commandline, to the value found in the INFO/version record.
2455       </para></listitem>
2456     </varlistentry>
2458     <varlistentry><term>[--db] &lt;DB&gt;</term>
2459       <listitem><para>
2460         Check the specified database.
2461       </para></listitem>
2462     </varlistentry>
2464     <varlistentry><term>-o|--output &lt;ODB&gt;</term>
2465       <listitem><para>
2466         Create a new registry database &lt;ODB&gt; instead of modifying the
2467         input. If &lt;ODB&gt; is already existing --wipe may be used to
2468         overwrite it.
2469       </para></listitem>
2470     </varlistentry>
2472    <varlistentry><term>--wipe</term>
2473       <listitem><para>
2474         Replace the registry database instead of modifying the input or
2475         overwrite an existing output database.
2476       </para></listitem>
2477     </varlistentry>
2479     <varlistentry><term></term>
2480       <listitem><para>
2481       </para></listitem>
2482     </varlistentry>
2483   </variablelist>
2484   </para>
2485 </refsect3>
2487 </refsect2>
2489 <refsect2>
2490 <title>EVENTLOG</title>
2492 <para>Starting with version 3.4.0 net can read, dump, import and export native
2493 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2494 </para>
2496 <para>
2497 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2498 <emphasis>smb.conf</emphasis> file.
2499 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2500 </para>
2502 <para>The eventlog commands are:
2503 <simplelist>
2504 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2505 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2506 tdb based representation of eventlogs.</member>
2507 <member>net eventlog export - Export the samba internal tdb based representation
2508 of eventlogs into an eventlog *.evt file.</member>
2509 </simplelist>
2510 </para>
2512 <refsect3>
2513 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2515 <para>
2516 Prints a eventlog *.evt file to standard output.
2517 </para>
2518 </refsect3>
2520 <refsect3>
2521 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2523 <para>
2524 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2525 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2526 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2527 defined in smb.conf.
2528 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2529 </para>
2531 </refsect3>
2533 <refsect3>
2534 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2536 <para>
2537 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2538 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2539 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2540 defined in smb.conf.
2541 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2542 </para>
2544 </refsect3>
2546 </refsect2>
2548 <refsect2>
2549 <title>DOM</title>
2551 <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.
2552 </para>
2553 <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.
2554 </para>
2556 <para>The client side support for remote join is implemented in the net dom commands which are:
2557 <simplelist>
2558 <member>net dom join - Join a remote computer into a domain.</member>
2559 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2560 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2561 </simplelist>
2562 </para>
2564 <refsect3>
2565 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2567 <para>
2568 Joins a computer into a domain. This command supports the following additional parameters:
2569 </para>
2571 <itemizedlist>
2573 <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>
2575 <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>
2577 <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>
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 join to 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 join. These additional parameters include: -S computer and -U user.
2587 </para>
2588 <para>
2589         Example:
2590         net dom join -S xp -U XP\\administrator%secret domain=MYDOM 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 join the computer into a domain called MYDOM using the MYDOM domain administrator account and password topsecret. After successful join, the computer would reboot.
2594 </para>
2596 </refsect3>
2598 <refsect3>
2599 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2601 <para>
2602 Unjoins a computer from a domain. This command supports the following additional parameters:
2603 </para>
2605 <itemizedlist>
2607 <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>
2609 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2611 <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>
2613 </itemizedlist>
2615 <para>
2616 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.
2617 </para>
2618 <para>
2619         Example:
2620         net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2621 </para>
2622 <para>
2623 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.
2624 </para>
2626 </refsect3>
2628 <refsect3>
2629 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2631 <para>
2632 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2633 </para>
2635 <itemizedlist>
2637 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2639 <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>
2641 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2643 <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>
2645 </itemizedlist>
2647 <para>
2648 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.
2649 </para>
2650 <para>
2651         Example:
2652         net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2653 </para>
2654 <para>
2655 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.
2656 </para>
2658 </refsect3>
2660 </refsect2>
2662 <refsect2>
2663 <title>G_LOCK</title>
2665 <para>Manage global locks.</para>
2667 <refsect3>
2668 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2670 <para>
2671 Execute a shell command under a global lock. This might be useful to define the
2672 order in which several shell commands will be executed. The locking information
2673 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2674 running, the locking information will be available on all cluster nodes.
2675 </para>
2677 <itemizedlist>
2678 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2679 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2680 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2681 </itemizedlist>
2682 </refsect3>
2684 <refsect3>
2685 <title>G_LOCK LOCKS</title>
2687 <para>
2688 Print a list of all currently existing locknames.
2689 </para>
2690 </refsect3>
2692 <refsect3>
2693 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2695 <para>
2696 Dump the locking table of a certain global lock.
2697 </para>
2698 </refsect3>
2700 </refsect2>
2702 <refsect2>
2703 <title>HELP [COMMAND]</title>
2705 <para>Gives usage information for the specified command.</para>
2707 </refsect2>
2709 </refsect1>
2711 <refsect1>
2712         <title>VERSION</title>
2714         <para>This man page is complete for version 3 of the Samba 
2715         suite.</para>
2716 </refsect1>
2718 <refsect1>
2719         <title>AUTHOR</title>
2720         
2721         <para>The original Samba software and related utilities 
2722         were created by Andrew Tridgell. Samba is now developed
2723         by the Samba Team as an Open Source project similar 
2724         to the way the Linux kernel is developed.</para>
2726         <para>The net manpage was written by Jelmer Vernooij.</para>
2727         
2728 </refsect1>
2730 </refentry>