librpc: Fix error path cleanups in start_rpc_host_send()
[Samba.git] / docs-xml / manpages / net.8.xml
blob4ff99e238a27963be71ff948d9f9d3b8bd7e1abb
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">&doc.version;</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">-d|--debuglevel=DEBUGLEVEL</arg>
27                 <arg choice="opt">--debug-stdout</arg>
28                 <arg choice="opt">--configfile=CONFIGFILE</arg>
29                 <arg choice="opt">--option=name=value</arg>
30                 <arg choice="opt">-l|--log-basename=LOGFILEBASE</arg>
31                 <arg choice="opt">--leak-report</arg>
32                 <arg choice="opt">--leak-report-full</arg>
33                 <arg choice="opt">-R|--name-resolve=NAME-RESOLVE-ORDER</arg>
34                 <arg choice="opt">-O|--socket-options=SOCKETOPTIONS</arg>
35                 <arg choice="opt">-m|--max-protocol=MAXPROTOCOL</arg>
36                 <arg choice="opt">-n|--netbiosname=NETBIOSNAME</arg>
37                 <arg choice="opt">--netbios-scope=SCOPE</arg>
38                 <arg choice="opt">-W|--workgroup=WORKGROUP</arg>
39                 <arg choice="opt">--realm=REALM</arg>
40                 <arg choice="opt">-U|--user=[DOMAIN/]USERNAME[%PASSWORD]</arg>
41                 <arg choice="opt">-N|--no-pass</arg>
42                 <arg choice="opt">--password=STRING</arg>
43                 <arg choice="opt">--pw-nt-hash</arg>
44                 <arg choice="opt">-A|--authentication-file=FILE</arg>
45                 <arg choice="opt">-P|--machine-pass</arg>
46                 <arg choice="opt">--simple-bind-dn=DN</arg>
47                 <arg choice="opt">--use-kerberos=desired|required|off</arg>
48                 <arg choice="opt">--use-krb5-ccache=CCACHE</arg>
49                 <arg choice="opt">--use-winbind-ccache</arg>
50                 <arg choice="opt">--client-protection=sign|encrypt|off</arg>
51                 <arg choice="opt">-V|--version</arg>
52                 <arg choice="opt">-w|--target-workgroup workgroup</arg>
53                 <arg choice="opt">-I|--ipaddress ip-address</arg>
54                 <arg choice="opt">-p|--port port</arg>
55                 <arg choice="opt">--myname</arg>
56                 <arg choice="opt">-S|--server server</arg>
57                 <arg choice="opt">--long</arg>
58                 <arg choice="opt">-v|--verbose</arg>
59                 <arg choice="opt">-f|--force</arg>
60                 <arg choice="opt">--request-timeout seconds</arg>
61                 <arg choice="opt">-t|--timeout seconds</arg>
62                 <arg choice="opt">--dns-ttl TTL-IN-SECONDS</arg>
63                 <arg choice="opt">-i|--stdin</arg>
64         </cmdsynopsis>
65 </refsynopsisdiv>
67 <refsect1>
68         <title>DESCRIPTION</title>
70         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
71         <manvolnum>7</manvolnum></citerefentry> suite.</para>
73         <para>The Samba net utility is meant to work just like the net utility 
74         available for windows and DOS. The first argument should be used 
75         to specify the protocol to use when executing a certain command. 
76         ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3) 
77         clients and RPC can be used for NT4 and Windows 2000. If this 
78         argument is omitted, net will try to determine it automatically. 
79         Not all commands are available on all protocols.
80         </para>
82 </refsect1>
84 <refsect1>
85         <title>OPTIONS</title>
87         <variablelist>
88                 <varlistentry>
89                 <term>-w|--target-workgroup target-workgroup</term>
90                 <listitem><para>
91                 Sets target workgroup or domain. You have to specify 
92                 either this option or the IP address or the name of a server.
93                 </para></listitem>
94                 </varlistentry>
96                 <varlistentry>
97                 <term>-I|--ipaddress ip-address</term>
98                 <listitem><para>
99                 IP address of target server to use. You have to
100                 specify either this option or a target workgroup or
101                 a target server.
102                 </para></listitem>
103                 </varlistentry>
105                 <varlistentry>
106                 <term>-p|--port port</term>
107                 <listitem><para>
108                 Port on the target server to connect to (usually 139 or 445). 
109                 Defaults to trying 445 first, then 139.
110                 </para></listitem>
111                 </varlistentry>
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>--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>--request-timeout 30</term>
144                 <listitem><para>
145                 Let client requests timeout after 30 seconds the default is 10
146                 seconds.
147                 </para></listitem>
148                 </varlistentry>
150                 <varlistentry>
151                 <term>-t|--timeout 30</term>
152                 <listitem><para>
153                                 Set timeout for client operations to 30 seconds.
154                 </para></listitem>
155                 </varlistentry>
157                 <varlistentry>
158                 <term>-i|--stdin</term>
159                 <listitem><para>
160                                 Take input for net commands from standard input.
161                 </para></listitem>
162                 </varlistentry>
164                 <varlistentry>
165                 <term>-T|--test</term>
166                 <listitem><para>Only test command sequence, dry-run.
167                 </para></listitem>
168                 </varlistentry>
170                 <varlistentry>
171                 <term>-F|--flags FLAGS</term>
172                 <listitem><para>Pass down integer flags to a net subcommand.
173                 </para></listitem>
174                 </varlistentry>
176                 <varlistentry>
177                 <term>-C|--comment COMMENT</term>
178                 <listitem><para>Pass down a comment string to a net subcommand.
179                 </para></listitem>
180                 </varlistentry>
182                 <varlistentry>
183                 <term>--myname MYNAME</term>
184                 <listitem><para>Use MYNAME as a requester name for a net subcommand.
185                 </para></listitem>
186                 </varlistentry>
188                 <varlistentry>
189                 <term>-c|--container CONTAINER</term>
190                 <listitem><para>Use a specific AD container for net ads operations.
191                 </para></listitem>
192                 </varlistentry>
194                 <varlistentry>
195                 <term>-M|--maxusers MAXUSERS</term>
196                 <listitem><para>Fill in the maxusers field in net rpc share operations.
197                 </para></listitem>
198                 </varlistentry>
200                 <varlistentry>
201                 <term>-r|--reboot</term>
202                 <listitem><para>Reboot a remote machine after a command has been successfully executed (e.g. in remote join operations).
203                 </para></listitem>
204                 </varlistentry>
206                 <!-- Options for net rpc vampire -->
208                 <varlistentry>
209                 <term>--force-full-repl</term>
210                 <listitem><para>
211                                 When calling "net rpc vampire keytab" this option
212                                 enforces a full re-creation of the generated keytab file.
213                 </para></listitem>
214                 </varlistentry>
216                 <varlistentry>
217                 <term>--single-obj-repl</term>
218                 <listitem><para>
219                                 When calling "net rpc vampire keytab" this option
220                                 allows one to replicate just a single object to the generated keytab file.
221                 </para></listitem>
222                 </varlistentry>
224                 <varlistentry>
225                 <term>--clean-old-entries</term>
226                 <listitem><para>
227                                 When calling "net rpc vampire keytab" this option
228                                 allows one to cleanup old entries from the generated keytab file.
229                 </para></listitem>
230                 </varlistentry>
232                 <!-- Options for net idmap -->
234                 <varlistentry>
235                 <term>--db</term>
236                 <listitem><para>Define dbfile for "net idmap" commands.
237                 </para></listitem>
238                 </varlistentry>
240                 <varlistentry>
241                 <term>--lock</term>
242                 <listitem><para>Activates locking of the dbfile for "net idmap check" command.
243                 </para></listitem>
244                 </varlistentry>
246                 <varlistentry>
247                 <term>-a|--auto</term>
248                 <listitem><para>Activates noninteractive mode in "net idmap check".
249                 </para></listitem>
250                 </varlistentry>
252                 <varlistentry>
253                 <term>--repair</term>
254                 <listitem><para>Activates repair mode in "net idmap check".
255                 </para></listitem>
256                 </varlistentry>
258                 <!-- Options for net rpc share migrate -->
260                 <varlistentry>
261                 <term>--acls</term>
262                 <listitem><para>Includes ACLs to be copied in "net rpc share migrate".
263                 </para></listitem>
264                 </varlistentry>
266                 <varlistentry>
267                 <term>--attrs</term>
268                 <listitem><para>Includes file attributes to be copied in "net rpc share migrate".
269                 </para></listitem>
270                 </varlistentry>
272                 <varlistentry>
273                 <term>--timestamps</term>
274                 <listitem><para>Includes timestamps to be copied in "net rpc share migrate".
275                 </para></listitem>
276                 </varlistentry>
278                 <varlistentry>
279                 <term>-X|--exclude DIRECTORY</term>
280                 <listitem><para>Allows one to exclude directories when copying with "net rpc share migrate".
281                 </para></listitem>
282                 </varlistentry>
284                 <varlistentry>
285                 <term>--destination SERVERNAME</term>
286                 <listitem><para>Defines the target servername of migration process (defaults to localhost).
287                 </para></listitem>
288                 </varlistentry>
290                 <!-- Options for net groupmap set -->
292                 <varlistentry>
293                 <term>-L|--local</term>
294                 <listitem><para>Sets the type of group mapping to local
295                                 (used in "net groupmap set").
296                 </para></listitem>
297                 </varlistentry>
299                 <varlistentry>
300                 <term>-D|--domain</term>
301                 <listitem><para>Sets the type of group mapping to domain
302                                 (used in "net groupmap set").
303                 </para></listitem>
304                 </varlistentry>
306                 <varlistentry>
307                 <term>-N|--ntname NTNAME</term>
308                 <listitem><para>Sets the ntname of a group mapping
309                                 (used in "net groupmap set").
310                 </para></listitem>
311                 </varlistentry>
313                 <varlistentry>
314                 <term>--rid RID</term>
315                 <listitem><para>Sets the rid of a group mapping
316                                 (used in "net groupmap set").
317                 </para></listitem>
318                 </varlistentry>
320                 <!-- Options for net registry check -->
322                 <varlistentry>
323                 <term>--reg-version REG_VERSION</term>
324                 <listitem><para>Assume database version {n|1,2,3}
325                                 (used in "net registry check").
326                 </para></listitem>
327                 </varlistentry>
329                 <varlistentry>
330                 <term>-o|--output FILENAME</term>
331                 <listitem><para>Output database file
332                                 (used in "net registry check").
333                 </para></listitem>
334                 </varlistentry>
336                 <varlistentry>
337                 <term>--wipe</term>
338                 <listitem><para>Create a new database from scratch
339                                 (used in "net registry check").
340                 </para></listitem>
341                 </varlistentry>
343                 <!-- Options for net registry import -->
345                 <varlistentry>
346                 <term>--precheck PRECHECK_DB_FILENAME</term>
347                 <listitem><para>Defines filename for database prechecking
348                                 (used in "net registry import").
349                 </para></listitem>
350                 </varlistentry>
352                 <varlistentry>
353                 <term>--no-dns-updates</term>
354                 <listitem><para>Do not perform DNS updates as part of
355                 "net ads join".
356                 </para></listitem>
357                 </varlistentry>
359                 <varlistentry>
360                 <term>--keep-account</term>
361                 <listitem><para>Prevent the machine account removal as
362                 part of "net ads leave".
363                 </para></listitem>
364                 </varlistentry>
366                 <varlistentry>
367                 <term>--json</term>
368                 <listitem><para>Report results in JSON format for
369                 "net ads info" and "net ads lookup".
370                 </para></listitem>
371                 </varlistentry>
373                 <!-- Options for net vfs stream2abouble -->
375                 <varlistentry>
376                 <term>--recursive</term>
377                 <listitem><para>Traverse a directory
378                 hierarchy.</para></listitem>
379                 </varlistentry>
381                 <varlistentry>
382                 <term>--continue</term>
383                 <listitem><para>Continue traversing a directory hierarchy in
384                 case conversion of one file fails.</para></listitem>
385                 </varlistentry>
387                 <varlistentry>
388                 <term>--follow-symlinks</term>
389                 <listitem><para>Follow symlinks encountered while traversing a
390                 directory.</para></listitem>
391                 </varlistentry>
393                 <!-- Options for net ads dns register (and ads join) -->
394                 <varlistentry>
395                 <term>--dns-ttl TTL-IN-SECONDS</term>
396                 <listitem><para>
397                 Specify the Time to Live (TTL) of DNS records.
398                 DNS records will be created or updated with the given TTL.
399                 The TTL is specified in seconds. Can be used with "net ads dns
400                 register" and "net ads join".
401                 The default is 3600 seconds.
402                 </para></listitem>
403                 </varlistentry>
405                 &cmdline.common.samba.client;
406                 &cmdline.common.connection;
407                 &cmdline.common.credentials;
408         </variablelist>
409 </refsect1>
411 <refsect1>
412 <title>COMMANDS</title>
414 <refsect2>
415 <title>CHANGESECRETPW</title>
417 <para>This command allows the Samba machine account password to be set from an external application
418 to a machine account password that has already been stored in Active Directory. DO NOT USE this command
419 unless you know exactly what you are doing. The use of this command requires that the force flag (-f)
420 be used also. There will be NO command prompt. Whatever information is piped into stdin, either by
421 typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use
422 this without care and attention as it will overwrite a legitimate machine password without warning.
423 YOU HAVE BEEN WARNED.
424 </para>
426 </refsect2>
428 <refsect2>
429         <title>TIME</title>
431         <para>The <command>NET TIME</command> command allows you to view the time on a remote server
432         or synchronise the time on the local server with the time on the remote server.</para>
434 <refsect3>
435 <title>TIME</title>
437 <para>Without any options, the <command>NET TIME</command> command 
438 displays the time on the remote server. The remote server must be
439 specified with the -S option.
440 </para>
442 </refsect3>
444 <refsect3>
445 <title>TIME SYSTEM</title>
447 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.
448 The remote server must be specified with the -S option.
449 </para>
451 </refsect3>
453 <refsect3>
454 <title>TIME SET</title>
455 <para>Tries to set the date and time of the local server to that on 
456 the remote server using <command>/bin/date</command>.
457 The remote server must be specified with the -S option.
458 </para>
460 </refsect3>
462 <refsect3>
463 <title>TIME ZONE</title>
465 <para>Displays the timezone in hours from GMT on the remote server.
466 The remote server must be specified with the -S option.
467 </para>
469 </refsect3>
470 </refsect2>
472 <refsect2>
473 <title>[RPC|ADS] JOIN [TYPE] [--no-dns-updates] [-U username[%password]]
474 [dnshostname=FQDN] [createupn=UPN] [createcomputer=OU] [machinepass=PASS]
475 [osName=string osVer=string] [options]</title>
477 <para>
478 Join a domain.  If the account already exists on the server, and 
479 [TYPE] is MEMBER, the machine will attempt to join automatically. 
480 (Assuming that the machine has been created in server manager)
481 Otherwise, a password will be prompted for, and a new account may
482 be created.</para>
484 <para>
485 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
486 joining the domain.
487 </para>
489 <para>
490 [FQDN] (ADS only) set the dnsHostName attribute during the join.
491 The default format is netbiosname.dnsdomain.
492 </para>
494 <para>
495 [UPN] (ADS only) set the principalname attribute during the join.  The default
496 format is host/netbiosname@REALM.
497 </para>
499 <para>
500 [OU] (ADS only) Precreate the computer account in a specific OU.  The
501 OU string reads from top to bottom without RDNs, and is delimited by
502 a '/'.  Please note that '\' is used for escape by both the shell
503 and ldap, so it may need to be doubled or quadrupled to pass through, 
504 and it is not used as a delimiter.
505 </para>
506 <para>
507 [PASS] (ADS only) Set a specific password on the computer account
508 being created by the join.
509 </para>
510 <para>
511 [osName=string osVer=String] (ADS only) Set the operatingSystem and
512 operatingSystemVersion attribute during the join.  Both parameters
513 must be specified for either to take effect.
514 </para>
515 </refsect2>
517 <refsect2>
518 <title>[RPC] OLDJOIN [options]</title>
520 <para>Join a domain. Use the OLDJOIN option to join the domain 
521 using the old style of domain joining - you need to create a trust 
522 account in server manager first.</para>
523 </refsect2>
525 <refsect2>
526 <title>[RPC|ADS] USER</title>
528 <refsect3>
529 <title>[RPC|ADS] USER</title>
531 <para>List all users</para>
533 </refsect3>
535 <refsect3>
536 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
538 <para>Delete specified user</para>
540 </refsect3>
542 <refsect3>
543 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
545 <para>List the domain groups of the specified user.</para>
547 </refsect3>
549 <refsect3>
550 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
552 <para>Rename specified user.</para>
554 </refsect3>
556 <refsect3>
557 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
559 <para>Add specified user.</para>
560 </refsect3>
561 </refsect2>
563 <refsect2>
564 <title>[RPC|ADS] GROUP</title>
566 <refsect3>
567 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
568 <para>List user groups.</para>
569 </refsect3>
571 <refsect3>
572 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
574 <para>Delete specified group.</para>
576 </refsect3>
578 <refsect3>
579 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
581 <para>Create specified group.</para>
583 </refsect3>
584 <refsect3>
585 <title>[ADS] LOOKUP</title>
587 <para>Lookup the closest Domain Controller in our domain and retrieve server information about it.</para>
589 </refsect3>
590 </refsect2>
592 <refsect2>
593 <title>[RAP|RPC] SHARE</title>
595 <refsect3>
596 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
598 <para>Enumerates all exported resources (network shares) on target server.</para>
600 </refsect3>
602 <refsect3>
603 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
605 <para>Adds a share from a server (makes the export active). Maxusers 
606 specifies the number of users that can be connected to the 
607 share simultaneously.</para>
609 </refsect3>
611 <refsect3>
612 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
614 <para>Delete specified share.</para>
615 </refsect3>
616 </refsect2>
618 <refsect2>
619 <title>[RPC|RAP] FILE</title>
621 <refsect3>
622 <title>[RPC|RAP] FILE</title>
624 <para>List all open files on remote server.</para>
626 </refsect3>
628 <refsect3>
629 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
631 <para>Close file with specified <replaceable>fileid</replaceable> on 
632 remote server.</para>
634 </refsect3>
636 <refsect3>
637 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
639 <para>
640 Print information on specified <replaceable>fileid</replaceable>. 
641 Currently listed are: file-id, username, locks, path, permissions.
642 </para>
644 </refsect3>
646 <refsect3>
647 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
649 <para>
650 List files opened by specified <replaceable>user</replaceable>.
651 Please note that <command>net rap file user</command> does not work
652 against Samba servers. 
653 </para>
655 </refsect3>
657 </refsect2>
659 <refsect2>
660 <title>SESSION</title>
662 <refsect3>
663 <title>RAP SESSION</title>
665 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
666 sessions on the target server.</para>
668 </refsect3>
670 <refsect3>
671 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
673 <para>Close the specified sessions.</para>
675 </refsect3>
677 <refsect3>
678 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
680 <para>Give a list with all the open files in specified session.</para>
682 </refsect3>
684 </refsect2>
686 <refsect2>
687 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
689 <para>List all servers in specified domain or workgroup. Defaults
690 to local domain.</para>
692 </refsect2>
694 <refsect2>
695 <title>RAP DOMAIN</title>
697 <para>Lists all domains and workgroups visible on the 
698 current network.</para>
700 </refsect2>
702 <refsect2>
703 <title>RAP PRINTQ</title>
705 <refsect3>
706 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
708 <para>Lists the specified print queue and print jobs on the server.
709 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all 
710 queues are listed.</para>
712 </refsect3>
714 <refsect3>
715 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
717 <para>Delete job with specified id.</para>
719 </refsect3>
721 </refsect2>
723 <refsect2>
724 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
726 <para>
727 Validate whether the specified user can log in to the 
728 remote server. If the password is not specified on the commandline, it 
729 will be prompted. 
730 </para>
732 &not.implemented;
734 </refsect2>
736 <refsect2>
737 <title>RAP GROUPMEMBER</title>
739 <refsect3>
740 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
742 <para>List all members of the specified group.</para>
744 </refsect3>
746 <refsect3>
747 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
749 <para>Delete member from group.</para>
751 </refsect3>
753 <refsect3>
754 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
756 <para>Add member to group.</para>
758 </refsect3>
760 </refsect2>
762 <refsect2>
763 <title>RAP ADMIN <replaceable>command</replaceable></title>
765 <para>Execute the specified <replaceable>command</replaceable> on 
766 the remote server. Only works with OS/2 servers.
767 </para>
769 &not.implemented;
771 </refsect2>
773 <refsect2>
774 <title>RAP SERVICE</title>
776 <refsect3>
777 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
779 <para>Start the specified service on the remote server. Not implemented yet.</para>
781 &not.implemented;
783 </refsect3>
785 <refsect3>
786 <title>RAP SERVICE STOP</title>
788 <para>Stop the specified service on the remote server.</para>
790 &not.implemented;
792 </refsect3>
794 </refsect2>
796 <refsect2>
797 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
799 <para>
800 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
801 </para>
803 </refsect2>
805 <refsect2>
806 <title>LOOKUP</title>
808 <refsect3>
809 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
811 <para>
812 Lookup the IP address of the given host with the specified type (netbios suffix). 
813 The type defaults to 0x20 (workstation).
814 </para>
816 </refsect3>
818 <refsect3>
819 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
821 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
823 </refsect3>
825 <refsect3>
826 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
828 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
829 Defaults to local realm.</para>
831 </refsect3>
833 <refsect3>
834 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
836 <para>Give IP's of Domain Controllers for specified <replaceable>
837 DOMAIN</replaceable>. Defaults to local domain.</para>
839 </refsect3>
841 <refsect3>
842 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
844 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
845 or workgroup. Defaults to local domain.</para>
847 </refsect3>
849 <refsect3>
850 <title>LOOKUP NAME [<replaceable>NAME</replaceable>]</title>
852 <para>Lookup username's sid and type for specified <replaceable>NAME</replaceable>
853 </para>
855 </refsect3>
857 <refsect3>
858 <title>LOOKUP SID [<replaceable>SID</replaceable>]</title>
860 <para>Give sid's name and type for specified <replaceable>SID</replaceable>
861 </para>
863 </refsect3>
865 <refsect3>
866 <title>LOOKUP DSGETDCNAME [<replaceable>NAME</replaceable>] [<replaceable>FLAGS</replaceable>] [<replaceable>SITENAME</replaceable>]</title>
868 <para>Give Domain Controller information for specified domain <replaceable>NAME</replaceable>
869 </para>
871 </refsect3>
873 </refsect2>
875 <refsect2>
876 <title>CACHE</title>
878 <para>Samba uses a general caching interface called 'gencache'. It 
879 can be controlled using 'NET CACHE'.</para>
881 <para>All the timeout parameters support the suffixes:
883 <simplelist>
884 <member>s - Seconds</member>
885 <member>m - Minutes</member>
886 <member>h - Hours</member>
887 <member>d - Days</member>
888 <member>w - Weeks</member>
889 </simplelist>
891 </para>
893 <refsect3>
894 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
896 <para>Add specified key+data to the cache with the given timeout.</para>
898 </refsect3>
900 <refsect3>
901 <title>CACHE DEL <replaceable>key</replaceable></title>
903 <para>Delete key from the cache.</para>
905 </refsect3>
907 <refsect3>
908 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
910 <para>Update data of existing cache entry.</para>
912 </refsect3>
914 <refsect3>
915 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
917 <para>Search for the specified pattern in the cache data.</para>
919 </refsect3>
921 <refsect3>
922 <title>CACHE LIST</title>
924 <para>
925 List all current items in the cache.
926 </para>
928 </refsect3>
930 <refsect3>
931 <title>CACHE FLUSH</title>
933 <para>Remove all the current items from the cache.</para>
935 </refsect3>
937 </refsect2>
939 <refsect2>
940 <title>GETLOCALSID [DOMAIN]</title>
942 <para>Prints the SID of the specified domain, or if the parameter is
943 omitted, the SID of the local server.</para>
945 </refsect2>
947 <refsect2>
948 <title>SETLOCALSID S-1-5-21-x-y-z</title>
950 <para>Sets SID for the local server to the specified SID.</para>
952 </refsect2>
954 <refsect2>
955 <title>GETDOMAINSID</title>
957 <para>Prints the local machine SID and the SID of the current 
958 domain.</para>
960 </refsect2>
962 <refsect2>
963 <title>SETDOMAINSID</title>
965 <para>Sets the SID of the current domain.</para>
967 </refsect2>
969 <refsect2>
970 <title>GROUPMAP</title>
972 <para>Manage the mappings between Windows group SIDs and UNIX groups.
973 Common options include:</para>
975 <itemizedlist>
976 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
977 <listitem><para>ntgroup - Name of the Windows NT group (must be
978   resolvable to a SID</para></listitem>
979 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
980 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
981 <listitem><para>type - Type of the group; either 'domain', 'local',
982   or 'builtin'</para></listitem>
983 <listitem><para>comment - Freeform text description of the group</para></listitem>
984 </itemizedlist>
986 <refsect3>
987 <title>GROUPMAP ADD</title>
989 <para>
990 Add a new group mapping entry:
991 <programlisting>
992 net groupmap add {rid=int|sid=string} unixgroup=string \
993         [type={domain|local}] [ntgroup=string] [comment=string]
994 </programlisting>
995 </para>
997 </refsect3>
999 <refsect3>
1000 <title>GROUPMAP DELETE</title>
1002 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
1004 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
1006 </refsect3>
1008 <refsect3>
1009 <title>GROUPMAP MODIFY</title>
1011 <para>Update an existing group entry.</para>
1013 <para>
1014 <programlisting>
1015 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
1016        [comment=string] [type={domain|local}]
1017 </programlisting>
1018 </para>
1019 </refsect3>
1021 <refsect3>
1022 <title>GROUPMAP LIST</title>
1024 <para>List existing group mapping entries.</para>
1026 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
1028 </refsect3>
1029 </refsect2>
1033 <refsect2>
1034 <title>MAXRID</title>
1036 <para>Prints out the highest RID currently in use on the local
1037 server (by the active 'passdb backend').
1038 </para>
1040 </refsect2>
1042 <refsect2>
1043 <title>RPC INFO</title>
1045 <para>Print information about the domain of the remote server,
1046 such as domain name, domain sid and number of users and groups.
1047 </para>
1049 </refsect2>
1051 <refsect2>
1052 <title>[RPC|ADS] TESTJOIN</title>
1054 <para>Check whether participation in a domain is still valid.</para>
1056 </refsect2>
1058 <refsect2>
1059 <title>[RPC|ADS] CHANGETRUSTPW</title>
1061 <para>Force change of domain trust password.</para>
1063 </refsect2>
1065 <refsect2>
1066 <title>RPC TRUSTDOM</title>
1068 <refsect3>
1069 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
1071 <para>Add a interdomain trust account for <replaceable>DOMAIN</replaceable>. 
1072 This is in fact a Samba account named <replaceable>DOMAIN$</replaceable> 
1073 with the account flag <constant>'I'</constant> (interdomain trust account). 
1074 This is required for incoming trusts to work. It makes Samba be a
1075 trusted domain of the foreign (trusting) domain.
1076 Users of the Samba domain will be made available in the foreign domain.
1077 If the command is used against localhost it has the same effect as 
1078 <command>smbpasswd -a -i DOMAIN</command>. Please note that both commands
1079 expect a appropriate UNIX account. 
1080 </para>
1082 </refsect3>
1084 <refsect3>
1085 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
1087 <para>Remove interdomain trust account for 
1088 <replaceable>DOMAIN</replaceable>. If it is used against localhost 
1089 it has the same effect as <command>smbpasswd -x DOMAIN$</command>. 
1090 </para>
1092 </refsect3>
1094 <refsect3>
1095 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
1097 <para>
1098 Establish a trust relationship to a trusted domain. 
1099 Interdomain account must already be created on the remote PDC.
1100 This is required for outgoing trusts to work. It makes Samba be a
1101 trusting domain of a foreign (trusted) domain.
1102 Users of the foreign domain will be made available in our domain.
1103 You'll need winbind and a working idmap config to make them
1104 appear in your system.
1105 </para>
1107 </refsect3>
1109 <refsect3>
1110 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
1111 <para>Abandon relationship to trusted domain</para>
1113 </refsect3>
1115 <refsect3>
1116 <title>RPC TRUSTDOM LIST</title>
1118 <para>List all interdomain trust relationships.</para>
1120 </refsect3>
1121 </refsect2>
1123 <refsect2>
1124 <title>RPC TRUST</title>
1126 <refsect3>
1127 <title>RPC TRUST CREATE</title>
1129 <para>Create a trust object by calling lsaCreateTrustedDomainEx2.
1130 The can be done on a single server or on two servers at once with the
1131 possibility to use a random trust password.</para>
1133 <variablelist><title>Options:</title>
1134 <varlistentry>
1135 <term>otherserver</term>
1136 <listitem><para>Domain controller of the second domain</para></listitem>
1137 </varlistentry>
1139 <varlistentry>
1140 <term>otheruser</term>
1141 <listitem><para>Admin user in the second domain</para></listitem>
1142 </varlistentry>
1144 <varlistentry>
1145 <term>otherdomainsid</term>
1146 <listitem><para>SID of the second domain</para></listitem>
1147 </varlistentry>
1149 <varlistentry>
1150 <term>other_netbios_domain</term>
1151 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
1152 </varlistentry>
1154 <varlistentry>
1155 <term>otherdomain</term>
1156 <listitem><para>DNS (full) name of the second domain</para></listitem>
1157 </varlistentry>
1159 <varlistentry>
1160 <term>trustpw</term>
1161 <listitem><para>Trust password</para></listitem>
1162 </varlistentry>
1163 </variablelist>
1165 <variablelist><title>Examples:</title>
1166 <varlistentry>
1167 <term>Create a trust object on srv1.dom1.dom for the domain dom2</term>
1168 <listitem><literallayout>
1169 net rpc trust create \
1170     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
1171     other_netbios_domain=dom2 \
1172     otherdomain=dom2.dom \
1173     trustpw=12345678 \
1174     -S srv1.dom1.dom
1175 </literallayout></listitem>
1176 </varlistentry>
1177 <varlistentry>
1178 <term>Create a trust relationship between dom1 and dom2</term>
1179 <listitem><literallayout>
1180 net rpc trust create \
1181     otherserver=srv2.dom2.test \
1182     otheruser=dom2adm \
1183     -S srv1.dom1.dom
1184 </literallayout></listitem>
1185 </varlistentry>
1186 </variablelist>
1187 </refsect3>
1189 <refsect3>
1190 <title>RPC TRUST DELETE</title>
1192 <para>Delete a trust object by calling lsaDeleteTrustedDomain.
1193 The can be done on a single server or on two servers at once.</para>
1195 <variablelist><title>Options:</title>
1196 <varlistentry>
1197 <term>otherserver</term>
1198 <listitem><para>Domain controller of the second domain</para></listitem>
1199 </varlistentry>
1201 <varlistentry>
1202 <term>otheruser</term>
1203 <listitem><para>Admin user in the second domain</para></listitem>
1204 </varlistentry>
1206 <varlistentry>
1207 <term>otherdomainsid</term>
1208 <listitem><para>SID of the second domain</para></listitem>
1209 </varlistentry>
1210 </variablelist>
1212 <variablelist><title>Examples:</title>
1213 <varlistentry>
1214 <term>Delete a trust object on srv1.dom1.dom for the domain dom2</term>
1215 <listitem><literallayout>
1216 net rpc trust delete \
1217     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
1218     -S srv1.dom1.dom
1219 </literallayout></listitem>
1220 </varlistentry>
1221 <varlistentry>
1222 <term>Delete a trust relationship between dom1 and dom2</term>
1223 <listitem><literallayout>
1224 net rpc trust delete \
1225     otherserver=srv2.dom2.test \
1226     otheruser=dom2adm \
1227     -S srv1.dom1.dom
1228 </literallayout></listitem>
1229 </varlistentry>
1230 </variablelist>
1231 </refsect3>
1233 </refsect2>
1235 <refsect2>
1236 <refsect3>
1237 <title>RPC RIGHTS</title>
1239 <para>This subcommand is used to view and manage Samba's rights assignments (also 
1240 referred to as privileges).  There are three options currently available: 
1241 <parameter>list</parameter>, <parameter>grant</parameter>, and 
1242 <parameter>revoke</parameter>.  More details on Samba's privilege model and its use
1243 can be found in the Samba-HOWTO-Collection.</para>
1245 </refsect3>
1248 </refsect2>
1250 <refsect2>
1251 <title>RPC ABORTSHUTDOWN</title>
1253 <para>Abort the shutdown of a remote server.</para>
1255 </refsect2>
1257 <refsect2>
1258 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
1260 <para>Shut down the remote server.</para>
1262 <variablelist>
1263 <varlistentry>
1264 <term>-r</term>
1265 <listitem><para>
1266 Reboot after shutdown.
1267 </para></listitem>
1268 </varlistentry>
1270 <varlistentry>
1271 <term>-f</term>
1272 <listitem><para>
1273 Force shutting down all applications.
1274 </para></listitem>
1275 </varlistentry>
1277 <varlistentry>
1278 <term>-t timeout</term>
1279 <listitem><para>
1280 Timeout before system will be shut down. An interactive 
1281 user of the system can use this time to cancel the shutdown.
1282 </para></listitem>
1283 </varlistentry>
1285 <varlistentry>
1286 <term>-C message</term>
1287 <listitem><para>Display the specified message on the screen to 
1288 announce the shutdown.</para></listitem>
1289 </varlistentry>
1290 </variablelist>
1292 </refsect2>
1294 <refsect2>
1295 <title>RPC SAMDUMP</title>
1297 <para>Print out sam database of remote server. You need
1298 to run this against the PDC, from a Samba machine joined as a BDC. </para>
1299 </refsect2>
1301 <refsect2>
1302 <title>RPC VAMPIRE</title>
1304 <para>Export users, aliases and groups from remote server to 
1305 local server.  You need to run this against the PDC, from a Samba machine joined as a BDC. 
1306 This vampire command cannot be used against an Active Directory, only
1307 against an NT4 Domain Controller.
1308 </para>
1309 </refsect2>
1311 <refsect2>
1312 <title>RPC VAMPIRE KEYTAB</title>
1314 <para>Dump remote SAM database to local Kerberos keytab file.
1315 </para>
1316 </refsect2>
1318 <refsect2>
1319 <title>RPC VAMPIRE LDIF</title>
1321 <para>Dump remote SAM database to local LDIF file or standard output.
1322 </para>
1323 </refsect2>
1325 <refsect2>
1326 <title>RPC GETSID</title>
1328 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
1330 </refsect2>
1332 <refsect2>
1334 <title>ADS GPO</title>
1335 <refsect3>
1336 <title>ADS GPO APPLY &lt;USERNAME|MACHINENAME&gt; </title>
1337 <para>Apply GPOs for a username or machine name. Either username or machine name should be provided to the command, not both. </para>
1338 </refsect3>
1340 <refsect3>
1341 <title>ADS GPO GETGPO [<replaceable>GPO</replaceable>]</title>
1342 <para>List specified GPO.</para>
1343 </refsect3>
1345 <refsect3>
1346 <title>ADS GPO LINKADD [<replaceable>LINKDN</replaceable>] [<replaceable>GPODN</replaceable>]</title>
1347 <para>Link a container to a GPO. <replaceable>LINKDN</replaceable> Container to link to a GPO. <replaceable>GPODN</replaceable> GPO to link container to. DNs must be provided properly escaped. See RFC 4514 for details.</para>
1348 </refsect3>
1350 <refsect3>
1351 <title>ADS GPO LINKGET [<replaceable>CONTAINER</replaceable>]</title>
1352 <para>Lists gPLink of a container.</para>
1353 </refsect3>
1355 <refsect3>
1356 <title>ADS GPO LIST &lt;USERNAME|MACHINENAME&gt; </title>
1357 <para>Lists all GPOs for a username or machine name. Either username or machine name should be provided to the command, not both. </para>
1358 </refsect3>
1360 <refsect3>
1361 <title>ADS GPO LISTALL</title>
1362 <para>Lists all GPOs on a DC.</para>
1363 </refsect3>
1365 <refsect3>
1366 <title>ADS GPO REFRESH [<replaceable>USERNAME</replaceable>] [<replaceable>MACHINENAME</replaceable>]</title>
1367 <para>Lists all GPOs assigned to an account and download them. <replaceable>USERNAME</replaceable> User to refresh GPOs for. <replaceable>MACHINENAME</replaceable> Machine to refresh GPOs for.</para>
1368 </refsect3>
1370 </refsect2>
1372 <refsect2>
1374 <title>ADS DNS</title>
1376 <refsect3>
1377 <title>ADS DNS REGISTER [HOSTNAME [IP [IP.....]]]</title>
1378 <para>Add host dns entry to Active Directory.</para>
1379 </refsect3>
1381 <refsect3>
1382 <title>ADS DNS UNREGISTER &lt;HOSTNAME&gt;</title>
1383 <para>Remove host dns entry from Active Directory.</para>
1384 </refsect3>
1386 </refsect2>
1388 <refsect2>
1389 <title>ADS LEAVE [--keep-account]</title>
1391 <para>Make the remote host leave the domain it is part of. </para>
1393 </refsect2>
1395 <refsect2>
1396 <title>ADS STATUS</title>
1398 <para>Print out status of machine account of the local machine in ADS.
1399 Prints out quite some debug info. Aimed at developers, regular 
1400 users should use <command>NET ADS TESTJOIN</command>.</para>
1402 </refsect2>
1404 <refsect2>
1405 <title>ADS PRINTER</title>
1407 <refsect3>
1408 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1410 <para>
1411 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the 
1412 server name defaults to the local host.</para>
1414 </refsect3>
1416 <refsect3>
1417 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1419 <para>Publish specified printer using ADS.</para>
1421 </refsect3>
1423 <refsect3>
1424 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1426 <para>Remove specified printer from ADS directory.</para>
1428 </refsect3>
1430 </refsect2>
1432 <refsect2>
1433 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1435 <para>Perform a raw LDAP search on a ADS server and dump the results. The 
1436 expression is a standard LDAP search expression, and the 
1437 attributes are a list of LDAP fields to show in the results.</para>
1439 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1440 </para>
1442 </refsect2>
1444 <refsect2>
1445 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1447 <para>
1448 Perform a raw LDAP search on a ADS server and dump the results. The 
1449 DN standard LDAP DN, and the attributes are a list of LDAP fields 
1450 to show in the result. 
1451 </para>
1453 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1455 </refsect2>
1457 <refsect2>
1458 <title>ADS KEYTAB <replaceable>CREATE</replaceable></title>
1460 <para>
1461 Creates a new keytab file if one doesn't exist with default entries. Default
1462 entries are kerberos principals created from the machinename of the
1463 client, the UPN (if it exists) and any Windows SPN(s) associated with the
1464 computer AD account for the client. If a keytab file already exists then only
1465 missing kerberos principals from the default entries are added. No changes
1466 are made to the computer AD account.
1467 </para>
1468 </refsect2>
1470 <refsect2>
1471 <title>ADS KEYTAB <replaceable>ADD</replaceable> <replaceable>(principal | machine | serviceclass | windows SPN</replaceable></title>
1473 <para>
1474 Adds a new keytab entry, the entry can be either;
1475   <variablelist>
1476     <varlistentry><term>kerberos principal</term>
1477     <listitem><para>
1478       A kerberos principal (identified by the presence of '@') is just
1479       added to the keytab file.
1480     </para></listitem>
1481     </varlistentry>
1482     <varlistentry><term>machinename</term>
1483     <listitem><para>
1484       A machinename (identified by the trailing '$') is used to create a
1485       a kerberos principal 'machinename@realm' which is added to the
1486       keytab file.
1487     </para></listitem>
1488     </varlistentry>
1489     <varlistentry><term>serviceclass</term>
1490     <listitem><para>
1491     A serviceclass (such as 'cifs', 'html' etc.) is used to create a pair
1492     of kerberos principals 'serviceclass/fully_qualified_dns_name@realm' &amp;
1493     'serviceclass/netbios_name@realm' which are added to the keytab file.
1494     </para></listitem>
1495     </varlistentry>
1496     <varlistentry><term>Windows SPN</term>
1497     <listitem><para>
1498     A Windows SPN is of the format 'serviceclass/host:port', it is used to
1499     create a kerberos principal 'serviceclass/host@realm' which will
1500     be written to the keytab file.
1501     </para></listitem>
1502     </varlistentry>
1503   </variablelist>
1504 </para>
1505 <para>
1506 Unlike old versions no computer AD objects are modified by this command. To
1507 preserve the behaviour of older clients 'net ads keytab ad_update_ads' is
1508 available.
1509 </para>
1510 </refsect2>
1512 <refsect2>
1513 <title>ADS KEYTAB <replaceable>ADD_UPDATE_ADS</replaceable> <replaceable>(principal | machine | serviceclass | windows SPN</replaceable></title>
1515 <para>
1516 Adds a new keytab entry (see section for net ads keytab add). In addition to
1517 adding entries to the keytab file corresponding Windows SPNs are created
1518 from the entry passed to this command. These SPN(s) added to the AD computer
1519 account object associated with the client machine running this command for
1520 the following entry types;
1521   <variablelist>
1522     <varlistentry><term>serviceclass</term>
1523     <listitem><para>
1524     A serviceclass (such as 'cifs', 'html' etc.) is used to create a
1525     pair of Windows SPN(s) 'param/full_qualified_dns' &amp;
1526     'param/netbios_name' which are added to the AD computer account object
1527    for this client.
1528     </para></listitem>
1529     </varlistentry>
1530     <varlistentry><term>Windows SPN</term>
1531     <listitem><para>
1532     A Windows SPN is of the format 'serviceclass/host:port', it is
1533     added as passed to the AD computer account object for this client.
1534     </para></listitem>
1535     </varlistentry>
1536   </variablelist>
1537 </para>
1538 </refsect2>
1540 <refsect2>
1541 <title>ADS setspn <replaceable>SETSPN LIST [machine]</replaceable></title>
1543 <para>
1544    Lists the Windows SPNs stored in the 'machine' Windows AD Computer object.
1545    If 'machine' is not specified then computer account for this client is used
1546    instead.
1547 </para>
1548 </refsect2>
1550 <refsect2>
1551 <title>ADS setspn <replaceable>SETSPN ADD SPN [machine]</replaceable></title>
1553 <para>
1554    Adds the specified Windows SPN to the 'machine' Windows AD Computer object.
1555    If 'machine' is not specified then computer account for this client is used
1556    instead.
1557 </para>
1558 </refsect2>
1561 <refsect2>
1562 <title>ADS setspn <replaceable>SETSPN DELETE SPN [machine]</replaceable></title>
1564 <para>
1565    DELETE the specified Window SPN from the 'machine' Windows AD Computer
1566    object. If 'machine' is not specified then computer account for this
1567    client is used
1568    instead.
1569 </para>
1571 </refsect2>
1573 <refsect2>
1574 <title>ADS WORKGROUP</title>
1576 <para>Print out workgroup name for specified kerberos realm.</para>
1578 </refsect2>
1580 <refsect2>
1581         <title>ADS ENCTYPES</title>
1583 <para>
1584         List, modify or delete the value of the "msDS-SupportedEncryptionTypes" attribute of an account in AD.
1585 </para>
1587 <para>
1588         This attribute allows one 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:
1589 </para>
1591 <para>0x00000001 DES-CBC-CRC</para>
1592 <para>0x00000002 DES-CBC-MD5</para>
1593 <para>0x00000004 RC4-HMAC</para>
1594 <para>0x00000008 AES128-CTS-HMAC-SHA1-96</para>
1595 <para>0x00000010 AES256-CTS-HMAC-SHA1-96</para>
1597 </refsect2>
1599 <refsect2>
1600         <title>ADS ENCTYPES LIST <replaceable>&lt;ACCOUNTNAME&gt;</replaceable></title>
1602 <para>
1603         List the value of the "msDS-SupportedEncryptionTypes" attribute of a given account.
1604 </para>
1606 <para>Example: <userinput>net ads enctypes list Computername</userinput></para>
1608 </refsect2>
1610 <refsect2>
1611         <title>ADS ENCTYPES SET <replaceable>&lt;ACCOUNTNAME&gt;</replaceable> <replaceable>[enctypes]</replaceable></title>
1613 <para>
1614         Set the value of the "msDS-SupportedEncryptionTypes" attribute of the LDAP object of ACCOUNTNAME to a given value. If the value is omitted, the value is set to 31 which enables all the currently supported encryption types.
1615 </para>
1617 <para>Example: <userinput>net ads enctypes set Computername 24</userinput></para>
1619 </refsect2>
1621 <refsect2>
1622         <title>ADS ENCTYPES DELETE <replaceable>&lt;ACCOUNTNAME&gt;</replaceable></title>
1624 <para>
1625         Deletes the "msDS-SupportedEncryptionTypes" attribute of the LDAP object of ACCOUNTNAME.
1626 </para>
1628 <para>Example: <userinput>net ads enctypes set Computername 24</userinput></para>
1630 </refsect2>
1633 <refsect2>
1634 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
1636 <para>
1637 (Re)Create a BUILTIN group.
1638 Only a wellknown set of BUILTIN groups can be created with this command.
1639 This is the list of currently recognized group names: Administrators,
1640 Users, Guests, Power Users, Account Operators, Server Operators, Print
1641 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1642 compatible Access.
1644 This command requires a running Winbindd with idmap allocation properly
1645 configured. The group gid will be allocated out of the winbindd range.
1646 </para>
1648 </refsect2>
1650 <refsect2>
1651 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
1653 <para>
1654 Create a LOCAL group (also known as Alias).
1656 This command requires a running Winbindd with idmap allocation properly
1657 configured. The group gid will be allocated out of the winbindd range.
1658 </para>
1660 </refsect2>
1662 <refsect2>
1663 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
1665 <para>
1666 Delete an existing LOCAL group (also known as Alias).
1668 </para>
1670 </refsect2>
1672 <refsect2>
1673 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
1675 <para>
1676 Map an existing Unix group and make it a Domain Group, the domain group
1677 will have the same name.
1678 </para>
1680 </refsect2>
1682 <refsect2>
1683 <title>SAM UNMAPUNIXGROUP &lt;NAME&gt;</title>
1685 <para>
1686 Remove an existing group mapping entry.
1687 </para>
1689 </refsect2>
1691 <refsect2>
1692 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1694 <para>
1695 Add a member to a Local group. The group can be specified only by name,
1696 the member can be specified by name or SID.
1697 </para>
1699 </refsect2>
1701 <refsect2>
1702 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1704 <para>
1705 Remove a member from a Local group. The group and the member must be
1706 specified by name.
1707 </para>
1709 </refsect2>
1711 <refsect2>
1712 <title>SAM LISTMEM &lt;GROUP&gt;</title>
1714 <para>
1715 List Local group members. The group must be specified by name.
1716 </para>
1718 </refsect2>
1720 <refsect2>
1721 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
1723 <para>
1724 List the specified set of accounts by name. If verbose is specified,
1725 the rid and description is also provided for each account.
1726 </para>
1728 </refsect2>
1730 <refsect2>
1731 <title>SAM RIGHTS LIST</title>
1733 <para>
1734 List all available privileges.
1735 </para>
1737 </refsect2>
1739 <refsect2>
1740 <title>SAM RIGHTS GRANT &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1742 <para>
1743 Grant one or more privileges to a user.
1744 </para>
1746 </refsect2>
1748 <refsect2>
1749 <title>SAM RIGHTS REVOKE &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1751 <para>
1752 Revoke one or more privileges from a user.
1753 </para>
1755 </refsect2>
1757 <refsect2>
1758 <title>SAM SHOW &lt;NAME&gt;</title>
1760 <para>
1761 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1762 account.
1763 </para>
1765 </refsect2>
1767 <refsect2>
1768 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1770 <para>
1771 Set the home directory for a user account.
1772 </para>
1774 </refsect2>
1776 <refsect2>
1777 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1779 <para>
1780 Set the profile path for a user account.
1781 </para>
1783 </refsect2>
1785 <refsect2>
1786 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1788 <para>
1789 Set the comment for a user or group account.
1790 </para>
1792 </refsect2>
1794 <refsect2>
1795 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1797 <para>
1798 Set the full name for a user account.
1799 </para>
1801 </refsect2>
1803 <refsect2>
1804 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1806 <para>
1807 Set the logon script for a user account.
1808 </para>
1810 </refsect2>
1812 <refsect2>
1813 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1815 <para>
1816 Set the home drive for a user account.
1817 </para>
1819 </refsect2>
1821 <refsect2>
1822 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1824 <para>
1825 Set the workstations a user account is allowed to log in from.
1826 </para>
1828 </refsect2>
1830 <refsect2>
1831 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1833 <para>
1834 Set the "disabled" flag for a user account.
1835 </para>
1837 </refsect2>
1839 <refsect2>
1840 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1842 <para>
1843 Set the "password not required" flag for a user account.
1844 </para>
1846 </refsect2>
1848 <refsect2>
1849 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1851 <para>
1852 Set the "autolock" flag for a user account.
1853 </para>
1855 </refsect2>
1857 <refsect2>
1858 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1860 <para>
1861 Set the "password do not expire" flag for a user account.
1862 </para>
1864 </refsect2>
1866 <refsect2>
1867 <title>SAM SET PWDMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1869 <para>
1870 Set or unset the "password must change" flag for a user account.
1871 </para>
1873 </refsect2>
1875 <refsect2>
1876 <title>SAM POLICY LIST</title>
1878 <para>
1879 List the available account policies.
1880 </para>
1882 </refsect2>
1884 <refsect2>
1885 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1887 <para>
1888 Show the account policy value.
1889 </para>
1891 </refsect2>
1893 <refsect2>
1894 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1896 <para>
1897 Set a value for the account policy.
1898 Valid values can be: "forever", "never", "off", or a number.
1899 </para>
1901 </refsect2>
1903 <refsect2>
1904 <title>SAM PROVISION</title>
1906 <para>
1907 Only available if ldapsam:editposix is set and winbindd is running.
1908 Properly populates the ldap tree with the basic accounts (Administrator)
1909 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1910 </para>
1912 </refsect2>
1914 <refsect2>
1915 <title>IDMAP DUMP &lt;local tdb file name&gt;</title>
1917 <para>
1918 Dumps the mappings contained in the local tdb file specified.
1919 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1920 </para>
1922 </refsect2>
1924 <refsect2>
1925 <title>IDMAP RESTORE [input file]</title>
1927 <para>
1928 Restore the mappings from the specified file or stdin.
1929 </para>
1931 </refsect2>
1933 <refsect2>
1934 <title>IDMAP SET SECRET &lt;DOMAIN&gt; &lt;secret&gt;</title>
1936 <para>
1937 Store a secret for the specified domain, used primarily for domains
1938 that use idmap_ldap as a backend. In this case the secret is used
1939 as the password for the user DN used to bind to the ldap server.
1940 </para>
1942 </refsect2>
1944 <refsect2>
1945 <title>IDMAP SET RANGE &lt;RANGE&gt; &lt;SID&gt; [index] [--db=&lt;DB&gt;]</title>
1947 <para>
1948 Store a domain-range mapping for a given domain (and index) in autorid database.
1949 </para>
1951 </refsect2>
1953 <refsect2>
1954 <title>IDMAP SET CONFIG &lt;config&gt; [--db=&lt;DB&gt;]</title>
1956 <para>
1957 Update CONFIG entry in autorid database.
1958 </para>
1960 </refsect2>
1962 <refsect2>
1963 <title>IDMAP GET RANGE &lt;SID&gt; [index] [--db=&lt;DB&gt;]</title>
1965 <para>
1966 Get the range for a given domain and index from autorid database.
1967 </para>
1969 </refsect2>
1971 <refsect2>
1972 <title>IDMAP GET RANGES [&lt;SID&gt;] [--db=&lt;DB&gt;]</title>
1974 <para>
1975 Get ranges for all domains or for one identified by given SID.
1976 </para>
1978 </refsect2>
1980 <refsect2>
1981 <title>IDMAP GET CONFIG [--db=&lt;DB&gt;]</title>
1983 <para>
1984 Get CONFIG entry from autorid database.
1985 </para>
1987 </refsect2>
1989 <refsect2>
1991 <title>IDMAP DELETE MAPPING [-f] [--db=&lt;DB&gt;] &lt;ID&gt;</title>
1993 <para>
1994 Delete a mapping sid &lt;-&gt; gid or sid &lt;-&gt; uid from the IDMAP database.
1995 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".
1996 Use -f to delete an invalid partial mapping &lt;ID&gt; -&gt; xx
1997 </para>
1998 <para>
1999   Use "smbcontrol all idmap ..." to notify running smbd instances.
2000   See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
2001   <manvolnum>1</manvolnum></citerefentry> manpage for details.
2002 </para>
2003 </refsect2>
2005 <refsect2>
2006 <title>IDMAP DELETE RANGE [-f] [--db=&lt;TDB&gt;] &lt;RANGE&gt;|(&lt;SID&gt; [&lt;INDEX&gt;])</title>
2008 <para>
2009 Delete a domain range mapping identified by 'RANGE' or "domain SID and INDEX" from autorid database.
2010 Use -f to delete invalid mappings.
2011 </para>
2013 </refsect2>
2015 <refsect2>
2016 <title>IDMAP DELETE RANGES [-f] [--db=&lt;TDB&gt;] &lt;SID&gt;</title>
2018 <para>
2019 Delete all domain range mappings for a domain identified by SID.
2020 Use -f to delete invalid mappings.
2021 </para>
2023 </refsect2>
2025 <refsect2>
2027 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=&lt;DB&gt;]</title>
2029 <para>
2030   Check and repair the IDMAP database. If no option is given a read only check
2031   of the database is done. Among others an interactive or automatic repair mode
2032   may be chosen with one of the following options:
2034   <variablelist>
2035     <varlistentry><term>-r|--repair</term>
2036     <listitem><para>
2037       Interactive repair mode, ask a lot of questions.
2038     </para></listitem>
2039     </varlistentry>
2041     <varlistentry><term>-a|--auto</term>
2042     <listitem><para>
2043       Noninteractive repair mode, use default answers.
2044     </para></listitem>
2045     </varlistentry>
2047     <varlistentry><term>-v|--verbose</term>
2048       <listitem><para>
2049         Produce more output.
2050       </para></listitem>
2051     </varlistentry>
2053     <varlistentry><term>-f|--force</term>
2054       <listitem><para>
2055         Try to apply changes, even if they do not apply cleanly.
2056       </para></listitem>
2057     </varlistentry>
2059     <varlistentry><term>-T|--test</term>
2060       <listitem><para>
2061         Dry run, show what changes would be made but don't touch anything.
2062       </para></listitem>
2063     </varlistentry>
2065     <varlistentry><term>-l|--lock</term>
2066       <listitem><para>
2067         Lock the database while doing the check.
2068       </para></listitem>
2069     </varlistentry>
2071     <varlistentry><term>--db &lt;DB&gt;</term>
2072       <listitem><para>
2073         Check the specified database.
2074       </para></listitem>
2075     </varlistentry>
2076     <varlistentry><term></term>
2077       <listitem><para>
2078       </para></listitem>
2079     </varlistentry>
2080   </variablelist>
2082   It reports about the finding of the following errors:
2084   <variablelist>
2085     <varlistentry><term>Missing reverse mapping:</term>
2086     <listitem><para>
2087       A record with mapping A-&gt;B where there is no B-&gt;A. Default action
2088       in repair mode is to "fix" this by adding the reverse mapping.
2089     </para></listitem>
2090     </varlistentry>
2092     <varlistentry><term>Invalid mapping:</term>
2093     <listitem><para>
2094       A record with mapping A-&gt;B where B-&gt;C. Default action
2095       is to "delete" this record.
2096     </para></listitem>
2097   </varlistentry>
2099   <varlistentry><term>Missing or invalid HWM:</term>
2100     <listitem><para>
2101       A high water mark is not at least equal to the largest ID in the
2102       database. Default action is to "fix" this by setting it to the
2103       largest ID found +1.
2104     </para></listitem>
2105   </varlistentry>
2107   <varlistentry><term>Invalid record:</term>
2108     <listitem><para>
2109       Something we failed to parse. Default action is to "edit" it
2110       in interactive and "delete" it in automatic mode.
2111     </para></listitem>
2112   </varlistentry>
2113 </variablelist>
2114 </para>
2115 </refsect2>
2118 <refsect2>
2119 <title>USERSHARE</title>
2121 <para>Starting with version 3.0.23, a Samba server now supports the ability for
2122 non-root users to add user defined shares to be exported using the "net usershare"
2123 commands.
2124 </para>
2126 <para>
2127 To set this up, first set up your &smb.conf; by adding to the [global] section:
2129 usershare path = /usr/local/samba/lib/usershares
2131 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
2132 set the group owner to the UNIX group who should have the ability to create usershares,
2133 for example a group called "serverops".
2135 Set the permissions on /usr/local/samba/lib/usershares to 01770.
2137 (Owner and group all access, no access for others, plus the sticky bit,
2138 which means that a file in that directory can be renamed or deleted only
2139 by the owner of the file).
2141 Finally, tell smbd how many usershares you will allow by adding to the [global]
2142 section of &smb.conf; a line such as :
2144 usershare max shares = 100.
2146 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
2147 can create user defined shares on demand using the commands below.
2148 </para>
2150 <para>The usershare commands are:
2152 <simplelist>
2153 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
2154 <member>net usershare delete sharename - to delete a user defined share.</member>
2155 <member>net usershare info [--long] [wildcard sharename] - to print info about a user defined share.</member>
2156 <member>net usershare list [--long] [wildcard sharename] - to list user defined shares.</member>
2157 </simplelist>
2159 </para>
2161 <refsect3>
2162 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
2164 <para>
2165 Add or replace a new user defined share, with name "sharename".
2166 </para>
2168 <para>
2169 "path" specifies the absolute pathname on the system to be exported.
2170 Restrictions may be put on this, see the global &smb.conf; parameters:
2171 "usershare owner only", "usershare prefix allow list", and
2172 "usershare prefix deny list".
2173 </para>
2175 <para>
2176 The optional "comment" parameter is the comment that will appear
2177 on the share when browsed to by a client.
2178 </para>
2180 <para>The optional "acl" field
2181 specifies which users have read and write access to the entire share.
2182 Note that guest connections are not allowed unless the &smb.conf; parameter
2183 "usershare allow guests" has been set. The definition of a user
2184 defined share acl is: "user:permission", where user is a valid
2185 username on the system and permission can be "F", "R", or "D".
2186 "F" stands for "full permissions", ie. read and write permissions.
2187 "D" stands for "deny" for a user, ie. prevent this user from accessing
2188 this share.
2189 "R" stands for "read only", ie. only allow read access to this
2190 share (no creation of new files or directories or writing to files).
2191 </para>
2193 <para>
2194 The default if no "acl" is given is "Everyone:R", which means any 
2195 authenticated user has read-only access.
2196 </para>
2198 <para>
2199 The optional "guest_ok" has the same effect as the parameter of the
2200 same name in &smb.conf;, in that it allows guest access to this user
2201 defined share. This parameter is only allowed if the global parameter
2202 "usershare allow guests" has been set to true in the &smb.conf;.
2203 </para>
2205 <para>
2206 There is no separate command to modify an existing user defined share,
2207 just use the "net usershare add [sharename]" command using the same
2208 sharename as the one you wish to modify and specify the new options
2209 you wish. The Samba smbd daemon notices user defined share modifications
2210 at connect time so will see the change immediately, there is no need
2211 to restart smbd on adding, deleting or changing a user defined share.
2212 </para>
2213 </refsect3>
2215 <refsect3>
2216 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
2218 <para>
2219 Deletes the user defined share by name. The Samba smbd daemon
2220 immediately notices this change, although it will not disconnect
2221 any users currently connected to the deleted share.
2222 </para>
2224 </refsect3>
2226 <refsect3>
2227 <title>USERSHARE INFO <replaceable>[--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
2229 <para>
2230 Get info on user defined shares owned by the current user matching the given pattern, or all users.
2231 </para>
2233 <para>
2234 net usershare info on its own dumps out info on the user defined shares that were
2235 created by the current user, or restricts them to share names that match the given
2236 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
2237 If the '--long' option is also given, it prints out info on user defined
2238 shares created by other users.
2239 </para>
2241 <para>
2242 The information given about a share looks like:
2244 [foobar]
2245 path=/home/jeremy
2246 comment=testme
2247 usershare_acl=Everyone:F
2248 guest_ok=n
2250 And is a list of the current settings of the user defined share that can be
2251 modified by the "net usershare add" command.
2252 </para>
2254 </refsect3>
2256 <refsect3>
2257 <title>USERSHARE LIST <replaceable>[--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
2259 <para>
2260 List all the user defined shares owned by the current user matching the given pattern, or all users.
2261 </para>
2263 <para>
2264 net usershare list on its own list out the names of the user defined shares that were
2265 created by the current user, or restricts the list to share names that match the given
2266 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
2267 If the '--long' option is also given, it includes the names of user defined
2268 shares created by other users.
2269 </para>
2271 </refsect3>
2273 </refsect2>
2275 <refsect2>
2276 <title>[RPC] CONF</title>
2278 <para>Starting with version 3.2.0, a Samba server can be configured by data
2279 stored in registry. This configuration data can be edited with the new "net
2280 conf" commands. There is also the possibility to configure a remote Samba server
2281 by enabling the RPC conf mode and specifying the address of the remote server.
2282 </para>
2284 <para>
2285 The deployment of this configuration data can be activated in two levels from the
2286 <emphasis>&smb.conf;</emphasis> file: Share definitions from registry are
2287 activated by setting <parameter>registry shares</parameter> to
2288 <quote>yes</quote> in the [global] section and global configuration options are
2289 activated by setting <smbconfoption name="include">registry</smbconfoption> in
2290 the [global] section for a mixed configuration or by setting
2291 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
2292 section for a registry-only configuration.
2293 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
2294 <manvolnum>5</manvolnum></citerefentry> manpage for details.
2295 </para>
2297 <para>The conf commands are:
2298 <simplelist>
2299 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
2300 format.</member>
2301 <member>net [rpc] conf import - Import configuration from file in smb.conf
2302 format.</member>
2303 <member>net [rpc] conf listshares - List the registry shares.</member>
2304 <member>net [rpc] conf drop - Delete the complete configuration from
2305 registry.</member>
2306 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
2307 <member>net [rpc] conf addshare - Create a new registry share.</member>
2308 <member>net [rpc] conf delshare - Delete a registry share.</member>
2309 <member>net [rpc] conf setparm - Store a parameter.</member>
2310 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
2311 <member>net [rpc] conf delparm - Delete a parameter.</member>
2312 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
2313 <member>net [rpc] conf setincludes - Set includes for a share.</member>
2314 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
2315 </simplelist>
2316 </para>
2318 <refsect3>
2319 <title>[RPC] CONF LIST</title>
2321 <para>
2322 Print the configuration data stored in the registry in a smb.conf-like format to
2323 standard output.
2324 </para>
2325 </refsect3>
2327 <refsect3>
2328 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
2330 <para>
2331 This command imports configuration from a file in smb.conf format.
2332 If a section encountered in the input file is present in registry,
2333 its contents is replaced. Sections of registry configuration that have
2334 no counterpart in the input file are not affected. If you want to delete these,
2335 you will have to use the "net conf drop" or "net conf delshare" commands.
2336 Optionally, a section may be specified to restrict the effect of the
2337 import command to that specific section. A test mode is enabled by specifying
2338 the parameter "-T" on the commandline. In test mode, no changes are made to the
2339 registry, and the resulting configuration is printed to standard output instead.
2340 </para>
2341 </refsect3>
2343 <refsect3>
2344 <title>[RPC] CONF LISTSHARES</title>
2346 <para>
2347 List the names of the shares defined in registry.
2348 </para>
2349 </refsect3>
2351 <refsect3>
2352 <title>[RPC] CONF DROP</title>
2354 <para>
2355 Delete the complete configuration data from registry.
2356 </para>
2357 </refsect3>
2359 <refsect3>
2360 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
2362 <para>
2363 Show the definition of the share or section specified. It is valid to specify
2364 "global" as sharename to retrieve the global configuration options from
2365 registry.
2366 </para>
2367 </refsect3>
2369 <refsect3>
2370 <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>
2372 <para>Create a new share definition in registry.
2373 The sharename and path have to be given. The share name may
2374 <emphasis>not</emphasis> be "global". Optionally, values for the very
2375 common options "writeable", "guest ok" and a "comment" may be specified.
2376 The same result may be obtained by a sequence of "net conf setparm"
2377 commands.
2378 </para>
2379 </refsect3>
2381 <refsect3>
2382 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
2384 <para>
2385 Delete a share definition from registry.
2386 </para>
2387 </refsect3>
2389 <refsect3>
2390 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
2392 <para>
2393 Store a parameter in registry. The section may be global or a sharename.
2394 The section is created if it does not exist yet.
2395 </para>
2396 </refsect3>
2398 <refsect3>
2399 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2401 <para>
2402 Show a parameter stored in registry.
2403 </para>
2404 </refsect3>
2406 <refsect3>
2407 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2409 <para>
2410 Delete a parameter stored in registry.
2411 </para>
2412 </refsect3>
2414 <refsect3>
2415 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
2417 <para>
2418 Get the list of includes for the provided section (global or share).
2419 </para>
2421 <para>
2422 Note that due to the nature of the registry database and the nature of include directives,
2423 the includes need special treatment: Parameters are stored in registry by the parameter
2424 name as valuename, so there is only ever one instance of a parameter per share.
2425 Also, a specific order like in a text file is not guaranteed. For all real
2426 parameters, this is perfectly ok, but the include directive is rather a meta
2427 parameter, for which, in the smb.conf text file, the place where it is specified
2428 between the other parameters is very important. This can not be achieved by the
2429 simple registry smbconf data model, so there is one ordered list of includes
2430 per share, and this list is evaluated after all the parameters of the share.
2431 </para>
2433 <para>
2434 Further note that currently, only files can be included from registry
2435 configuration. In the future, there will be the ability to include configuration
2436 data from other registry keys.
2437 </para>
2438 </refsect3>
2440 <refsect3>
2441 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
2443 <para>
2444 Set the list of includes for the provided section (global or share) to the given
2445 list of one or more filenames. The filenames may contain the usual smb.conf
2446 macros like %I.
2447 </para>
2448 </refsect3>
2450 <refsect3>
2451 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
2453 <para>
2454 Delete the list of includes from the provided section (global or share).
2455 </para>
2456 </refsect3>
2458 </refsect2>
2460 <refsect2>
2461 <title>REGISTRY</title>
2462 <para>
2463 Manipulate Samba's registry.
2464 </para>
2466 <para>The registry commands are:
2467 <simplelist>
2468 <member>net registry enumerate   - Enumerate registry keys and values.</member>
2469 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
2470 <member>net registry createkey   - Create a new registry key.</member>
2471 <member>net registry deletekey   - Delete a registry key.</member>
2472 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
2473 <member>net registry getvalue    - Print a registry value.</member>
2474 <member>net registry getvalueraw - Print a registry value (raw format).</member>
2475 <member>net registry setvalue    - Set a new registry value.</member>
2476 <member>net registry increment   - Increment a DWORD registry value under a lock.
2477 </member>
2478 <member>net registry deletevalue - Delete a registry value.</member>
2479 <member>net registry getsd       - Get security descriptor.</member>
2480 <member>net registry getsd_sdd1  - Get security descriptor in sddl format.
2481 </member>
2482 <member>net registry setsd_sdd1  - Set security descriptor from sddl format
2483 string.</member>
2484 <member>net registry import      - Import a registration entries (.reg) file.
2485 </member>
2486 <member>net registry export      - Export a registration entries (.reg) file.
2487 </member>
2488 <member>net registry convert     - Convert a registration entries (.reg) file.
2489 </member>
2490 <member>net registry check       - Check and repair a registry database.
2491 </member>
2492 </simplelist>
2493 </para>
2495 <refsect3>
2496   <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
2497   <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
2498   </para>
2499 </refsect3>
2501 <refsect3>
2502   <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
2503   <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
2504   </para>
2505 </refsect3>
2507 <refsect3>
2508   <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
2509   <para>Create a new <emphasis>key</emphasis> if not yet existing.
2510   </para>
2511 </refsect3>
2513 <refsect3>
2514   <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
2515   <para>Delete the given <emphasis>key</emphasis> and its
2516   values from the registry, if it has no subkeys.
2517   </para>
2518 </refsect3>
2520 <refsect3>
2521   <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
2522   <para>Delete the given <emphasis>key</emphasis> and all of its
2523   subkeys and values from the registry.
2524   </para>
2525 </refsect3>
2527 <refsect3>
2528   <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
2529   --><replaceable>name</replaceable></title>
2531   <para>Output type and actual value of the value <emphasis>name</emphasis>
2532   of the given <emphasis>key</emphasis>.
2533   </para>
2534 </refsect3>
2536 <refsect3>
2537   <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
2538   --><replaceable>name</replaceable></title>
2539   <para>Output the actual value of the value <emphasis>name</emphasis>
2540   of the given <emphasis>key</emphasis>.
2541   </para>
2542 </refsect3>
2544 <refsect3>
2545   <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
2546   --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
2547   --><replaceable>value</replaceable> ...<!--
2548   --></title>
2550   <para>Set the value <emphasis>name</emphasis>
2551   of an existing <emphasis>key</emphasis>.
2552   <emphasis>type</emphasis> may be one of
2553   <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
2554   <emphasis>dword</emphasis>.
2555   In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
2556   be given multiple times.
2557   </para>
2558 </refsect3>
2560 <refsect3>
2561   <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
2562   --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
2563   --></title>
2565   <para>Increment the DWORD value <emphasis>name</emphasis>
2566   of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
2567   while holding a g_lock.
2568   <emphasis>inc</emphasis> defaults to 1.
2569   </para>
2570 </refsect3>
2572 <refsect3>
2573   <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
2574   --><replaceable>name</replaceable></title>
2576   <para>Delete the value <emphasis>name</emphasis>
2577   of the given <emphasis>key</emphasis>.
2578   </para>
2579 </refsect3>
2581 <refsect3>
2582   <title>REGISTRY GETSD <replaceable>key</replaceable></title>
2584   <para>Get the security descriptor of the given <emphasis>key</emphasis>.
2585   </para>
2586 </refsect3>
2588 <refsect3>
2589   <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
2591   <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
2592   Security Descriptor Definition Language (SDDL) string.
2593   </para>
2594 </refsect3>
2596 <refsect3>
2597   <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
2598   --><replaceable>sd</replaceable></title>
2600   <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
2601   Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
2602   </para>
2603 </refsect3>
2605 <refsect3>
2606   <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
2607   --><replaceable> [--precheck &lt;check-file&gt;] [opt]</replaceable></title>
2608   <para>Import a registration entries (.reg) <emphasis>file</emphasis>.</para>
2609   <para>The following options are available:</para>
2610   <variablelist>
2611     <varlistentry><term>--precheck <replaceable>check-file</replaceable></term>
2612     <listitem><para>
2613       This is a mechanism to check the existence or non-existence of
2614       certain keys or values specified in a precheck file before applying
2615       the import file.
2616       The import file will only be applied if the precheck succeeds.
2617     </para>
2618     <para>
2619       The check-file follows the normal registry file syntax with the
2620       following semantics:
2621     </para>
2622       <itemizedlist>
2623         <listitem><para>&lt;value name&gt;=&lt;value&gt; checks whether the
2624           value exists and has the given value.</para></listitem>
2625         <listitem><para>&lt;value name&gt;=- checks whether the value does
2626           not exist.</para></listitem>
2627         <listitem><para>[key] checks whether the key exists.</para>
2628         </listitem>
2629         <listitem><para>[-key] checks whether the key does not exist.</para>
2630         </listitem>
2631       </itemizedlist>
2632     </listitem>
2633     </varlistentry>
2634   </variablelist>
2635 </refsect3>
2637 <refsect3>
2638   <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2639   --><replaceable>file</replaceable><!--
2640   --><replaceable>[opt]</replaceable></title>
2642   <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2643   <emphasis>file</emphasis>.
2644   </para>
2645 </refsect3>
2647 <refsect3>
2648   <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2649   --><replaceable>out</replaceable> <!--
2650   --><replaceable>[[inopt] outopt]</replaceable></title>
2652   <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2653   </para>
2654 </refsect3>
2656 <refsect3>
2657   <title>REGISTRY CHECK [-ravTl] [-o &lt;ODB&gt;] [--wipe] [&lt;DB&gt;]</title>
2658   <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
2660   <variablelist>
2661     <varlistentry><term>-r|--repair</term>
2662     <listitem><para>
2663       Interactive repair mode, ask a lot of questions.
2664     </para></listitem>
2665     </varlistentry>
2667     <varlistentry><term>-a|--auto</term>
2668     <listitem><para>
2669       Noninteractive repair mode, use default answers.
2670     </para></listitem>
2671     </varlistentry>
2673     <varlistentry><term>-v|--verbose</term>
2674       <listitem><para>
2675         Produce more output.
2676       </para></listitem>
2677     </varlistentry>
2679     <varlistentry><term>-T|--test</term>
2680       <listitem><para>
2681         Dry run, show what changes would be made but don't touch anything.
2682       </para></listitem>
2683     </varlistentry>
2685     <varlistentry><term>-l|--lock</term>
2686       <listitem><para>
2687         Lock the database while doing the check.
2688       </para></listitem>
2689     </varlistentry>
2691    <varlistentry><term>--reg-version={1,2,3}</term>
2692       <listitem><para>
2693         Specify the format of the registry database. If not given it defaults to
2694         the value of the binary or, if an registry.tdb is explicitly stated at
2695         the commandline, to the value found in the INFO/version record.
2696       </para></listitem>
2697     </varlistentry>
2699     <varlistentry><term>[--db] &lt;DB&gt;</term>
2700       <listitem><para>
2701         Check the specified database.
2702       </para></listitem>
2703     </varlistentry>
2705     <varlistentry><term>-o|--output &lt;ODB&gt;</term>
2706       <listitem><para>
2707         Create a new registry database &lt;ODB&gt; instead of modifying the
2708         input. If &lt;ODB&gt; is already existing --wipe may be used to
2709         overwrite it.
2710       </para></listitem>
2711     </varlistentry>
2713    <varlistentry><term>--wipe</term>
2714       <listitem><para>
2715         Replace the registry database instead of modifying the input or
2716         overwrite an existing output database.
2717       </para></listitem>
2718     </varlistentry>
2720     <varlistentry><term></term>
2721       <listitem><para>
2722       </para></listitem>
2723     </varlistentry>
2724   </variablelist>
2725   </para>
2726 </refsect3>
2728 </refsect2>
2730 <refsect2>
2731 <title>EVENTLOG</title>
2733 <para>Starting with version 3.4.0 net can read, dump, import and export native
2734 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2735 </para>
2737 <para>
2738 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2739 <emphasis>&smb.conf;</emphasis> file.
2740 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2741 </para>
2743 <para>The eventlog commands are:
2744 <simplelist>
2745 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2746 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2747 tdb based representation of eventlogs.</member>
2748 <member>net eventlog export - Export the samba internal tdb based representation
2749 of eventlogs into an eventlog *.evt file.</member>
2750 </simplelist>
2751 </para>
2753 <refsect3>
2754 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2756 <para>
2757 Prints a eventlog *.evt file to standard output.
2758 </para>
2759 </refsect3>
2761 <refsect3>
2762 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2764 <para>
2765 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2766 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2767 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2768 defined in &smb.conf;.
2769 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2770 </para>
2772 </refsect3>
2774 <refsect3>
2775 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2777 <para>
2778 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2779 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2780 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2781 defined in &smb.conf;.
2782 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2783 </para>
2785 </refsect3>
2787 </refsect2>
2789 <refsect2>
2790 <title>DOM</title>
2792 <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.
2793 </para>
2794 <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.
2795 </para>
2797 <para>The client side support for remote join is implemented in the net dom commands which are:
2798 <simplelist>
2799 <member>net dom join - Join a remote computer into a domain.</member>
2800 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2801 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2802 </simplelist>
2803 </para>
2805 <refsect3>
2806 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2808 <para>
2809 Joins a computer into a domain. This command supports the following additional parameters:
2810 </para>
2812 <itemizedlist>
2814 <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>
2816 <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>
2818 <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>
2820 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2822 <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>
2824 </itemizedlist>
2826 <para>
2827 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.
2828 </para>
2829 <para>
2830         Example:
2831         net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2832 </para>
2833 <para>
2834 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.
2835 </para>
2837 </refsect3>
2839 <refsect3>
2840 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2842 <para>
2843 Unjoins a computer from a domain. This command supports the following additional parameters:
2844 </para>
2846 <itemizedlist>
2848 <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>
2850 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2852 <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>
2854 </itemizedlist>
2856 <para>
2857 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.
2858 </para>
2859 <para>
2860         Example:
2861         net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2862 </para>
2863 <para>
2864 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.
2865 </para>
2867 </refsect3>
2869 <refsect3>
2870 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2872 <para>
2873 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2874 </para>
2876 <itemizedlist>
2878 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2880 <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>
2882 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2884 <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>
2886 </itemizedlist>
2888 <para>
2889 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.
2890 </para>
2891 <para>
2892         Example:
2893         net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2894 </para>
2895 <para>
2896 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.
2897 </para>
2899 </refsect3>
2901 </refsect2>
2903 <refsect2>
2904 <title>G_LOCK</title>
2906 <para>Manage global locks.</para>
2908 <refsect3>
2909 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2911 <para>
2912 Execute a shell command under a global lock. This might be useful to define the
2913 order in which several shell commands will be executed. The locking information
2914 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2915 running, the locking information will be available on all cluster nodes.
2916 </para>
2918 <itemizedlist>
2919 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2920 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2921 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2922 </itemizedlist>
2923 </refsect3>
2925 <refsect3>
2926 <title>G_LOCK LOCKS</title>
2928 <para>
2929 Print a list of all currently existing locknames.
2930 </para>
2931 </refsect3>
2933 <refsect3>
2934 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2936 <para>
2937 Dump the locking table of a certain global lock.
2938 </para>
2939 </refsect3>
2941 </refsect2>
2943 <refsect2>
2944         <title>TDB</title>
2946         <para>Print information from tdb records.</para>
2948         <refsect3>
2949                 <title>TDB LOCKING <replaceable>key</replaceable> [DUMP]</title>
2951                 <para>List sharename, filename and number of share modes
2952                 for a record from locking.tdb. With the optional DUMP options,
2953                 dump the complete record.</para>
2955                 <itemizedlist>
2956                         <listitem>
2957                                 <para><replaceable>KEY</replaceable>
2958                                 Key of the tdb record as hex string.</para>
2959                         </listitem>
2960                 </itemizedlist>
2962         </refsect3>
2963 </refsect2>
2965 <refsect2>
2966   <title>vfs</title>
2967   <para>Access shared filesystem through the VFS.</para>
2969   <refsect3>
2970     <title>vfs stream2abouble [--recursive] [--verbose] [--continue] [--follow-symlinks] <replaceable>share</replaceable> <replaceable>path</replaceable></title>
2972     <para>Convert file streams to AppleDouble files.</para>
2973     <itemizedlist>
2974       <listitem>
2975         <para><replaceable>share</replaceable>
2976         A Samba share.</para>
2977       </listitem>
2978     </itemizedlist>
2979     <itemizedlist>
2980       <listitem>
2981         <para><replaceable>path</replaceable> A relative path of something in
2982         the Samba share. "." can be used for the root directory of the
2983         share.</para>
2984       </listitem>
2985     </itemizedlist>
2987     <para>Options:</para>
2988     <variablelist>
2989       <varlistentry>
2990         <term>--recursive</term>
2991         <listitem><para>Traverse a directory hierarchy.</para></listitem>
2992       </varlistentry>
2993       <varlistentry>
2994         <term>--verbose</term>
2995         <listitem><para>Verbose output.</para></listitem>
2996       </varlistentry>
2997       <varlistentry>
2998         <term>--continue</term>
2999         <listitem><para>Continue traversing a directory hierarchy if a single
3000         conversion fails.</para></listitem>
3001       </varlistentry>
3002       <varlistentry>
3003         <term>--follow-symlinks</term>
3004         <listitem><para>Follow symlinks encountered while traversing a
3005         directory.</para></listitem>
3006       </varlistentry>
3007     </variablelist>
3008   </refsect3>
3010   <refsect3>
3011     <title>vfs getntacl <replaceable>share</replaceable> <replaceable>path</replaceable></title>
3013     <para>Display the security descriptor of a file or directory.</para>
3014     <itemizedlist>
3015       <listitem>
3016         <para><replaceable>share</replaceable>
3017         A Samba share.</para>
3018       </listitem>
3019     </itemizedlist>
3020     <itemizedlist>
3021       <listitem>
3022         <para><replaceable>path</replaceable> A relative path of something in
3023         the Samba share. "." can be used for the root directory of the
3024         share.</para>
3025       </listitem>
3026     </itemizedlist>
3027   </refsect3>
3029 </refsect2>
3031 <refsect2>
3032 <title>OFFLINEJOIN</title>
3034 <para>Starting with version 4.15 Samba has support for offline join APIs. Windows supports offline join capabilities since Windows 7 and Windows 2008 R2.
3035 </para>
3037 <para>The following offline commands are implemented:
3038 <simplelist>
3039 <member>net offlinejoin provision - Provisions a machine account in AD.</member>
3040 <member>net offlinejoin requestodj - Requests a domain offline join.</member>
3041 </simplelist>
3042 </para>
3044 <refsect3>
3045         <title>OFFLINEJOIN PROVISION <replaceable>domain=DOMAIN</replaceable> <replaceable>machine_name=MACHINE_NAME</replaceable> <replaceable>machine_account_ou=MACHINE_ACCOUNT_OU</replaceable> <replaceable>dcname=DCNAME</replaceable> <replaceable>defpwd</replaceable> <replaceable>reuse</replaceable> <replaceable>savefile=FILENAME</replaceable> <replaceable>printblob</replaceable></title>
3047 <para>
3048 Provisions a machine account in AD. This command needs network connectivity to the domain controller to succeed. This command supports the following additional parameters:
3049 </para>
3051 <itemizedlist>
3053 <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. The <replaceable>DOMAIN</replaceable> parameter cannot be NULL.</para></listitem>
3055 <listitem><para><replaceable>MACHINE_NAME</replaceable> defines the machine account name that will be provisioned in AD. The <replaceable>MACHINE_NAME</replaceable> parameter cannot be NULL.</para></listitem>
3057 <listitem><para><replaceable>MACHINE_ACCOUNT_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>
3059 <listitem><para><replaceable>DCNAME</replaceable> defines a specific domain controller for creating the machine account in AD.</para></listitem>
3061 <listitem><para><replaceable>DEFPWD</replaceable> is an optional parameter that can be set to enforce using the default machine account password. The use of this parameter is not recommended as the default machine account password can be easily guessed. </para></listitem>
3063 <listitem><para><replaceable>REUSE</replaceable> is an optional parameter that can be set to enforce reusing an existing machine account in AD.</para></listitem>
3065 <listitem><para><replaceable>SAVEFILE</replaceable> is an optional parameter to store the generated provisioning data on disk.</para></listitem>
3067 <listitem><para><replaceable>PRINTBLOB</replaceable> is an optional parameter to print the generated provisioning data on stdout.</para></listitem>
3069 </itemizedlist>
3071 <para>
3072         Example:
3073         net offlinejoin provision -U administrator%secret domain=MYDOM machine_name=MYHOST savefile=provisioning.txt
3074 </para>
3075 </refsect3>
3077 <refsect3>
3078         <title>OFFLINEJOIN REQUESTODJ <replaceable>loadfile=FILENAME</replaceable></title>
3080 <para>
3081 Requests an offline domain join by providing file-based provisioning data. This command supports the following additional parameters:
3082 </para>
3084 <itemizedlist>
3086 <listitem><para><replaceable>LOADFILE</replaceable> is a required parameter to load the provisioning from a file.</para></listitem>
3088 </itemizedlist>
3090 <para>
3091         Example:
3092         net offlinejoin requestodj -U administrator%secret loadfile=provisioning.txt
3093 </para>
3095 </refsect3>
3097 </refsect2>
3099 <refsect2>
3100 <title>HELP [COMMAND]</title>
3102 <para>Gives usage information for the specified command.</para>
3104 </refsect2>
3106 </refsect1>
3108 <refsect1>
3109         <title>VERSION</title>
3111         <para>This man page is complete for version 3 of the Samba 
3112         suite.</para>
3113 </refsect1>
3115 <refsect1>
3116         <title>AUTHOR</title>
3117         
3118         <para>The original Samba software and related utilities 
3119         were created by Andrew Tridgell. Samba is now developed
3120         by the Samba Team as an Open Source project similar 
3121         to the way the Linux kernel is developed.</para>
3123         <para>The net manpage was written by Jelmer Vernooij.</para>
3124         
3125 </refsect1>
3127 </refentry>