lib:socket: fix CID 1350009 - illegal memory accesses (BUFFER_SIZE_WARNING)
[Samba.git] / docs-xml / manpages / net.8.xml
blob661219142052e7f03cc7508eb8d429b7246828a7
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="net.8">
5 <refmeta>
6         <refentrytitle>net</refentrytitle>
7         <manvolnum>8</manvolnum>
8         <refmiscinfo class="source">Samba</refmiscinfo>
9         <refmiscinfo class="manual">System Administration tools</refmiscinfo>
10         <refmiscinfo class="version">4.4</refmiscinfo>
11 </refmeta>
14 <refnamediv>
15         <refname>net</refname>
16         <refpurpose>Tool for administration of Samba and remote
17         CIFS servers.
18         </refpurpose>
19 </refnamediv>
21 <refsynopsisdiv>
22         <cmdsynopsis>
23                 <command>net</command>
24                 <arg choice="req">&lt;ads|rap|rpc&gt;</arg>
25                 <arg choice="opt">-h|--help</arg>
26                 <arg choice="opt">-w|--workgroup workgroup</arg>
27                 <arg choice="opt">-W|--myworkgroup myworkgroup</arg>
28                 <arg choice="opt">-U|--user user</arg>
29                 <arg choice="opt">-I|--ipaddress ip-address</arg>
30                 <arg choice="opt">-p|--port port</arg>
31                 <arg choice="opt">-n myname</arg>
32                 <arg choice="opt">-s conffile</arg>
33                 <arg choice="opt">-S|--server server</arg>
34                 <arg choice="opt">-l|--long</arg>
35                 <arg choice="opt">-v|--verbose</arg>
36                 <arg choice="opt">-f|--force</arg>
37                 <arg choice="opt">-P|--machine-pass</arg>
38                 <arg choice="opt">-d debuglevel</arg>
39                 <arg choice="opt">-V</arg>
40                 <arg choice="opt">--request-timeout seconds</arg>
41                 <arg choice="opt">-t|--timeout seconds</arg>
42                 <arg choice="opt">-i|--stdin</arg>
43                 <arg choice="opt">--tallocreport</arg>
44         </cmdsynopsis>
45 </refsynopsisdiv>
47 <refsect1>
48         <title>DESCRIPTION</title>
50         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
51         <manvolnum>7</manvolnum></citerefentry> suite.</para>
53         <para>The Samba net utility is meant to work just like the net utility 
54         available for windows and DOS. The first argument should be used 
55         to specify the protocol to use when executing a certain command. 
56         ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3) 
57         clients and RPC can be used for NT4 and Windows 2000. If this 
58         argument is omitted, net will try to determine it automatically. 
59         Not all commands are available on all protocols.
60         </para>
62 </refsect1>
64 <refsect1>
65         <title>OPTIONS</title>
67         <variablelist>
68                 &stdarg.help;
69                 &stdarg.kerberos;
70                 
71                 <varlistentry>
72                 <term>-w|--workgroup target-workgroup</term>
73                 <listitem><para>
74                 Sets target workgroup or domain. You have to specify 
75                 either this option or the IP address or the name of a server.
76                 </para></listitem>
77                 </varlistentry>
79                 <varlistentry>
80                 <term>-W|--myworkgroup workgroup</term>
81                 <listitem><para>
82                 Sets client workgroup or domain
83                 </para></listitem>
84                 </varlistentry>
86                 <varlistentry>
87                 <term>-U|--user user</term>
88                 <listitem><para>
89                 User name to use
90                 </para></listitem>
91                 </varlistentry>
93                 <varlistentry>
94                 <term>-I|--ipaddress ip-address</term>
95                 <listitem><para>
96                 IP address of target server to use. You have to
97                 specify either this option or a target workgroup or
98                 a target server.
99                 </para></listitem>
100                 </varlistentry>
102                 <varlistentry>
103                 <term>-p|--port port</term>
104                 <listitem><para>
105                 Port on the target server to connect to (usually 139 or 445). 
106                 Defaults to trying 445 first, then 139.
107                 </para></listitem>
108                 </varlistentry>
110                 &stdarg.netbios.name;
111                 &stdarg.configfile;
113                 <varlistentry>
114                 <term>-S|--server server</term>
115                 <listitem><para>
116                 Name of target server. You should specify either 
117                 this option or a target workgroup or a target IP address.
118                 </para></listitem>
119                 </varlistentry>
121                 <varlistentry>
122                 <term>-l|--long</term>
123                 <listitem><para>
124                 When listing data, give more information on each item.
125                 </para></listitem>
126                 </varlistentry>
128                 <varlistentry>
129                 <term>-v|--verbose</term>
130                 <listitem><para>
131                 When listing data, give more verbose information on each item.
132                 </para></listitem>
133                 </varlistentry>
135                 <varlistentry>
136                 <term>-f|--force</term>
137                 <listitem><para>
138                                 Enforcing a net command.
139                 </para></listitem>
140                 </varlistentry>
142                 <varlistentry>
143                 <term>-P|--machine-pass</term>
144                 <listitem><para>
145                 Make queries to the external server using the machine account of the local server.
146                 </para></listitem>
147                 </varlistentry>
149                 <varlistentry>
150                 <term>--request-timeout 30</term>
151                 <listitem><para>
152                 Let client requests timeout after 30 seconds the default is 10
153                 seconds.
154                 </para></listitem>
155                 </varlistentry>
157                 <varlistentry>
158                 <term>-t|--timeout 30</term>
159                 <listitem><para>
160                                 Set timeout for client operations to 30 seconds.
161                 </para></listitem>
162                 </varlistentry>
164                 <varlistentry>
165                 <term>--use-ccache</term>
166                 <listitem><para>
167                 Try to use the credentials cached by winbind.
168                 </para></listitem>
169                 </varlistentry>
171                 <varlistentry>
172                 <term>-i|--stdin</term>
173                 <listitem><para>
174                                 Take input for net commands from standard input.
175                 </para></listitem>
176                 </varlistentry>
178                 <varlistentry>
179                 <term>--tallocreport</term>
180                 <listitem><para>
181                                 Generate a talloc report while processing a net
182                                 command.
183                 </para></listitem>
184                 </varlistentry>
186                 <varlistentry>
187                 <term>-T|--test</term>
188                 <listitem><para>Only test command sequence, dry-run.
189                 </para></listitem>
190                 </varlistentry>
192                 <varlistentry>
193                 <term>-F|--flags FLAGS</term>
194                 <listitem><para>Pass down integer flags to a net subcommand.
195                 </para></listitem>
196                 </varlistentry>
198                 <varlistentry>
199                 <term>-C|--comment COMMENT</term>
200                 <listitem><para>Pass down a comment string to a net subcommand.
201                 </para></listitem>
202                 </varlistentry>
204                 <varlistentry>
205                 <term>-n|--myname MYNAME</term>
206                 <listitem><para>Use MYNAME as a requester name for a net subcommand.
207                 </para></listitem>
208                 </varlistentry>
210                 <varlistentry>
211                 <term>-c|--container CONTAINER</term>
212                 <listitem><para>Use a specific AD container for net ads operations.
213                 </para></listitem>
214                 </varlistentry>
216                 <varlistentry>
217                 <term>-M|--maxusers MAXUSERS</term>
218                 <listitem><para>Fill in the maxusers field in net rpc share operations.
219                 </para></listitem>
220                 </varlistentry>
222                 <varlistentry>
223                 <term>-r|--reboot</term>
224                 <listitem><para>Reboot a remote machine after a command has been successfully executed (e.g. in remote join operations).
225                 </para></listitem>
226                 </varlistentry>
228                 <!-- Options for net rpc vampire -->
230                 <varlistentry>
231                 <term>--force-full-repl</term>
232                 <listitem><para>
233                                 When calling "net rpc vampire keytab" this option
234                                 enforces a full re-creation of the generated keytab file.
235                 </para></listitem>
236                 </varlistentry>
238                 <varlistentry>
239                 <term>--single-obj-repl</term>
240                 <listitem><para>
241                                 When calling "net rpc vampire keytab" this option
242                                 allows one to replicate just a single object to the generated keytab file.
243                 </para></listitem>
244                 </varlistentry>
246                 <varlistentry>
247                 <term>--clean-old-entries</term>
248                 <listitem><para>
249                                 When calling "net rpc vampire keytab" this option
250                                 allows one to cleanup old entries from the generated keytab file.
251                 </para></listitem>
252                 </varlistentry>
254                 <!-- Options for net idmap -->
256                 <varlistentry>
257                 <term>--db</term>
258                 <listitem><para>Define dbfile for "net idmap" commands.
259                 </para></listitem>
260                 </varlistentry>
262                 <varlistentry>
263                 <term>--lock</term>
264                 <listitem><para>Activates locking of the dbfile for "net idmap check" command.
265                 </para></listitem>
266                 </varlistentry>
268                 <varlistentry>
269                 <term>-a|--auto</term>
270                 <listitem><para>Activates noninteractive mode in "net idmap check".
271                 </para></listitem>
272                 </varlistentry>
274                 <varlistentry>
275                 <term>--repair</term>
276                 <listitem><para>Activates repair mode in "net idmap check".
277                 </para></listitem>
278                 </varlistentry>
280                 <!-- Options for net rpc share migrate -->
282                 <varlistentry>
283                 <term>--acls</term>
284                 <listitem><para>Includes ACLs to be copied in "net rpc share migrate".
285                 </para></listitem>
286                 </varlistentry>
288                 <varlistentry>
289                 <term>--attrs</term>
290                 <listitem><para>Includes file attributes to be copied in "net rpc share migrate".
291                 </para></listitem>
292                 </varlistentry>
294                 <varlistentry>
295                 <term>--timestamps</term>
296                 <listitem><para>Includes timestamps to be copied in "net rpc share migrate".
297                 </para></listitem>
298                 </varlistentry>
300                 <varlistentry>
301                 <term>-X|--exclude DIRECTORY</term>
302                 <listitem><para>Allows one to exclude directories when copying with "net rpc share migrate".
303                 </para></listitem>
304                 </varlistentry>
306                 <varlistentry>
307                 <term>--destination SERVERNAME</term>
308                 <listitem><para>Defines the target servername of migration process (defaults to localhost).
309                 </para></listitem>
310                 </varlistentry>
312                 <!-- Options for net groupmap set -->
314                 <varlistentry>
315                 <term>-L|--local</term>
316                 <listitem><para>Sets the type of group mapping to local
317                                 (used in "net groupmap set").
318                 </para></listitem>
319                 </varlistentry>
321                 <varlistentry>
322                 <term>-D|--domain</term>
323                 <listitem><para>Sets the type of group mapping to domain
324                                 (used in "net groupmap set").
325                 </para></listitem>
326                 </varlistentry>
328                 <varlistentry>
329                 <term>-N|--ntname NTNAME</term>
330                 <listitem><para>Sets the ntname of a group mapping
331                                 (used in "net groupmap set").
332                 </para></listitem>
333                 </varlistentry>
335                 <varlistentry>
336                 <term>-R|--rid RID</term>
337                 <listitem><para>Sets the rid of a group mapping
338                                 (used in "net groupmap set").
339                 </para></listitem>
340                 </varlistentry>
342                 <!-- Options for net registry check -->
344                 <varlistentry>
345                 <term>--reg-version REG_VERSION</term>
346                 <listitem><para>Assume database version {n|1,2,3}
347                                 (used in "net registry check").
348                 </para></listitem>
349                 </varlistentry>
351                 <varlistentry>
352                 <term>-o|--output FILENAME</term>
353                 <listitem><para>Output database file
354                                 (used in "net registry check").
355                 </para></listitem>
356                 </varlistentry>
358                 <varlistentry>
359                 <term>--wipe</term>
360                 <listitem><para>Create a new database from scratch
361                                 (used in "net registry check").
362                 </para></listitem>
363                 </varlistentry>
365                 <!-- Options for net registry import -->
367                 <varlistentry>
368                 <term>--precheck PRECHECK_DB_FILENAME</term>
369                 <listitem><para>Defines filename for database prechecking
370                                 (used in "net registry import").
371                 </para></listitem>
372                 </varlistentry>
374                 <varlistentry>
375                 <term>--no-dns-updates</term>
376                 <listitem><para>Do not perform DNS updates as part of
377                 "net ads join".
378                 </para></listitem>
379                 </varlistentry>
381                 &stdarg.encrypt;
382                 &popt.common.samba.client;
384         </variablelist>
385 </refsect1>
387 <refsect1>
388 <title>COMMANDS</title>
390 <refsect2>
391 <title>CHANGESECRETPW</title>
393 <para>This command allows the Samba machine account password to be set from an external application
394 to a machine account password that has already been stored in Active Directory. DO NOT USE this command
395 unless you know exactly what you are doing. The use of this command requires that the force flag (-f)
396 be used also. There will be NO command prompt. Whatever information is piped into stdin, either by
397 typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use
398 this without care and attention as it will overwrite a legitimate machine password without warning.
399 YOU HAVE BEEN WARNED.
400 </para>
402 </refsect2>
404 <refsect2>
405         <title>TIME</title>
407         <para>The <command>NET TIME</command> command allows you to view the time on a remote server
408         or synchronise the time on the local server with the time on the remote server.</para>
410 <refsect3>
411 <title>TIME</title>
413 <para>Without any options, the <command>NET TIME</command> command 
414 displays the time on the remote server. The remote server must be
415 specified with the -S option.
416 </para>
418 </refsect3>
420 <refsect3>
421 <title>TIME SYSTEM</title>
423 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.
424 The remote server must be specified with the -S option.
425 </para>
427 </refsect3>
429 <refsect3>
430 <title>TIME SET</title>
431 <para>Tries to set the date and time of the local server to that on 
432 the remote server using <command>/bin/date</command>.
433 The remote server must be specified with the -S option.
434 </para>
436 </refsect3>
438 <refsect3>
439 <title>TIME ZONE</title>
441 <para>Displays the timezone in hours from GMT on the remote server.
442 The remote server must be specified with the -S option.
443 </para>
445 </refsect3>
446 </refsect2>
448 <refsect2>
449 <title>[RPC|ADS] JOIN [TYPE] [--no-dns-updates] [-U username[%password]]
450 [createupn=UPN] [createcomputer=OU] [machinepass=PASS]
451 [osName=string osVer=string] [options]</title>
453 <para>
454 Join a domain.  If the account already exists on the server, and 
455 [TYPE] is MEMBER, the machine will attempt to join automatically. 
456 (Assuming that the machine has been created in server manager)
457 Otherwise, a password will be prompted for, and a new account may
458 be created.</para>
460 <para>
461 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
462 joining the domain.
463 </para>
465 <para>
466 [UPN] (ADS only) set the principalname attribute during the join.  The default
467 format is host/netbiosname@REALM.
468 </para>
470 <para>
471 [OU] (ADS only) Precreate the computer account in a specific OU.  The
472 OU string reads from top to bottom without RDNs, and is delimited by
473 a '/'.  Please note that '\' is used for escape by both the shell
474 and ldap, so it may need to be doubled or quadrupled to pass through, 
475 and it is not used as a delimiter.
476 </para>
477 <para>
478 [PASS] (ADS only) Set a specific password on the computer account
479 being created by the join.
480 </para>
481 <para>
482 [osName=string osVer=String] (ADS only) Set the operatingSystem and
483 operatingSystemVersion attribute during the join.  Both parameters
484 must be specified for either to take effect.
485 </para>
486 </refsect2>
488 <refsect2>
489 <title>[RPC] OLDJOIN [options]</title>
491 <para>Join a domain. Use the OLDJOIN option to join the domain 
492 using the old style of domain joining - you need to create a trust 
493 account in server manager first.</para>
494 </refsect2>
496 <refsect2>
497 <title>[RPC|ADS] USER</title>
499 <refsect3>
500 <title>[RPC|ADS] USER</title>
502 <para>List all users</para>
504 </refsect3>
506 <refsect3>
507 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
509 <para>Delete specified user</para>
511 </refsect3>
513 <refsect3>
514 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
516 <para>List the domain groups of the specified user.</para>
518 </refsect3>
520 <refsect3>
521 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
523 <para>Rename specified user.</para>
525 </refsect3>
527 <refsect3>
528 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
530 <para>Add specified user.</para>
531 </refsect3>
532 </refsect2>
534 <refsect2>
535 <title>[RPC|ADS] GROUP</title>
537 <refsect3>
538 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
539 <para>List user groups.</para>
540 </refsect3>
542 <refsect3>
543 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
545 <para>Delete specified group.</para>
547 </refsect3>
549 <refsect3>
550 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
552 <para>Create specified group.</para>
554 </refsect3>
555 </refsect2>
557 <refsect2>
558 <title>[RAP|RPC] SHARE</title>
560 <refsect3>
561 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
563 <para>Enumerates all exported resources (network shares) on target server.</para>
565 </refsect3>
567 <refsect3>
568 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
570 <para>Adds a share from a server (makes the export active). Maxusers 
571 specifies the number of users that can be connected to the 
572 share simultaneously.</para>
574 </refsect3>
576 <refsect3>
577 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
579 <para>Delete specified share.</para>
580 </refsect3>
581 </refsect2>
583 <refsect2>
584 <title>[RPC|RAP] FILE</title>
586 <refsect3>
587 <title>[RPC|RAP] FILE</title>
589 <para>List all open files on remote server.</para>
591 </refsect3>
593 <refsect3>
594 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
596 <para>Close file with specified <replaceable>fileid</replaceable> on 
597 remote server.</para>
599 </refsect3>
601 <refsect3>
602 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
604 <para>
605 Print information on specified <replaceable>fileid</replaceable>. 
606 Currently listed are: file-id, username, locks, path, permissions.
607 </para>
609 </refsect3>
611 <refsect3>
612 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
614 <para>
615 List files opened by specified <replaceable>user</replaceable>.
616 Please note that <command>net rap file user</command> does not work
617 against Samba servers. 
618 </para>
620 </refsect3>
622 </refsect2>
624 <refsect2>
625 <title>SESSION</title>
627 <refsect3>
628 <title>RAP SESSION</title>
630 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
631 sessions on the target server.</para>
633 </refsect3>
635 <refsect3>
636 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
638 <para>Close the specified sessions.</para>
640 </refsect3>
642 <refsect3>
643 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
645 <para>Give a list with all the open files in specified session.</para>
647 </refsect3>
649 </refsect2>
651 <refsect2>
652 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
654 <para>List all servers in specified domain or workgroup. Defaults
655 to local domain.</para>
657 </refsect2>
659 <refsect2>
660 <title>RAP DOMAIN</title>
662 <para>Lists all domains and workgroups visible on the 
663 current network.</para>
665 </refsect2>
667 <refsect2>
668 <title>RAP PRINTQ</title>
670 <refsect3>
671 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
673 <para>Lists the specified print queue and print jobs on the server.
674 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all 
675 queues are listed.</para>
677 </refsect3>
679 <refsect3>
680 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
682 <para>Delete job with specified id.</para>
684 </refsect3>
686 </refsect2>
688 <refsect2>
689 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
691 <para>
692 Validate whether the specified user can log in to the 
693 remote server. If the password is not specified on the commandline, it 
694 will be prompted. 
695 </para>
697 &not.implemented;
699 </refsect2>
701 <refsect2>
702 <title>RAP GROUPMEMBER</title>
704 <refsect3>
705 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
707 <para>List all members of the specified group.</para>
709 </refsect3>
711 <refsect3>
712 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
714 <para>Delete member from group.</para>
716 </refsect3>
718 <refsect3>
719 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
721 <para>Add member to group.</para>
723 </refsect3>
725 </refsect2>
727 <refsect2>
728 <title>RAP ADMIN <replaceable>command</replaceable></title>
730 <para>Execute the specified <replaceable>command</replaceable> on 
731 the remote server. Only works with OS/2 servers.
732 </para>
734 &not.implemented;
736 </refsect2>
738 <refsect2>
739 <title>RAP SERVICE</title>
741 <refsect3>
742 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
744 <para>Start the specified service on the remote server. Not implemented yet.</para>
746 &not.implemented;
748 </refsect3>
750 <refsect3>
751 <title>RAP SERVICE STOP</title>
753 <para>Stop the specified service on the remote server.</para>
755 &not.implemented;
757 </refsect3>
759 </refsect2>
761 <refsect2>
762 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
764 <para>
765 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
766 </para>
768 </refsect2>
770 <refsect2>
771 <title>LOOKUP</title>
773 <refsect3>
774 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
776 <para>
777 Lookup the IP address of the given host with the specified type (netbios suffix). 
778 The type defaults to 0x20 (workstation).
779 </para>
781 </refsect3>
783 <refsect3>
784 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
786 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
788 </refsect3>
790 <refsect3>
791 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
793 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
794 Defaults to local realm.</para>
796 </refsect3>
798 <refsect3>
799 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
801 <para>Give IP's of Domain Controllers for specified <replaceable>
802 DOMAIN</replaceable>. Defaults to local domain.</para>
804 </refsect3>
806 <refsect3>
807 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
809 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
810 or workgroup. Defaults to local domain.</para>
812 </refsect3>
814 </refsect2>
816 <refsect2>
817 <title>CACHE</title>
819 <para>Samba uses a general caching interface called 'gencache'. It 
820 can be controlled using 'NET CACHE'.</para>
822 <para>All the timeout parameters support the suffixes:
824 <simplelist>
825 <member>s - Seconds</member>
826 <member>m - Minutes</member>
827 <member>h - Hours</member>
828 <member>d - Days</member>
829 <member>w - Weeks</member>
830 </simplelist>
832 </para>
834 <refsect3>
835 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
837 <para>Add specified key+data to the cache with the given timeout.</para>
839 </refsect3>
841 <refsect3>
842 <title>CACHE DEL <replaceable>key</replaceable></title>
844 <para>Delete key from the cache.</para>
846 </refsect3>
848 <refsect3>
849 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
851 <para>Update data of existing cache entry.</para>
853 </refsect3>
855 <refsect3>
856 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
858 <para>Search for the specified pattern in the cache data.</para>
860 </refsect3>
862 <refsect3>
863 <title>CACHE LIST</title>
865 <para>
866 List all current items in the cache.
867 </para>
869 </refsect3>
871 <refsect3>
872 <title>CACHE FLUSH</title>
874 <para>Remove all the current items from the cache.</para>
876 </refsect3>
878 </refsect2>
880 <refsect2>
881 <title>GETLOCALSID [DOMAIN]</title>
883 <para>Prints the SID of the specified domain, or if the parameter is
884 omitted, the SID of the local server.</para>
886 </refsect2>
888 <refsect2>
889 <title>SETLOCALSID S-1-5-21-x-y-z</title>
891 <para>Sets SID for the local server to the specified SID.</para>
893 </refsect2>
895 <refsect2>
896 <title>GETDOMAINSID</title>
898 <para>Prints the local machine SID and the SID of the current 
899 domain.</para>
901 </refsect2>
903 <refsect2>
904 <title>SETDOMAINSID</title>
906 <para>Sets the SID of the current domain.</para>
908 </refsect2>
910 <refsect2>
911 <title>GROUPMAP</title>
913 <para>Manage the mappings between Windows group SIDs and UNIX groups.
914 Common options include:</para>
916 <itemizedlist>
917 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
918 <listitem><para>ntgroup - Name of the Windows NT group (must be
919   resolvable to a SID</para></listitem>
920 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
921 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
922 <listitem><para>type - Type of the group; either 'domain', 'local',
923   or 'builtin'</para></listitem>
924 <listitem><para>comment - Freeform text description of the group</para></listitem>
925 </itemizedlist>
927 <refsect3>
928 <title>GROUPMAP ADD</title>
930 <para>
931 Add a new group mapping entry:
932 <programlisting>
933 net groupmap add {rid=int|sid=string} unixgroup=string \
934         [type={domain|local}] [ntgroup=string] [comment=string]
935 </programlisting>
936 </para>
938 </refsect3>
940 <refsect3>
941 <title>GROUPMAP DELETE</title>
943 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
945 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
947 </refsect3>
949 <refsect3>
950 <title>GROUPMAP MODIFY</title>
952 <para>Update an existing group entry.</para>
954 <para>
955 <programlisting>
956 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
957        [comment=string] [type={domain|local}]
958 </programlisting>
959 </para>
960 </refsect3>
962 <refsect3>
963 <title>GROUPMAP LIST</title>
965 <para>List existing group mapping entries.</para>
967 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
969 </refsect3>
970 </refsect2>
974 <refsect2>
975 <title>MAXRID</title>
977 <para>Prints out the highest RID currently in use on the local
978 server (by the active 'passdb backend').
979 </para>
981 </refsect2>
983 <refsect2>
984 <title>RPC INFO</title>
986 <para>Print information about the domain of the remote server,
987 such as domain name, domain sid and number of users and groups.
988 </para>
990 </refsect2>
992 <refsect2>
993 <title>[RPC|ADS] TESTJOIN</title>
995 <para>Check whether participation in a domain is still valid.</para>
997 </refsect2>
999 <refsect2>
1000 <title>[RPC|ADS] CHANGETRUSTPW</title>
1002 <para>Force change of domain trust password.</para>
1004 </refsect2>
1006 <refsect2>
1007 <title>RPC TRUSTDOM</title>
1009 <refsect3>
1010 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
1012 <para>Add a interdomain trust account for <replaceable>DOMAIN</replaceable>. 
1013 This is in fact a Samba account named <replaceable>DOMAIN$</replaceable> 
1014 with the account flag <constant>'I'</constant> (interdomain trust account). 
1015 This is required for incoming trusts to work. It makes Samba be a
1016 trusted domain of the foreign (trusting) domain.
1017 Users of the Samba domain will be made available in the foreign domain.
1018 If the command is used against localhost it has the same effect as 
1019 <command>smbpasswd -a -i DOMAIN</command>. Please note that both commands
1020 expect a appropriate UNIX account. 
1021 </para>
1023 </refsect3>
1025 <refsect3>
1026 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
1028 <para>Remove interdomain trust account for 
1029 <replaceable>DOMAIN</replaceable>. If it is used against localhost 
1030 it has the same effect as <command>smbpasswd -x DOMAIN$</command>. 
1031 </para>
1033 </refsect3>
1035 <refsect3>
1036 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
1038 <para>
1039 Establish a trust relationship to a trusted domain. 
1040 Interdomain account must already be created on the remote PDC.
1041 This is required for outgoing trusts to work. It makes Samba be a
1042 trusting domain of a foreign (trusted) domain.
1043 Users of the foreign domain will be made available in our domain.
1044 You'll need winbind and a working idmap config to make them
1045 appear in your system.
1046 </para>
1048 </refsect3>
1050 <refsect3>
1051 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
1052 <para>Abandon relationship to trusted domain</para>
1054 </refsect3>
1056 <refsect3>
1057 <title>RPC TRUSTDOM LIST</title>
1059 <para>List all interdomain trust relationships.</para>
1061 </refsect3>
1062 </refsect2>
1064 <refsect2>
1065 <title>RPC TRUST</title>
1067 <refsect3>
1068 <title>RPC TRUST CREATE</title>
1070 <para>Create a trust object by calling lsaCreateTrustedDomainEx2.
1071 The can be done on a single server or on two servers at once with the
1072 possibility to use a random trust password.</para>
1074 <variablelist><title>Options:</title>
1075 <varlistentry>
1076 <term>otherserver</term>
1077 <listitem><para>Domain controller of the second domain</para></listitem>
1078 </varlistentry>
1080 <varlistentry>
1081 <term>otheruser</term>
1082 <listitem><para>Admin user in the second domain</para></listitem>
1083 </varlistentry>
1085 <varlistentry>
1086 <term>otherdomainsid</term>
1087 <listitem><para>SID of the second domain</para></listitem>
1088 </varlistentry>
1090 <varlistentry>
1091 <term>other_netbios_domain</term>
1092 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
1093 </varlistentry>
1095 <varlistentry>
1096 <term>otherdomain</term>
1097 <listitem><para>DNS (full) name of the second domain</para></listitem>
1098 </varlistentry>
1100 <varlistentry>
1101 <term>trustpw</term>
1102 <listitem><para>Trust password</para></listitem>
1103 </varlistentry>
1104 </variablelist>
1106 <variablelist><title>Examples:</title>
1107 <varlistentry>
1108 <term>Create a trust object on srv1.dom1.dom for the domain dom2</term>
1109 <listitem><literallayout>
1110 net rpc trust create \
1111     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
1112     other_netbios_domain=dom2 \
1113     otherdomain=dom2.dom \
1114     trustpw=12345678 \
1115     -S srv1.dom1.dom
1116 </literallayout></listitem>
1117 </varlistentry>
1118 <varlistentry>
1119 <term>Create a trust relationship between dom1 and dom2</term>
1120 <listitem><literallayout>
1121 net rpc trust create \
1122     otherserver=srv2.dom2.test \
1123     otheruser=dom2adm \
1124     -S srv1.dom1.dom
1125 </literallayout></listitem>
1126 </varlistentry>
1127 </variablelist>
1128 </refsect3>
1130 <refsect3>
1131 <title>RPC TRUST DELETE</title>
1133 <para>Delete a trust object by calling lsaDeleteTrustedDomain.
1134 The can be done on a single server or on two servers at once.</para>
1136 <variablelist><title>Options:</title>
1137 <varlistentry>
1138 <term>otherserver</term>
1139 <listitem><para>Domain controller of the second domain</para></listitem>
1140 </varlistentry>
1142 <varlistentry>
1143 <term>otheruser</term>
1144 <listitem><para>Admin user in the second domain</para></listitem>
1145 </varlistentry>
1147 <varlistentry>
1148 <term>otherdomainsid</term>
1149 <listitem><para>SID of the second domain</para></listitem>
1150 </varlistentry>
1151 </variablelist>
1153 <variablelist><title>Examples:</title>
1154 <varlistentry>
1155 <term>Delete a trust object on srv1.dom1.dom for the domain dom2</term>
1156 <listitem><literallayout>
1157 net rpc trust delete \
1158     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
1159     -S srv1.dom1.dom
1160 </literallayout></listitem>
1161 </varlistentry>
1162 <varlistentry>
1163 <term>Delete a trust relationship between dom1 and dom2</term>
1164 <listitem><literallayout>
1165 net rpc trust delete \
1166     otherserver=srv2.dom2.test \
1167     otheruser=dom2adm \
1168     -S srv1.dom1.dom
1169 </literallayout></listitem>
1170 </varlistentry>
1171 </variablelist>
1172 </refsect3>
1174 </refsect2>
1176 <refsect2>
1177 <refsect3>
1178 <title>RPC RIGHTS</title>
1180 <para>This subcommand is used to view and manage Samba's rights assignments (also 
1181 referred to as privileges).  There are three options currently available: 
1182 <parameter>list</parameter>, <parameter>grant</parameter>, and 
1183 <parameter>revoke</parameter>.  More details on Samba's privilege model and its use
1184 can be found in the Samba-HOWTO-Collection.</para>
1186 </refsect3>
1189 </refsect2>
1191 <refsect2>
1192 <title>RPC ABORTSHUTDOWN</title>
1194 <para>Abort the shutdown of a remote server.</para>
1196 </refsect2>
1198 <refsect2>
1199 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
1201 <para>Shut down the remote server.</para>
1203 <variablelist>
1204 <varlistentry>
1205 <term>-r</term>
1206 <listitem><para>
1207 Reboot after shutdown.
1208 </para></listitem>
1209 </varlistentry>
1211 <varlistentry>
1212 <term>-f</term>
1213 <listitem><para>
1214 Force shutting down all applications.
1215 </para></listitem>
1216 </varlistentry>
1218 <varlistentry>
1219 <term>-t timeout</term>
1220 <listitem><para>
1221 Timeout before system will be shut down. An interactive 
1222 user of the system can use this time to cancel the shutdown.
1223 </para></listitem>
1224 </varlistentry>
1226 <varlistentry>
1227 <term>-C message</term>
1228 <listitem><para>Display the specified message on the screen to 
1229 announce the shutdown.</para></listitem>
1230 </varlistentry>
1231 </variablelist>
1233 </refsect2>
1235 <refsect2>
1236 <title>RPC SAMDUMP</title>
1238 <para>Print out sam database of remote server. You need
1239 to run this against the PDC, from a Samba machine joined as a BDC. </para>
1240 </refsect2>
1242 <refsect2>
1243 <title>RPC VAMPIRE</title>
1245 <para>Export users, aliases and groups from remote server to 
1246 local server.  You need to run this against the PDC, from a Samba machine joined as a BDC. 
1247 This vampire command cannot be used against an Active Directory, only
1248 against an NT4 Domain Controller.
1249 </para>
1250 </refsect2>
1252 <refsect2>
1253 <title>RPC VAMPIRE KEYTAB</title>
1255 <para>Dump remote SAM database to local Kerberos keytab file.
1256 </para>
1257 </refsect2>
1259 <refsect2>
1260 <title>RPC VAMPIRE LDIF</title>
1262 <para>Dump remote SAM database to local LDIF file or standard output.
1263 </para>
1264 </refsect2>
1266 <refsect2>
1267 <title>RPC GETSID</title>
1269 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
1271 </refsect2>
1273 <refsect2>
1274 <title>ADS LEAVE</title>
1276 <para>Make the remote host leave the domain it is part of. </para>
1278 </refsect2>
1280 <refsect2>
1281 <title>ADS STATUS</title>
1283 <para>Print out status of machine account of the local machine in ADS.
1284 Prints out quite some debug info. Aimed at developers, regular 
1285 users should use <command>NET ADS TESTJOIN</command>.</para>
1287 </refsect2>
1289 <refsect2>
1290 <title>ADS PRINTER</title>
1292 <refsect3>
1293 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1295 <para>
1296 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the 
1297 server name defaults to the local host.</para>
1299 </refsect3>
1301 <refsect3>
1302 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1304 <para>Publish specified printer using ADS.</para>
1306 </refsect3>
1308 <refsect3>
1309 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1311 <para>Remove specified printer from ADS directory.</para>
1313 </refsect3>
1315 </refsect2>
1317 <refsect2>
1318 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1320 <para>Perform a raw LDAP search on a ADS server and dump the results. The 
1321 expression is a standard LDAP search expression, and the 
1322 attributes are a list of LDAP fields to show in the results.</para>
1324 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1325 </para>
1327 </refsect2>
1329 <refsect2>
1330 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1332 <para>
1333 Perform a raw LDAP search on a ADS server and dump the results. The 
1334 DN standard LDAP DN, and the attributes are a list of LDAP fields 
1335 to show in the result. 
1336 </para>
1338 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1340 </refsect2>
1342 <refsect2>
1343 <title>ADS WORKGROUP</title>
1345 <para>Print out workgroup name for specified kerberos realm.</para>
1347 </refsect2>
1349 <refsect2>
1350         <title>ADS ENCTYPES</title>
1352 <para>
1353         List, modify or delete the value of the "msDS-SupportedEncryptionTypes" attribute of an account in AD.
1354 </para>
1356 <para>
1357         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:
1358 </para>
1360 <para>0x00000001 DES-CBC-CRC</para>
1361 <para>0x00000002 DES-CBC-MD5</para>
1362 <para>0x00000004 RC4-HMAC</para>
1363 <para>0x00000008 AES128-CTS-HMAC-SHA1-96</para>
1364 <para>0x00000010 AES256-CTS-HMAC-SHA1-96</para>
1366 </refsect2>
1368 <refsect2>
1369         <title>ADS ENCTYPES LIST <replaceable>&lt;ACCOUNTNAME&gt;</replaceable></title>
1371 <para>
1372         List the value of the "msDS-SupportedEncryptionTypes" attribute of a given account.
1373 </para>
1375 <para>Example: <userinput>net ads enctypes list Computername</userinput></para>
1377 </refsect2>
1379 <refsect2>
1380         <title>ADS ENCTYPES SET <replaceable>&lt;ACCOUNTNAME&gt;</replaceable> <replaceable>[enctypes]</replaceable></title>
1382 <para>
1383         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.
1384 </para>
1386 <para>Example: <userinput>net ads enctypes set Computername 24</userinput></para>
1388 </refsect2>
1390 <refsect2>
1391         <title>ADS ENCTYPES DELETE <replaceable>&lt;ACCOUNTNAME&gt;</replaceable></title>
1393 <para>
1394         Deletes the "msDS-SupportedEncryptionTypes" attribute of the LDAP object of ACCOUNTNAME.
1395 </para>
1397 <para>Example: <userinput>net ads enctypes set Computername 24</userinput></para>
1399 </refsect2>
1402 <refsect2>
1403 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
1405 <para>
1406 (Re)Create a BUILTIN group.
1407 Only a wellknown set of BUILTIN groups can be created with this command.
1408 This is the list of currently recognized group names: Administrators,
1409 Users, Guests, Power Users, Account Operators, Server Operators, Print
1410 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1411 compatible Access.
1413 This command requires a running Winbindd with idmap allocation properly
1414 configured. The group gid will be allocated out of the winbindd range.
1415 </para>
1417 </refsect2>
1419 <refsect2>
1420 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
1422 <para>
1423 Create a LOCAL group (also known as Alias).
1425 This command requires a running Winbindd with idmap allocation properly
1426 configured. The group gid will be allocated out of the winbindd range.
1427 </para>
1429 </refsect2>
1431 <refsect2>
1432 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
1434 <para>
1435 Delete an existing LOCAL group (also known as Alias).
1437 </para>
1439 </refsect2>
1441 <refsect2>
1442 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
1444 <para>
1445 Map an existing Unix group and make it a Domain Group, the domain group
1446 will have the same name.
1447 </para>
1449 </refsect2>
1451 <refsect2>
1452 <title>SAM UNMAPUNIXGROUP &lt;NAME&gt;</title>
1454 <para>
1455 Remove an existing group mapping entry.
1456 </para>
1458 </refsect2>
1460 <refsect2>
1461 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1463 <para>
1464 Add a member to a Local group. The group can be specified only by name,
1465 the member can be specified by name or SID.
1466 </para>
1468 </refsect2>
1470 <refsect2>
1471 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1473 <para>
1474 Remove a member from a Local group. The group and the member must be
1475 specified by name.
1476 </para>
1478 </refsect2>
1480 <refsect2>
1481 <title>SAM LISTMEM &lt;GROUP&gt;</title>
1483 <para>
1484 List Local group members. The group must be specified by name.
1485 </para>
1487 </refsect2>
1489 <refsect2>
1490 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
1492 <para>
1493 List the specified set of accounts by name. If verbose is specified,
1494 the rid and description is also provided for each account.
1495 </para>
1497 </refsect2>
1499 <refsect2>
1500 <title>SAM RIGHTS LIST</title>
1502 <para>
1503 List all available privileges.
1504 </para>
1506 </refsect2>
1508 <refsect2>
1509 <title>SAM RIGHTS GRANT &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1511 <para>
1512 Grant one or more privileges to a user.
1513 </para>
1515 </refsect2>
1517 <refsect2>
1518 <title>SAM RIGHTS REVOKE &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1520 <para>
1521 Revoke one or more privileges from a user.
1522 </para>
1524 </refsect2>
1526 <refsect2>
1527 <title>SAM SHOW &lt;NAME&gt;</title>
1529 <para>
1530 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1531 account.
1532 </para>
1534 </refsect2>
1536 <refsect2>
1537 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1539 <para>
1540 Set the home directory for a user account.
1541 </para>
1543 </refsect2>
1545 <refsect2>
1546 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1548 <para>
1549 Set the profile path for a user account.
1550 </para>
1552 </refsect2>
1554 <refsect2>
1555 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1557 <para>
1558 Set the comment for a user or group account.
1559 </para>
1561 </refsect2>
1563 <refsect2>
1564 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1566 <para>
1567 Set the full name for a user account.
1568 </para>
1570 </refsect2>
1572 <refsect2>
1573 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1575 <para>
1576 Set the logon script for a user account.
1577 </para>
1579 </refsect2>
1581 <refsect2>
1582 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1584 <para>
1585 Set the home drive for a user account.
1586 </para>
1588 </refsect2>
1590 <refsect2>
1591 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1593 <para>
1594 Set the workstations a user account is allowed to log in from.
1595 </para>
1597 </refsect2>
1599 <refsect2>
1600 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1602 <para>
1603 Set the "disabled" flag for a user account.
1604 </para>
1606 </refsect2>
1608 <refsect2>
1609 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1611 <para>
1612 Set the "password not required" flag for a user account.
1613 </para>
1615 </refsect2>
1617 <refsect2>
1618 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1620 <para>
1621 Set the "autolock" flag for a user account.
1622 </para>
1624 </refsect2>
1626 <refsect2>
1627 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1629 <para>
1630 Set the "password do not expire" flag for a user account.
1631 </para>
1633 </refsect2>
1635 <refsect2>
1636 <title>SAM SET PWDMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1638 <para>
1639 Set or unset the "password must change" flag for a user account.
1640 </para>
1642 </refsect2>
1644 <refsect2>
1645 <title>SAM POLICY LIST</title>
1647 <para>
1648 List the available account policies.
1649 </para>
1651 </refsect2>
1653 <refsect2>
1654 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1656 <para>
1657 Show the account policy value.
1658 </para>
1660 </refsect2>
1662 <refsect2>
1663 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1665 <para>
1666 Set a value for the account policy.
1667 Valid values can be: "forever", "never", "off", or a number.
1668 </para>
1670 </refsect2>
1672 <refsect2>
1673 <title>SAM PROVISION</title>
1675 <para>
1676 Only available if ldapsam:editposix is set and winbindd is running.
1677 Properly populates the ldap tree with the basic accounts (Administrator)
1678 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1679 </para>
1681 </refsect2>
1683 <refsect2>
1684 <title>IDMAP DUMP &lt;local tdb file name&gt;</title>
1686 <para>
1687 Dumps the mappings contained in the local tdb file specified.
1688 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1689 </para>
1691 </refsect2>
1693 <refsect2>
1694 <title>IDMAP RESTORE [input file]</title>
1696 <para>
1697 Restore the mappings from the specified file or stdin.
1698 </para>
1700 </refsect2>
1702 <refsect2>
1703 <title>IDMAP SET SECRET &lt;DOMAIN&gt; &lt;secret&gt;</title>
1705 <para>
1706 Store a secret for the specified domain, used primarily for domains
1707 that use idmap_ldap as a backend. In this case the secret is used
1708 as the password for the user DN used to bind to the ldap server.
1709 </para>
1711 </refsect2>
1713 <refsect2>
1714 <title>IDMAP SET RANGE &lt;RANGE&gt; &lt;SID&gt; [index] [--db=&lt;DB&gt;]</title>
1716 <para>
1717 Store a domain-range mapping for a given domain (and index) in autorid database.
1718 </para>
1720 </refsect2>
1722 <refsect2>
1723 <title>IDMAP SET CONFIG &lt;config&gt; [--db=&lt;DB&gt;]</title>
1725 <para>
1726 Update CONFIG entry in autorid database.
1727 </para>
1729 </refsect2>
1731 <refsect2>
1732 <title>IDMAP GET RANGE &lt;SID&gt; [index] [--db=&lt;DB&gt;]</title>
1734 <para>
1735 Get the range for a given domain and index from autorid database.
1736 </para>
1738 </refsect2>
1740 <refsect2>
1741 <title>IDMAP GET RANGES [&lt;SID&gt;] [--db=&lt;DB&gt;]</title>
1743 <para>
1744 Get ranges for all domains or for one identified by given SID.
1745 </para>
1747 </refsect2>
1749 <refsect2>
1750 <title>IDMAP GET CONFIG [--db=&lt;DB&gt;]</title>
1752 <para>
1753 Get CONFIG entry from autorid database.
1754 </para>
1756 </refsect2>
1758 <refsect2>
1760 <title>IDMAP DELETE MAPPING [-f] [--db=&lt;DB&gt;] &lt;ID&gt;</title>
1762 <para>
1763 Delete a mapping sid &lt;-&gt; gid or sid &lt;-&gt; uid from the IDMAP database.
1764 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".
1765 Use -f to delete an invalid partial mapping &lt;ID&gt; -&gt; xx
1766 </para>
1767 <para>
1768   Use "smbcontrol all idmap ..." to notify running smbd instances.
1769   See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
1770   <manvolnum>1</manvolnum></citerefentry> manpage for details.
1771 </para>
1772 </refsect2>
1774 <refsect2>
1775 <title>IDMAP DELETE RANGE [-f] [--db=&lt;TDB&gt;] &lt;RANGE&gt;|(&lt;SID&gt; [&lt;INDEX&gt;])</title>
1777 <para>
1778 Delete a domain range mapping identified by 'RANGE' or "domain SID and INDEX" from autorid database.
1779 Use -f to delete invalid mappings.
1780 </para>
1782 </refsect2>
1784 <refsect2>
1785 <title>IDMAP DELETE RANGES [-f] [--db=&lt;TDB&gt;] &lt;SID&gt;</title>
1787 <para>
1788 Delete all domain range mappings for a domain identified by SID.
1789 Use -f to delete invalid mappings.
1790 </para>
1792 </refsect2>
1794 <refsect2>
1796 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=&lt;DB&gt;]</title>
1798 <para>
1799   Check and repair the IDMAP database. If no option is given a read only check
1800   of the database is done. Among others an interactive or automatic repair mode
1801   may be chosen with one of the following options:
1803   <variablelist>
1804     <varlistentry><term>-r|--repair</term>
1805     <listitem><para>
1806       Interactive repair mode, ask a lot of questions.
1807     </para></listitem>
1808     </varlistentry>
1810     <varlistentry><term>-a|--auto</term>
1811     <listitem><para>
1812       Noninteractive repair mode, use default answers.
1813     </para></listitem>
1814     </varlistentry>
1816     <varlistentry><term>-v|--verbose</term>
1817       <listitem><para>
1818         Produce more output.
1819       </para></listitem>
1820     </varlistentry>
1822     <varlistentry><term>-f|--force</term>
1823       <listitem><para>
1824         Try to apply changes, even if they do not apply cleanly.
1825       </para></listitem>
1826     </varlistentry>
1828     <varlistentry><term>-T|--test</term>
1829       <listitem><para>
1830         Dry run, show what changes would be made but don't touch anything.
1831       </para></listitem>
1832     </varlistentry>
1834     <varlistentry><term>-l|--lock</term>
1835       <listitem><para>
1836         Lock the database while doing the check.
1837       </para></listitem>
1838     </varlistentry>
1840     <varlistentry><term>--db &lt;DB&gt;</term>
1841       <listitem><para>
1842         Check the specified database.
1843       </para></listitem>
1844     </varlistentry>
1845     <varlistentry><term></term>
1846       <listitem><para>
1847       </para></listitem>
1848     </varlistentry>
1849   </variablelist>
1851   It reports about the finding of the following errors:
1853   <variablelist>
1854     <varlistentry><term>Missing reverse mapping:</term>
1855     <listitem><para>
1856       A record with mapping A-&gt;B where there is no B-&gt;A. Default action
1857       in repair mode is to "fix" this by adding the reverse mapping.
1858     </para></listitem>
1859     </varlistentry>
1861     <varlistentry><term>Invalid mapping:</term>
1862     <listitem><para>
1863       A record with mapping A-&gt;B where B-&gt;C. Default action
1864       is to "delete" this record.
1865     </para></listitem>
1866   </varlistentry>
1868   <varlistentry><term>Missing or invalid HWM:</term>
1869     <listitem><para>
1870       A high water mark is not at least equal to the largest ID in the
1871       database. Default action is to "fix" this by setting it to the
1872       largest ID found +1.
1873     </para></listitem>
1874   </varlistentry>
1876   <varlistentry><term>Invalid record:</term>
1877     <listitem><para>
1878       Something we failed to parse. Default action is to "edit" it
1879       in interactive and "delete" it in automatic mode.
1880     </para></listitem>
1881   </varlistentry>
1882 </variablelist>
1883 </para>
1884 </refsect2>
1887 <refsect2>
1888 <title>USERSHARE</title>
1890 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1891 non-root users to add user defined shares to be exported using the "net usershare"
1892 commands.
1893 </para>
1895 <para>
1896 To set this up, first set up your smb.conf by adding to the [global] section:
1898 usershare path = /usr/local/samba/lib/usershares
1900 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1901 set the group owner to the UNIX group who should have the ability to create usershares,
1902 for example a group called "serverops".
1904 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1906 (Owner and group all access, no access for others, plus the sticky bit,
1907 which means that a file in that directory can be renamed or deleted only
1908 by the owner of the file).
1910 Finally, tell smbd how many usershares you will allow by adding to the [global]
1911 section of smb.conf a line such as :
1913 usershare max shares = 100.
1915 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1916 can create user defined shares on demand using the commands below.
1917 </para>
1919 <para>The usershare commands are:
1921 <simplelist>
1922 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
1923 <member>net usershare delete sharename - to delete a user defined share.</member>
1924 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1925 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1926 </simplelist>
1928 </para>
1930 <refsect3>
1931 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1933 <para>
1934 Add or replace a new user defined share, with name "sharename".
1935 </para>
1937 <para>
1938 "path" specifies the absolute pathname on the system to be exported.
1939 Restrictions may be put on this, see the global smb.conf parameters:
1940 "usershare owner only", "usershare prefix allow list", and
1941 "usershare prefix deny list".
1942 </para>
1944 <para>
1945 The optional "comment" parameter is the comment that will appear
1946 on the share when browsed to by a client.
1947 </para>
1949 <para>The optional "acl" field
1950 specifies which users have read and write access to the entire share.
1951 Note that guest connections are not allowed unless the smb.conf parameter
1952 "usershare allow guests" has been set. The definition of a user
1953 defined share acl is: "user:permission", where user is a valid
1954 username on the system and permission can be "F", "R", or "D".
1955 "F" stands for "full permissions", ie. read and write permissions.
1956 "D" stands for "deny" for a user, ie. prevent this user from accessing
1957 this share.
1958 "R" stands for "read only", ie. only allow read access to this
1959 share (no creation of new files or directories or writing to files).
1960 </para>
1962 <para>
1963 The default if no "acl" is given is "Everyone:R", which means any 
1964 authenticated user has read-only access.
1965 </para>
1967 <para>
1968 The optional "guest_ok" has the same effect as the parameter of the
1969 same name in smb.conf, in that it allows guest access to this user
1970 defined share. This parameter is only allowed if the global parameter
1971 "usershare allow guests" has been set to true in the smb.conf.
1972 </para>
1974 There is no separate command to modify an existing user defined share,
1975 just use the "net usershare add [sharename]" command using the same
1976 sharename as the one you wish to modify and specify the new options
1977 you wish. The Samba smbd daemon notices user defined share modifications
1978 at connect time so will see the change immediately, there is no need
1979 to restart smbd on adding, deleting or changing a user defined share.
1980 </refsect3>
1982 <refsect3>
1983 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1985 <para>
1986 Deletes the user defined share by name. The Samba smbd daemon
1987 immediately notices this change, although it will not disconnect
1988 any users currently connected to the deleted share.
1989 </para>
1991 </refsect3>
1993 <refsect3>
1994 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1996 <para>
1997 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1998 </para>
2000 <para>
2001 net usershare info on its own dumps out info on the user defined shares that were
2002 created by the current user, or restricts them to share names that match the given
2003 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
2004 If the '-l' or '--long' option is also given, it prints out info on user defined
2005 shares created by other users.
2006 </para>
2008 <para>
2009 The information given about a share looks like:
2011 [foobar]
2012 path=/home/jeremy
2013 comment=testme
2014 usershare_acl=Everyone:F
2015 guest_ok=n
2017 And is a list of the current settings of the user defined share that can be
2018 modified by the "net usershare add" command.
2019 </para>
2021 </refsect3>
2023 <refsect3>
2024 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
2026 <para>
2027 List all the user defined shares owned by the current user matching the given pattern, or all users.
2028 </para>
2030 <para>
2031 net usershare list on its own list out the names of the user defined shares that were
2032 created by the current user, or restricts the list to share names that match the given
2033 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
2034 If the '-l' or '--long' option is also given, it includes the names of user defined
2035 shares created by other users.
2036 </para>
2038 </refsect3>
2040 </refsect2>
2042 <refsect2>
2043 <title>[RPC] CONF</title>
2045 <para>Starting with version 3.2.0, a Samba server can be configured by data
2046 stored in registry. This configuration data can be edited with the new "net
2047 conf" commands. There is also the possibility to configure a remote Samba server
2048 by enabling the RPC conf mode and specifying the address of the remote server.
2049 </para>
2051 <para>
2052 The deployment of this configuration data can be activated in two levels from the
2053 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
2054 activated by setting <parameter>registry shares</parameter> to
2055 <quote>yes</quote> in the [global] section and global configuration options are
2056 activated by setting <smbconfoption name="include">registry</smbconfoption> in
2057 the [global] section for a mixed configuration or by setting
2058 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
2059 section for a registry-only configuration.
2060 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
2061 <manvolnum>5</manvolnum></citerefentry> manpage for details.
2062 </para>
2064 <para>The conf commands are:
2065 <simplelist>
2066 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
2067 format.</member>
2068 <member>net [rpc] conf import - Import configuration from file in smb.conf
2069 format.</member>
2070 <member>net [rpc] conf listshares - List the registry shares.</member>
2071 <member>net [rpc] conf drop - Delete the complete configuration from
2072 registry.</member>
2073 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
2074 <member>net [rpc] conf addshare - Create a new registry share.</member>
2075 <member>net [rpc] conf delshare - Delete a registry share.</member>
2076 <member>net [rpc] conf setparm - Store a parameter.</member>
2077 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
2078 <member>net [rpc] conf delparm - Delete a parameter.</member>
2079 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
2080 <member>net [rpc] conf setincludes - Set includes for a share.</member>
2081 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
2082 </simplelist>
2083 </para>
2085 <refsect3>
2086 <title>[RPC] CONF LIST</title>
2088 <para>
2089 Print the configuration data stored in the registry in a smb.conf-like format to
2090 standard output.
2091 </para>
2092 </refsect3>
2094 <refsect3>
2095 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
2097 <para>
2098 This command imports configuration from a file in smb.conf format.
2099 If a section encountered in the input file is present in registry,
2100 its contents is replaced. Sections of registry configuration that have
2101 no counterpart in the input file are not affected. If you want to delete these,
2102 you will have to use the "net conf drop" or "net conf delshare" commands.
2103 Optionally, a section may be specified to restrict the effect of the
2104 import command to that specific section. A test mode is enabled by specifying
2105 the parameter "-T" on the commandline. In test mode, no changes are made to the
2106 registry, and the resulting configuration is printed to standard output instead.
2107 </para>
2108 </refsect3>
2110 <refsect3>
2111 <title>[RPC] CONF LISTSHARES</title>
2113 <para>
2114 List the names of the shares defined in registry.
2115 </para>
2116 </refsect3>
2118 <refsect3>
2119 <title>[RPC] CONF DROP</title>
2121 <para>
2122 Delete the complete configuration data from registry.
2123 </para>
2124 </refsect3>
2126 <refsect3>
2127 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
2129 <para>
2130 Show the definition of the share or section specified. It is valid to specify
2131 "global" as sharename to retrieve the global configuration options from
2132 registry.
2133 </para>
2134 </refsect3>
2136 <refsect3>
2137 <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>
2139 <para>Create a new share definition in registry.
2140 The sharename and path have to be given. The share name may
2141 <emphasis>not</emphasis> be "global". Optionally, values for the very
2142 common options "writeable", "guest ok" and a "comment" may be specified.
2143 The same result may be obtained by a sequence of "net conf setparm"
2144 commands.
2145 </para>
2146 </refsect3>
2148 <refsect3>
2149 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
2151 <para>
2152 Delete a share definition from registry.
2153 </para>
2154 </refsect3>
2156 <refsect3>
2157 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
2159 <para>
2160 Store a parameter in registry. The section may be global or a sharename.
2161 The section is created if it does not exist yet.
2162 </para>
2163 </refsect3>
2165 <refsect3>
2166 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2168 <para>
2169 Show a parameter stored in registry.
2170 </para>
2171 </refsect3>
2173 <refsect3>
2174 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2176 <para>
2177 Delete a parameter stored in registry.
2178 </para>
2179 </refsect3>
2181 <refsect3>
2182 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
2184 <para>
2185 Get the list of includes for the provided section (global or share).
2186 </para>
2188 <para>
2189 Note that due to the nature of the registry database and the nature of include directives,
2190 the includes need special treatment: Parameters are stored in registry by the parameter
2191 name as valuename, so there is only ever one instance of a parameter per share.
2192 Also, a specific order like in a text file is not guaranteed. For all real
2193 parameters, this is perfectly ok, but the include directive is rather a meta
2194 parameter, for which, in the smb.conf text file, the place where it is specified
2195 between the other parameters is very important. This can not be achieved by the
2196 simple registry smbconf data model, so there is one ordered list of includes
2197 per share, and this list is evaluated after all the parameters of the share.
2198 </para>
2200 <para>
2201 Further note that currently, only files can be included from registry
2202 configuration. In the future, there will be the ability to include configuration
2203 data from other registry keys.
2204 </para>
2205 </refsect3>
2207 <refsect3>
2208 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
2210 <para>
2211 Set the list of includes for the provided section (global or share) to the given
2212 list of one or more filenames. The filenames may contain the usual smb.conf
2213 macros like %I.
2214 </para>
2215 </refsect3>
2217 <refsect3>
2218 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
2220 <para>
2221 Delete the list of includes from the provided section (global or share).
2222 </para>
2223 </refsect3>
2225 </refsect2>
2227 <refsect2>
2228 <title>REGISTRY</title>
2229 <para>
2230 Manipulate Samba's registry.
2231 </para>
2233 <para>The registry commands are:
2234 <simplelist>
2235 <member>net registry enumerate   - Enumerate registry keys and values.</member>
2236 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
2237 <member>net registry createkey   - Create a new registry key.</member>
2238 <member>net registry deletekey   - Delete a registry key.</member>
2239 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
2240 <member>net registry getvalue    - Print a registry value.</member>
2241 <member>net registry getvalueraw - Print a registry value (raw format).</member>
2242 <member>net registry setvalue    - Set a new registry value.</member>
2243 <member>net registry increment   - Increment a DWORD registry value under a lock.
2244 </member>
2245 <member>net registry deletevalue - Delete a registry value.</member>
2246 <member>net registry getsd       - Get security descriptor.</member>
2247 <member>net registry getsd_sdd1  - Get security descriptor in sddl format.
2248 </member>
2249 <member>net registry setsd_sdd1  - Set security descriptor from sddl format
2250 string.</member>
2251 <member>net registry import      - Import a registration entries (.reg) file.
2252 </member>
2253 <member>net registry export      - Export a registration entries (.reg) file.
2254 </member>
2255 <member>net registry convert     - Convert a registration entries (.reg) file.
2256 </member>
2257 <member>net registry check       - Check and repair a registry database.
2258 </member>
2259 </simplelist>
2260 </para>
2262 <refsect3>
2263   <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
2264   <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
2265   </para>
2266 </refsect3>
2268 <refsect3>
2269   <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
2270   <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
2271   </para>
2272 </refsect3>
2274 <refsect3>
2275   <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
2276   <para>Create a new <emphasis>key</emphasis> if not yet existing.
2277   </para>
2278 </refsect3>
2280 <refsect3>
2281   <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
2282   <para>Delete the given <emphasis>key</emphasis> and its
2283   values from the registry, if it has no subkeys.
2284   </para>
2285 </refsect3>
2287 <refsect3>
2288   <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
2289   <para>Delete the given <emphasis>key</emphasis> and all of its
2290   subkeys and values from the registry.
2291   </para>
2292 </refsect3>
2294 <refsect3>
2295   <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
2296   --><replaceable>name</replaceable></title>
2298   <para>Output type and actual value of the value <emphasis>name</emphasis>
2299   of the given <emphasis>key</emphasis>.
2300   </para>
2301 </refsect3>
2303 <refsect3>
2304   <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
2305   --><replaceable>name</replaceable></title>
2306   <para>Output the actual value of the value <emphasis>name</emphasis>
2307   of the given <emphasis>key</emphasis>.
2308   </para>
2309 </refsect3>
2311 <refsect3>
2312   <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
2313   --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
2314   --><replaceable>value</replaceable> ...<!--
2315   --></title>
2317   <para>Set the value <emphasis>name</emphasis>
2318   of an existing <emphasis>key</emphasis>.
2319   <emphasis>type</emphasis> may be one of
2320   <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
2321   <emphasis>dword</emphasis>.
2322   In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
2323   be given multiple times.
2324   </para>
2325 </refsect3>
2327 <refsect3>
2328   <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
2329   --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
2330   --></title>
2332   <para>Increment the DWORD value <emphasis>name</emphasis>
2333   of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
2334   while holding a g_lock.
2335   <emphasis>inc</emphasis> defaults to 1.
2336   </para>
2337 </refsect3>
2339 <refsect3>
2340   <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
2341   --><replaceable>name</replaceable></title>
2343   <para>Delete the value <emphasis>name</emphasis>
2344   of the given <emphasis>key</emphasis>.
2345   </para>
2346 </refsect3>
2348 <refsect3>
2349   <title>REGISTRY GETSD <replaceable>key</replaceable></title>
2351   <para>Get the security descriptor of the given <emphasis>key</emphasis>.
2352   </para>
2353 </refsect3>
2355 <refsect3>
2356   <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
2358   <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
2359   Security Descriptor Definition Language (SDDL) string.
2360   </para>
2361 </refsect3>
2363 <refsect3>
2364   <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
2365   --><replaceable>sd</replaceable></title>
2367   <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
2368   Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
2369   </para>
2370 </refsect3>
2372 <refsect3>
2373   <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
2374   --><replaceable> [--precheck &lt;check-file&gt;] [opt]</replaceable></title>
2375   <para>Import a registration entries (.reg) <emphasis>file</emphasis>.</para>
2376   <para>The following options are available:</para>
2377   <variablelist>
2378     <varlistentry><term>--precheck <replaceable>check-file</replaceable></term>
2379     <listitem><para>
2380       This is a mechanism to check the existence or non-existence of
2381       certain keys or values specified in a precheck file before applying
2382       the import file.
2383       The import file will only be applied if the precheck succeeds.
2384     </para>
2385     <para>
2386       The check-file follows the normal registry file syntax with the
2387       following semantics:
2388     </para>
2389       <itemizedlist>
2390         <listitem><para>&lt;value name&gt;=&lt;value&gt; checks whether the
2391           value exists and has the given value.</para></listitem>
2392         <listitem><para>&lt;value name&gt;=- checks whether the value does
2393           not exist.</para></listitem>
2394         <listitem><para>[key] checks whether the key exists.</para>
2395         </listitem>
2396         <listitem><para>[-key] checks whether the key does not exist.</para>
2397         </listitem>
2398       </itemizedlist>
2399     </listitem>
2400     </varlistentry>
2401   </variablelist>
2402 </refsect3>
2404 <refsect3>
2405   <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2406   --><replaceable>file</replaceable><!--
2407   --><replaceable>[opt]</replaceable></title>
2409   <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2410   <emphasis>file</emphasis>.
2411   </para>
2412 </refsect3>
2414 <refsect3>
2415   <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2416   --><replaceable>out</replaceable> <!--
2417   --><replaceable>[[inopt] outopt]</replaceable></title>
2419   <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2420   </para>
2421 </refsect3>
2423 <refsect3>
2424   <title>REGISTRY CHECK [-ravTl] [-o &lt;ODB&gt;] [--wipe] [&lt;DB&gt;]</title>
2425   <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
2427   <variablelist>
2428     <varlistentry><term>-r|--repair</term>
2429     <listitem><para>
2430       Interactive repair mode, ask a lot of questions.
2431     </para></listitem>
2432     </varlistentry>
2434     <varlistentry><term>-a|--auto</term>
2435     <listitem><para>
2436       Noninteractive repair mode, use default answers.
2437     </para></listitem>
2438     </varlistentry>
2440     <varlistentry><term>-v|--verbose</term>
2441       <listitem><para>
2442         Produce more output.
2443       </para></listitem>
2444     </varlistentry>
2446     <varlistentry><term>-T|--test</term>
2447       <listitem><para>
2448         Dry run, show what changes would be made but don't touch anything.
2449       </para></listitem>
2450     </varlistentry>
2452     <varlistentry><term>-l|--lock</term>
2453       <listitem><para>
2454         Lock the database while doing the check.
2455       </para></listitem>
2456     </varlistentry>
2458    <varlistentry><term>--reg-version={1,2,3}</term>
2459       <listitem><para>
2460         Specify the format of the registry database. If not given it defaults to
2461         the value of the binary or, if an registry.tdb is explizitly stated at
2462         the commandline, to the value found in the INFO/version record.
2463       </para></listitem>
2464     </varlistentry>
2466     <varlistentry><term>[--db] &lt;DB&gt;</term>
2467       <listitem><para>
2468         Check the specified database.
2469       </para></listitem>
2470     </varlistentry>
2472     <varlistentry><term>-o|--output &lt;ODB&gt;</term>
2473       <listitem><para>
2474         Create a new registry database &lt;ODB&gt; instead of modifying the
2475         input. If &lt;ODB&gt; is already existing --wipe may be used to
2476         overwrite it.
2477       </para></listitem>
2478     </varlistentry>
2480    <varlistentry><term>--wipe</term>
2481       <listitem><para>
2482         Replace the registry database instead of modifying the input or
2483         overwrite an existing output database.
2484       </para></listitem>
2485     </varlistentry>
2487     <varlistentry><term></term>
2488       <listitem><para>
2489       </para></listitem>
2490     </varlistentry>
2491   </variablelist>
2492   </para>
2493 </refsect3>
2495 </refsect2>
2497 <refsect2>
2498 <title>EVENTLOG</title>
2500 <para>Starting with version 3.4.0 net can read, dump, import and export native
2501 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2502 </para>
2504 <para>
2505 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2506 <emphasis>smb.conf</emphasis> file.
2507 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2508 </para>
2510 <para>The eventlog commands are:
2511 <simplelist>
2512 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2513 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2514 tdb based representation of eventlogs.</member>
2515 <member>net eventlog export - Export the samba internal tdb based representation
2516 of eventlogs into an eventlog *.evt file.</member>
2517 </simplelist>
2518 </para>
2520 <refsect3>
2521 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2523 <para>
2524 Prints a eventlog *.evt file to standard output.
2525 </para>
2526 </refsect3>
2528 <refsect3>
2529 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2531 <para>
2532 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2533 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2534 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2535 defined in smb.conf.
2536 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2537 </para>
2539 </refsect3>
2541 <refsect3>
2542 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2544 <para>
2545 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2546 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2547 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2548 defined in smb.conf.
2549 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2550 </para>
2552 </refsect3>
2554 </refsect2>
2556 <refsect2>
2557 <title>DOM</title>
2559 <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.
2560 </para>
2561 <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.
2562 </para>
2564 <para>The client side support for remote join is implemented in the net dom commands which are:
2565 <simplelist>
2566 <member>net dom join - Join a remote computer into a domain.</member>
2567 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2568 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2569 </simplelist>
2570 </para>
2572 <refsect3>
2573 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2575 <para>
2576 Joins a computer into a domain. This command supports the following additional parameters:
2577 </para>
2579 <itemizedlist>
2581 <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>
2583 <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>
2585 <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>
2587 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2589 <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>
2591 </itemizedlist>
2593 <para>
2594 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.
2595 </para>
2596 <para>
2597         Example:
2598         net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2599 </para>
2600 <para>
2601 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.
2602 </para>
2604 </refsect3>
2606 <refsect3>
2607 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2609 <para>
2610 Unjoins a computer from a domain. This command supports the following additional parameters:
2611 </para>
2613 <itemizedlist>
2615 <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>
2617 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2619 <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>
2621 </itemizedlist>
2623 <para>
2624 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.
2625 </para>
2626 <para>
2627         Example:
2628         net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2629 </para>
2630 <para>
2631 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.
2632 </para>
2634 </refsect3>
2636 <refsect3>
2637 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2639 <para>
2640 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2641 </para>
2643 <itemizedlist>
2645 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2647 <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>
2649 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2651 <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>
2653 </itemizedlist>
2655 <para>
2656 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.
2657 </para>
2658 <para>
2659         Example:
2660         net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2661 </para>
2662 <para>
2663 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.
2664 </para>
2666 </refsect3>
2668 </refsect2>
2670 <refsect2>
2671 <title>G_LOCK</title>
2673 <para>Manage global locks.</para>
2675 <refsect3>
2676 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2678 <para>
2679 Execute a shell command under a global lock. This might be useful to define the
2680 order in which several shell commands will be executed. The locking information
2681 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2682 running, the locking information will be available on all cluster nodes.
2683 </para>
2685 <itemizedlist>
2686 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2687 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2688 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2689 </itemizedlist>
2690 </refsect3>
2692 <refsect3>
2693 <title>G_LOCK LOCKS</title>
2695 <para>
2696 Print a list of all currently existing locknames.
2697 </para>
2698 </refsect3>
2700 <refsect3>
2701 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2703 <para>
2704 Dump the locking table of a certain global lock.
2705 </para>
2706 </refsect3>
2708 </refsect2>
2710 <refsect2>
2711 <title>HELP [COMMAND]</title>
2713 <para>Gives usage information for the specified command.</para>
2715 </refsect2>
2717 </refsect1>
2719 <refsect1>
2720         <title>VERSION</title>
2722         <para>This man page is complete for version 3 of the Samba 
2723         suite.</para>
2724 </refsect1>
2726 <refsect1>
2727         <title>AUTHOR</title>
2728         
2729         <para>The original Samba software and related utilities 
2730         were created by Andrew Tridgell. Samba is now developed
2731         by the Samba Team as an Open Source project similar 
2732         to the way the Linux kernel is developed.</para>
2734         <para>The net manpage was written by Jelmer Vernooij.</para>
2735         
2736 </refsect1>
2738 </refentry>