docs: add net idmap specific options in net manpage.
[Samba.git] / docs-xml / manpages / net.8.xml
blob141f74f59ecf5aa3bce09b9fd64d920c97be59c4
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.0</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                 <!-- Options for net rpc vampire -->
188                 <varlistentry>
189                 <term>--force-full-repl</term>
190                 <listitem><para>
191                                 When calling "net rpc vampire keytab" this option
192                                 enforces a full re-creation of the generated keytab file.
193                 </para></listitem>
194                 </varlistentry>
196                 <varlistentry>
197                 <term>--single-obj-repl</term>
198                 <listitem><para>
199                                 When calling "net rpc vampire keytab" this option
200                                 allows to replicate just a single object to the generated keytab file.
201                 </para></listitem>
202                 </varlistentry>
204                 <varlistentry>
205                 <term>--clean-old-entries</term>
206                 <listitem><para>
207                                 When calling "net rpc vampire keytab" this option
208                                 allows to cleanup old entries from the generated keytab file.
209                 </para></listitem>
210                 </varlistentry>
212                 <!-- Options for net idmap -->
214                 <varlistentry>
215                 <term>--db</term>
216                 <listitem><para>Define dbfile for "net idmap" commands.
217                 </para></listitem>
218                 </varlistentry>
220                 <varlistentry>
221                 <term>--lock</term>
222                 <listitem><para>Activates locking of the dbfile for "net idmap check" command.
223                 </para></listitem>
224                 </varlistentry>
226                 <varlistentry>
227                 <term>-a|--auto</term>
228                 <listitem><para>Activates noninteractive mode in "net idmap check".
229                 </para></listitem>
230                 </varlistentry>
232                 <varlistentry>
233                 <term>--repair</term>
234                 <listitem><para>Activates repair mode in "net idmap check".
235                 </para></listitem>
236                 </varlistentry>
238                 &stdarg.encrypt;
239                 &popt.common.samba.client;
241         </variablelist>
242 </refsect1>
244 <refsect1>
245 <title>COMMANDS</title>
247 <refsect2>
248 <title>CHANGESECRETPW</title>
250 <para>This command allows the Samba machine account password to be set from an external application
251 to a machine account password that has already been stored in Active Directory. DO NOT USE this command
252 unless you know exactly what you are doing. The use of this command requires that the force flag (-f)
253 be used also. There will be NO command prompt. Whatever information is piped into stdin, either by
254 typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use
255 this without care and attention as it will overwrite a legitimate machine password without warning.
256 YOU HAVE BEEN WARNED.
257 </para>
259 </refsect2>
261 <refsect2>
262         <title>TIME</title>
264         <para>The <command>NET TIME</command> command allows you to view the time on a remote server
265         or synchronise the time on the local server with the time on the remote server.</para>
267 <refsect3>
268 <title>TIME</title>
270 <para>Without any options, the <command>NET TIME</command> command 
271 displays the time on the remote server.
272 </para>
274 </refsect3>
276 <refsect3>
277 <title>TIME SYSTEM</title>
279 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.</para>
281 </refsect3>
283 <refsect3>
284 <title>TIME SET</title>
285 <para>Tries to set the date and time of the local server to that on 
286 the remote server using <command>/bin/date</command>. </para>
288 </refsect3>
290 <refsect3>
291 <title>TIME ZONE</title>
293 <para>Displays the timezone in hours from GMT on the remote computer.</para>
295 </refsect3>
296 </refsect2>
298 <refsect2>
299 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN]
300 [createcomputer=OU] [machinepass=PASS] [osName=string osVer=string] [options]</title>
302 <para>
303 Join a domain.  If the account already exists on the server, and 
304 [TYPE] is MEMBER, the machine will attempt to join automatically. 
305 (Assuming that the machine has been created in server manager)
306 Otherwise, a password will be prompted for, and a new account may
307 be created.</para>
309 <para>
310 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
311 joining the domain.
312 </para>
314 <para>
315 [UPN] (ADS only) set the principalname attribute during the join.  The default
316 format is host/netbiosname@REALM.
317 </para>
319 <para>
320 [OU] (ADS only) Precreate the computer account in a specific OU.  The
321 OU string reads from top to bottom without RDNs, and is delimited by
322 a '/'.  Please note that '\' is used for escape by both the shell
323 and ldap, so it may need to be doubled or quadrupled to pass through, 
324 and it is not used as a delimiter.
325 </para>
326 <para>
327 [PASS] (ADS only) Set a specific password on the computer account
328 being created by the join.
329 </para>
330 <para>
331 [osName=string osVer=String] (ADS only) Set the operatingSystem and
332 operatingSystemVersion attribute during the join.  Both parameters
333 must be specified for either to take effect.
334 </para>
335 </refsect2>
337 <refsect2>
338 <title>[RPC] OLDJOIN [options]</title>
340 <para>Join a domain. Use the OLDJOIN option to join the domain 
341 using the old style of domain joining - you need to create a trust 
342 account in server manager first.</para>
343 </refsect2>
345 <refsect2>
346 <title>[RPC|ADS] USER</title>
348 <refsect3>
349 <title>[RPC|ADS] USER</title>
351 <para>List all users</para>
353 </refsect3>
355 <refsect3>
356 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
358 <para>Delete specified user</para>
360 </refsect3>
362 <refsect3>
363 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
365 <para>List the domain groups of the specified user.</para>
367 </refsect3>
369 <refsect3>
370 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
372 <para>Rename specified user.</para>
374 </refsect3>
376 <refsect3>
377 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
379 <para>Add specified user.</para>
380 </refsect3>
381 </refsect2>
383 <refsect2>
384 <title>[RPC|ADS] GROUP</title>
386 <refsect3>
387 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
388 <para>List user groups.</para>
389 </refsect3>
391 <refsect3>
392 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
394 <para>Delete specified group.</para>
396 </refsect3>
398 <refsect3>
399 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
401 <para>Create specified group.</para>
403 </refsect3>
404 </refsect2>
406 <refsect2>
407 <title>[RAP|RPC] SHARE</title>
409 <refsect3>
410 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
412 <para>Enumerates all exported resources (network shares) on target server.</para>
414 </refsect3>
416 <refsect3>
417 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
419 <para>Adds a share from a server (makes the export active). Maxusers 
420 specifies the number of users that can be connected to the 
421 share simultaneously.</para>
423 </refsect3>
425 <refsect3>
426 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
428 <para>Delete specified share.</para>
429 </refsect3>
430 </refsect2>
432 <refsect2>
433 <title>[RPC|RAP] FILE</title>
435 <refsect3>
436 <title>[RPC|RAP] FILE</title>
438 <para>List all open files on remote server.</para>
440 </refsect3>
442 <refsect3>
443 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
445 <para>Close file with specified <replaceable>fileid</replaceable> on 
446 remote server.</para>
448 </refsect3>
450 <refsect3>
451 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
453 <para>
454 Print information on specified <replaceable>fileid</replaceable>. 
455 Currently listed are: file-id, username, locks, path, permissions.
456 </para>
458 </refsect3>
460 <refsect3>
461 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
463 <para>
464 List files opened by specified <replaceable>user</replaceable>.
465 Please note that <command>net rap file user</command> does not work
466 against Samba servers. 
467 </para>
469 </refsect3>
471 </refsect2>
473 <refsect2>
474 <title>SESSION</title>
476 <refsect3>
477 <title>RAP SESSION</title>
479 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
480 sessions on the target server.</para>
482 </refsect3>
484 <refsect3>
485 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
487 <para>Close the specified sessions.</para>
489 </refsect3>
491 <refsect3>
492 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
494 <para>Give a list with all the open files in specified session.</para>
496 </refsect3>
498 </refsect2>
500 <refsect2>
501 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
503 <para>List all servers in specified domain or workgroup. Defaults
504 to local domain.</para>
506 </refsect2>
508 <refsect2>
509 <title>RAP DOMAIN</title>
511 <para>Lists all domains and workgroups visible on the 
512 current network.</para>
514 </refsect2>
516 <refsect2>
517 <title>RAP PRINTQ</title>
519 <refsect3>
520 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
522 <para>Lists the specified print queue and print jobs on the server.
523 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all 
524 queues are listed.</para>
526 </refsect3>
528 <refsect3>
529 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
531 <para>Delete job with specified id.</para>
533 </refsect3>
535 </refsect2>
537 <refsect2>
538 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
540 <para>
541 Validate whether the specified user can log in to the 
542 remote server. If the password is not specified on the commandline, it 
543 will be prompted. 
544 </para>
546 &not.implemented;
548 </refsect2>
550 <refsect2>
551 <title>RAP GROUPMEMBER</title>
553 <refsect3>
554 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
556 <para>List all members of the specified group.</para>
558 </refsect3>
560 <refsect3>
561 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
563 <para>Delete member from group.</para>
565 </refsect3>
567 <refsect3>
568 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
570 <para>Add member to group.</para>
572 </refsect3>
574 </refsect2>
576 <refsect2>
577 <title>RAP ADMIN <replaceable>command</replaceable></title>
579 <para>Execute the specified <replaceable>command</replaceable> on 
580 the remote server. Only works with OS/2 servers.
581 </para>
583 &not.implemented;
585 </refsect2>
587 <refsect2>
588 <title>RAP SERVICE</title>
590 <refsect3>
591 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
593 <para>Start the specified service on the remote server. Not implemented yet.</para>
595 &not.implemented;
597 </refsect3>
599 <refsect3>
600 <title>RAP SERVICE STOP</title>
602 <para>Stop the specified service on the remote server.</para>
604 &not.implemented;
606 </refsect3>
608 </refsect2>
610 <refsect2>
611 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
613 <para>
614 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
615 </para>
617 </refsect2>
619 <refsect2>
620 <title>LOOKUP</title>
622 <refsect3>
623 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
625 <para>
626 Lookup the IP address of the given host with the specified type (netbios suffix). 
627 The type defaults to 0x20 (workstation).
628 </para>
630 </refsect3>
632 <refsect3>
633 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
635 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
637 </refsect3>
639 <refsect3>
640 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
642 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
643 Defaults to local realm.</para>
645 </refsect3>
647 <refsect3>
648 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
650 <para>Give IP's of Domain Controllers for specified <replaceable>
651 DOMAIN</replaceable>. Defaults to local domain.</para>
653 </refsect3>
655 <refsect3>
656 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
658 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
659 or workgroup. Defaults to local domain.</para>
661 </refsect3>
663 </refsect2>
665 <refsect2>
666 <title>CACHE</title>
668 <para>Samba uses a general caching interface called 'gencache'. It 
669 can be controlled using 'NET CACHE'.</para>
671 <para>All the timeout parameters support the suffixes:
673 <simplelist>
674 <member>s - Seconds</member>
675 <member>m - Minutes</member>
676 <member>h - Hours</member>
677 <member>d - Days</member>
678 <member>w - Weeks</member>
679 </simplelist>
681 </para>
683 <refsect3>
684 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
686 <para>Add specified key+data to the cache with the given timeout.</para>
688 </refsect3>
690 <refsect3>
691 <title>CACHE DEL <replaceable>key</replaceable></title>
693 <para>Delete key from the cache.</para>
695 </refsect3>
697 <refsect3>
698 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
700 <para>Update data of existing cache entry.</para>
702 </refsect3>
704 <refsect3>
705 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
707 <para>Search for the specified pattern in the cache data.</para>
709 </refsect3>
711 <refsect3>
712 <title>CACHE LIST</title>
714 <para>
715 List all current items in the cache.
716 </para>
718 </refsect3>
720 <refsect3>
721 <title>CACHE FLUSH</title>
723 <para>Remove all the current items from the cache.</para>
725 </refsect3>
727 </refsect2>
729 <refsect2>
730 <title>GETLOCALSID [DOMAIN]</title>
732 <para>Prints the SID of the specified domain, or if the parameter is
733 omitted, the SID of the local server.</para>
735 </refsect2>
737 <refsect2>
738 <title>SETLOCALSID S-1-5-21-x-y-z</title>
740 <para>Sets SID for the local server to the specified SID.</para>
742 </refsect2>
744 <refsect2>
745 <title>GETDOMAINSID</title>
747 <para>Prints the local machine SID and the SID of the current 
748 domain.</para>
750 </refsect2>
752 <refsect2>
753 <title>SETDOMAINSID</title>
755 <para>Sets the SID of the current domain.</para>
757 </refsect2>
759 <refsect2>
760 <title>GROUPMAP</title>
762 <para>Manage the mappings between Windows group SIDs and UNIX groups.
763 Common options include:</para>
765 <itemizedlist>
766 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
767 <listitem><para>ntgroup - Name of the Windows NT group (must be
768   resolvable to a SID</para></listitem>
769 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
770 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
771 <listitem><para>type - Type of the group; either 'domain', 'local',
772   or 'builtin'</para></listitem>
773 <listitem><para>comment - Freeform text description of the group</para></listitem>
774 </itemizedlist>
776 <refsect3>
777 <title>GROUPMAP ADD</title>
779 <para>
780 Add a new group mapping entry:
781 <programlisting>
782 net groupmap add {rid=int|sid=string} unixgroup=string \
783         [type={domain|local}] [ntgroup=string] [comment=string]
784 </programlisting>
785 </para>
787 </refsect3>
789 <refsect3>
790 <title>GROUPMAP DELETE</title>
792 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
794 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
796 </refsect3>
798 <refsect3>
799 <title>GROUPMAP MODIFY</title>
801 <para>Update an existing group entry.</para>
803 <para>
804 <programlisting>
805 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
806        [comment=string] [type={domain|local}]
807 </programlisting>
808 </para>
809 </refsect3>
811 <refsect3>
812 <title>GROUPMAP LIST</title>
814 <para>List existing group mapping entries.</para>
816 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
818 </refsect3>
819 </refsect2>
823 <refsect2>
824 <title>MAXRID</title>
826 <para>Prints out the highest RID currently in use on the local
827 server (by the active 'passdb backend').
828 </para>
830 </refsect2>
832 <refsect2>
833 <title>RPC INFO</title>
835 <para>Print information about the domain of the remote server,
836 such as domain name, domain sid and number of users and groups.
837 </para>
839 </refsect2>
841 <refsect2>
842 <title>[RPC|ADS] TESTJOIN</title>
844 <para>Check whether participation in a domain is still valid.</para>
846 </refsect2>
848 <refsect2>
849 <title>[RPC|ADS] CHANGETRUSTPW</title>
851 <para>Force change of domain trust password.</para>
853 </refsect2>
855 <refsect2>
856 <title>RPC TRUSTDOM</title>
858 <refsect3>
859 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
861 <para>Add a interdomain trust account for <replaceable>DOMAIN</replaceable>. 
862 This is in fact a Samba account named <replaceable>DOMAIN$</replaceable> 
863 with the account flag <constant>'I'</constant> (interdomain trust account). 
864 This is required for incoming trusts to work. It makes Samba be a
865 trusted domain of the foreign (trusting) domain.
866 Users of the Samba domain will be made available in the foreign domain.
867 If the command is used against localhost it has the same effect as 
868 <command>smbpasswd -a -i DOMAIN</command>. Please note that both commands
869 expect a appropriate UNIX account. 
870 </para>
872 </refsect3>
874 <refsect3>
875 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
877 <para>Remove interdomain trust account for 
878 <replaceable>DOMAIN</replaceable>. If it is used against localhost 
879 it has the same effect as <command>smbpasswd -x DOMAIN$</command>. 
880 </para>
882 </refsect3>
884 <refsect3>
885 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
887 <para>
888 Establish a trust relationship to a trusted domain. 
889 Interdomain account must already be created on the remote PDC.
890 This is required for outgoing trusts to work. It makes Samba be a
891 trusting domain of a foreign (trusted) domain.
892 Users of the foreign domain will be made available in our domain.
893 You'll need winbind and a working idmap config to make them
894 appear in your system.
895 </para>
897 </refsect3>
899 <refsect3>
900 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
901 <para>Abandon relationship to trusted domain</para>
903 </refsect3>
905 <refsect3>
906 <title>RPC TRUSTDOM LIST</title>
908 <para>List all interdomain trust relationships.</para>
910 </refsect3>
911 </refsect2>
913 <refsect2>
914 <title>RPC TRUST</title>
916 <refsect3>
917 <title>RPC TRUST CREATE</title>
919 <para>Create a trust object by calling lsaCreateTrustedDomainEx2.
920 The can be done on a single server or on two servers at once with the
921 possibility to use a random trust password.</para>
923 <variablelist><title>Options:</title>
924 <varlistentry>
925 <term>otherserver</term>
926 <listitem><para>Domain controller of the second domain</para></listitem>
927 </varlistentry>
929 <varlistentry>
930 <term>otheruser</term>
931 <listitem><para>Admin user in the second domain</para></listitem>
932 </varlistentry>
934 <varlistentry>
935 <term>otherdomainsid</term>
936 <listitem><para>SID of the second domain</para></listitem>
937 </varlistentry>
939 <varlistentry>
940 <term>other_netbios_domain</term>
941 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
942 </varlistentry>
944 <varlistentry>
945 <term>otherdomain</term>
946 <listitem><para>DNS (full) name of the second domain</para></listitem>
947 </varlistentry>
949 <varlistentry>
950 <term>trustpw</term>
951 <listitem><para>Trust password</para></listitem>
952 </varlistentry>
953 </variablelist>
955 <variablelist><title>Examples:</title>
956 <varlistentry>
957 <term>Create a trust object on srv1.dom1.dom for the domain dom2</term>
958 <listitem><literallayout>
959 net rpc trust create \
960     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
961     other_netbios_domain=dom2 \
962     otherdomain=dom2.dom \
963     trustpw=12345678 \
964     -S srv1.dom1.dom
965 </literallayout></listitem>
966 </varlistentry>
967 <varlistentry>
968 <term>Create a trust relationship between dom1 and dom2</term>
969 <listitem><literallayout>
970 net rpc trust create \
971     otherserver=srv2.dom2.test \
972     otheruser=dom2adm \
973     -S srv1.dom1.dom
974 </literallayout></listitem>
975 </varlistentry>
976 </variablelist>
977 </refsect3>
979 <refsect3>
980 <title>RPC TRUST DELETE</title>
982 <para>Delete a trust object by calling lsaDeleteTrustedDomain.
983 The can be done on a single server or on two servers at once.</para>
985 <variablelist><title>Options:</title>
986 <varlistentry>
987 <term>otherserver</term>
988 <listitem><para>Domain controller of the second domain</para></listitem>
989 </varlistentry>
991 <varlistentry>
992 <term>otheruser</term>
993 <listitem><para>Admin user in the second domain</para></listitem>
994 </varlistentry>
996 <varlistentry>
997 <term>otherdomainsid</term>
998 <listitem><para>SID of the second domain</para></listitem>
999 </varlistentry>
1000 </variablelist>
1002 <variablelist><title>Examples:</title>
1003 <varlistentry>
1004 <term>Delete a trust object on srv1.dom1.dom for the domain dom2</term>
1005 <listitem><literallayout>
1006 net rpc trust delete \
1007     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
1008     -S srv1.dom1.dom
1009 </literallayout></listitem>
1010 </varlistentry>
1011 <varlistentry>
1012 <term>Delete a trust relationship between dom1 and dom2</term>
1013 <listitem><literallayout>
1014 net rpc trust delete \
1015     otherserver=srv2.dom2.test \
1016     otheruser=dom2adm \
1017     -S srv1.dom1.dom
1018 </literallayout></listitem>
1019 </varlistentry>
1020 </variablelist>
1021 </refsect3>
1023 </refsect2>
1025 <refsect2>
1026 <refsect3>
1027 <title>RPC RIGHTS</title>
1029 <para>This subcommand is used to view and manage Samba's rights assignments (also 
1030 referred to as privileges).  There are three options currently available: 
1031 <parameter>list</parameter>, <parameter>grant</parameter>, and 
1032 <parameter>revoke</parameter>.  More details on Samba's privilege model and its use
1033 can be found in the Samba-HOWTO-Collection.</para>
1035 </refsect3>
1038 </refsect2>
1040 <refsect2>
1041 <title>RPC ABORTSHUTDOWN</title>
1043 <para>Abort the shutdown of a remote server.</para>
1045 </refsect2>
1047 <refsect2>
1048 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
1050 <para>Shut down the remote server.</para>
1052 <variablelist>
1053 <varlistentry>
1054 <term>-r</term>
1055 <listitem><para>
1056 Reboot after shutdown.
1057 </para></listitem>
1058 </varlistentry>
1060 <varlistentry>
1061 <term>-f</term>
1062 <listitem><para>
1063 Force shutting down all applications.
1064 </para></listitem>
1065 </varlistentry>
1067 <varlistentry>
1068 <term>-t timeout</term>
1069 <listitem><para>
1070 Timeout before system will be shut down. An interactive 
1071 user of the system can use this time to cancel the shutdown.
1072 </para></listitem>
1073 </varlistentry>
1075 <varlistentry>
1076 <term>-C message</term>
1077 <listitem><para>Display the specified message on the screen to 
1078 announce the shutdown.</para></listitem>
1079 </varlistentry>
1080 </variablelist>
1082 </refsect2>
1084 <refsect2>
1085 <title>RPC SAMDUMP</title>
1087 <para>Print out sam database of remote server. You need
1088 to run this against the PDC, from a Samba machine joined as a BDC. </para>
1089 </refsect2>
1091 <refsect2>
1092 <title>RPC VAMPIRE</title>
1094 <para>Export users, aliases and groups from remote server to 
1095 local server.  You need to run this against the PDC, from a Samba machine joined as a BDC. 
1096 </para>
1097 </refsect2>
1099 <refsect2>
1100 <title>RPC VAMPIRE KEYTAB</title>
1102 <para>Dump remote SAM database to local Kerberos keytab file.
1103 </para>
1104 </refsect2>
1106 <refsect2>
1107 <title>RPC VAMPIRE LDIF</title>
1109 <para>Dump remote SAM database to local LDIF file or standard output.
1110 </para>
1111 </refsect2>
1113 <refsect2>
1114 <title>RPC GETSID</title>
1116 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename> (or <filename>secrets.ntdb</filename>). </para>
1118 </refsect2>
1120 <refsect2>
1121 <title>ADS LEAVE</title>
1123 <para>Make the remote host leave the domain it is part of. </para>
1125 </refsect2>
1127 <refsect2>
1128 <title>ADS STATUS</title>
1130 <para>Print out status of machine account of the local machine in ADS.
1131 Prints out quite some debug info. Aimed at developers, regular 
1132 users should use <command>NET ADS TESTJOIN</command>.</para>
1134 </refsect2>
1136 <refsect2>
1137 <title>ADS PRINTER</title>
1139 <refsect3>
1140 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1142 <para>
1143 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the 
1144 server name defaults to the local host.</para>
1146 </refsect3>
1148 <refsect3>
1149 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1151 <para>Publish specified printer using ADS.</para>
1153 </refsect3>
1155 <refsect3>
1156 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1158 <para>Remove specified printer from ADS directory.</para>
1160 </refsect3>
1162 </refsect2>
1164 <refsect2>
1165 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1167 <para>Perform a raw LDAP search on a ADS server and dump the results. The 
1168 expression is a standard LDAP search expression, and the 
1169 attributes are a list of LDAP fields to show in the results.</para>
1171 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1172 </para>
1174 </refsect2>
1176 <refsect2>
1177 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1179 <para>
1180 Perform a raw LDAP search on a ADS server and dump the results. The 
1181 DN standard LDAP DN, and the attributes are a list of LDAP fields 
1182 to show in the result. 
1183 </para>
1185 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1187 </refsect2>
1189 <refsect2>
1190 <title>ADS WORKGROUP</title>
1192 <para>Print out workgroup name for specified kerberos realm.</para>
1194 </refsect2>
1196 <refsect2>
1197 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
1199 <para>
1200 (Re)Create a BUILTIN group.
1201 Only a wellknown set of BUILTIN groups can be created with this command.
1202 This is the list of currently recognized group names: Administrators,
1203 Users, Guests, Power Users, Account Operators, Server Operators, Print
1204 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1205 compatible Access.
1207 This command requires a running Winbindd with idmap allocation properly
1208 configured. The group gid will be allocated out of the winbindd range.
1209 </para>
1211 </refsect2>
1213 <refsect2>
1214 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
1216 <para>
1217 Create a LOCAL group (also known as Alias).
1219 This command requires a running Winbindd with idmap allocation properly
1220 configured. The group gid will be allocated out of the winbindd range.
1221 </para>
1223 </refsect2>
1225 <refsect2>
1226 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
1228 <para>
1229 Delete an existing LOCAL group (also known as Alias).
1231 </para>
1233 </refsect2>
1235 <refsect2>
1236 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
1238 <para>
1239 Map an existing Unix group and make it a Domain Group, the domain group
1240 will have the same name.
1241 </para>
1243 </refsect2>
1245 <refsect2>
1246 <title>SAM UNMAPUNIXGROUP &lt;NAME&gt;</title>
1248 <para>
1249 Remove an existing group mapping entry.
1250 </para>
1252 </refsect2>
1254 <refsect2>
1255 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1257 <para>
1258 Add a member to a Local group. The group can be specified only by name,
1259 the member can be specified by name or SID.
1260 </para>
1262 </refsect2>
1264 <refsect2>
1265 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1267 <para>
1268 Remove a member from a Local group. The group and the member must be
1269 specified by name.
1270 </para>
1272 </refsect2>
1274 <refsect2>
1275 <title>SAM LISTMEM &lt;GROUP&gt;</title>
1277 <para>
1278 List Local group members. The group must be specified by name.
1279 </para>
1281 </refsect2>
1283 <refsect2>
1284 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
1286 <para>
1287 List the specified set of accounts by name. If verbose is specified,
1288 the rid and description is also provided for each account.
1289 </para>
1291 </refsect2>
1293 <refsect2>
1294 <title>SAM RIGHTS LIST</title>
1296 <para>
1297 List all available privileges.
1298 </para>
1300 </refsect2>
1302 <refsect2>
1303 <title>SAM RIGHTS GRANT &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1305 <para>
1306 Grant one or more privileges to a user.
1307 </para>
1309 </refsect2>
1311 <refsect2>
1312 <title>SAM RIGHTS REVOKE &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1314 <para>
1315 Revoke one or more privileges from a user.
1316 </para>
1318 </refsect2>
1320 <refsect2>
1321 <title>SAM SHOW &lt;NAME&gt;</title>
1323 <para>
1324 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1325 account.
1326 </para>
1328 </refsect2>
1330 <refsect2>
1331 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1333 <para>
1334 Set the home directory for a user account.
1335 </para>
1337 </refsect2>
1339 <refsect2>
1340 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1342 <para>
1343 Set the profile path for a user account.
1344 </para>
1346 </refsect2>
1348 <refsect2>
1349 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1351 <para>
1352 Set the comment for a user or group account.
1353 </para>
1355 </refsect2>
1357 <refsect2>
1358 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1360 <para>
1361 Set the full name for a user account.
1362 </para>
1364 </refsect2>
1366 <refsect2>
1367 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1369 <para>
1370 Set the logon script for a user account.
1371 </para>
1373 </refsect2>
1375 <refsect2>
1376 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1378 <para>
1379 Set the home drive for a user account.
1380 </para>
1382 </refsect2>
1384 <refsect2>
1385 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1387 <para>
1388 Set the workstations a user account is allowed to log in from.
1389 </para>
1391 </refsect2>
1393 <refsect2>
1394 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1396 <para>
1397 Set the "disabled" flag for a user account.
1398 </para>
1400 </refsect2>
1402 <refsect2>
1403 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1405 <para>
1406 Set the "password not required" flag for a user account.
1407 </para>
1409 </refsect2>
1411 <refsect2>
1412 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1414 <para>
1415 Set the "autolock" flag for a user account.
1416 </para>
1418 </refsect2>
1420 <refsect2>
1421 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1423 <para>
1424 Set the "password do not expire" flag for a user account.
1425 </para>
1427 </refsect2>
1429 <refsect2>
1430 <title>SAM SET PWDMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1432 <para>
1433 Set or unset the "password must change" flag for a user account.
1434 </para>
1436 </refsect2>
1438 <refsect2>
1439 <title>SAM POLICY LIST</title>
1441 <para>
1442 List the available account policies.
1443 </para>
1445 </refsect2>
1447 <refsect2>
1448 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1450 <para>
1451 Show the account policy value.
1452 </para>
1454 </refsect2>
1456 <refsect2>
1457 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1459 <para>
1460 Set a value for the account policy.
1461 Valid values can be: "forever", "never", "off", or a number.
1462 </para>
1464 </refsect2>
1466 <refsect2>
1467 <title>SAM PROVISION</title>
1469 <para>
1470 Only available if ldapsam:editposix is set and winbindd is running.
1471 Properly populates the ldap tree with the basic accounts (Administrator)
1472 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1473 </para>
1475 </refsect2>
1477 <refsect2>
1478 <title>IDMAP DUMP &lt;local tdb file name&gt;</title>
1480 <para>
1481 Dumps the mappings contained in the local tdb file specified.
1482 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1483 </para>
1485 </refsect2>
1487 <refsect2>
1488 <title>IDMAP RESTORE [input file]</title>
1490 <para>
1491 Restore the mappings from the specified file or stdin.
1492 </para>
1494 </refsect2>
1496 <refsect2>
1497 <title>IDMAP SECRET &lt;DOMAIN&gt; &lt;secret&gt;</title>
1499 <para>
1500 Store a secret for the specified domain, used primarily for domains
1501 that use idmap_ldap as a backend. In this case the secret is used
1502 as the password for the user DN used to bind to the ldap server.
1503 </para>
1505 </refsect2>
1507 <refsect2>
1509 <title>IDMAP DELETE [-f] [--db=&lt;DB&gt;] &lt;ID&gt;</title>
1511 <para>
1512 Delete a mapping sid &lt;-&gt; gid or sid &lt;-&gt; uid from the IDMAP database.
1513 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".
1514 Use -f to delete an invalid partial mapping &lt;ID&gt; -&gt; xx
1515 </para>
1516 <para>
1517   Use "smbcontrol all idmap ..." to notify running smbd instances.
1518   See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
1519   <manvolnum>1</manvolnum></citerefentry> manpage for details.
1520 </para>
1521 </refsect2>
1523 <refsect2>
1525 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=&lt;DB&gt;]</title>
1527 <para>
1528   Check and repair the IDMAP database. If no option is given a read only check
1529   of the database is done. Among others an interactive or automatic repair mode
1530   may be chosen with one of the following options:
1532   <variablelist>
1533     <varlistentry><term>-r|--repair</term>
1534     <listitem><para>
1535       Interactive repair mode, ask a lot of questions.
1536     </para></listitem>
1537     </varlistentry>
1539     <varlistentry><term>-a|--auto</term>
1540     <listitem><para>
1541       Noninteractive repair mode, use default answers.
1542     </para></listitem>
1543     </varlistentry>
1545     <varlistentry><term>-v|--verbose</term>
1546       <listitem><para>
1547         Produce more output.
1548       </para></listitem>
1549     </varlistentry>
1551     <varlistentry><term>-f|--force</term>
1552       <listitem><para>
1553         Try to apply changes, even if they do not apply cleanly.
1554       </para></listitem>
1555     </varlistentry>
1557     <varlistentry><term>-T|--test</term>
1558       <listitem><para>
1559         Dry run, show what changes would be made but don't touch anything.
1560       </para></listitem>
1561     </varlistentry>
1563     <varlistentry><term>-l|--lock</term>
1564       <listitem><para>
1565         Lock the database while doing the check.
1566       </para></listitem>
1567     </varlistentry>
1569     <varlistentry><term>--db &lt;DB&gt;</term>
1570       <listitem><para>
1571         Check the specified database.
1572       </para></listitem>
1573     </varlistentry>
1574     <varlistentry><term></term>
1575       <listitem><para>
1576       </para></listitem>
1577     </varlistentry>
1578   </variablelist>
1580   It reports about the finding of the following errors:
1582   <variablelist>
1583     <varlistentry><term>Missing reverse mapping:</term>
1584     <listitem><para>
1585       A record with mapping A-&gt;B where there is no B-&gt;A. Default action
1586       in repair mode is to "fix" this by adding the reverse mapping.
1587     </para></listitem>
1588     </varlistentry>
1590     <varlistentry><term>Invalid mapping:</term>
1591     <listitem><para>
1592       A record with mapping A-&gt;B where B-&gt;C. Default action
1593       is to "delete" this record.
1594     </para></listitem>
1595   </varlistentry>
1597   <varlistentry><term>Missing or invalid HWM:</term>
1598     <listitem><para>
1599       A high water mark is not at least equal to the largest ID in the
1600       database. Default action is to "fix" this by setting it to the
1601       largest ID found +1.
1602     </para></listitem>
1603   </varlistentry>
1605   <varlistentry><term>Invalid record:</term>
1606     <listitem><para>
1607       Something we failed to parse. Default action is to "edit" it
1608       in interactive and "delete" it in automatic mode.
1609     </para></listitem>
1610   </varlistentry>
1611 </variablelist>
1612 </para>
1613 </refsect2>
1616 <refsect2>
1617 <title>USERSHARE</title>
1619 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1620 non-root users to add user defined shares to be exported using the "net usershare"
1621 commands.
1622 </para>
1624 <para>
1625 To set this up, first set up your smb.conf by adding to the [global] section:
1627 usershare path = /usr/local/samba/lib/usershares
1629 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1630 set the group owner to the UNIX group who should have the ability to create usershares,
1631 for example a group called "serverops".
1633 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1635 (Owner and group all access, no access for others, plus the sticky bit,
1636 which means that a file in that directory can be renamed or deleted only
1637 by the owner of the file).
1639 Finally, tell smbd how many usershares you will allow by adding to the [global]
1640 section of smb.conf a line such as :
1642 usershare max shares = 100.
1644 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1645 can create user defined shares on demand using the commands below.
1646 </para>
1648 <para>The usershare commands are:
1650 <simplelist>
1651 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
1652 <member>net usershare delete sharename - to delete a user defined share.</member>
1653 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1654 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1655 </simplelist>
1657 </para>
1659 <refsect3>
1660 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1662 <para>
1663 Add or replace a new user defined share, with name "sharename".
1664 </para>
1666 <para>
1667 "path" specifies the absolute pathname on the system to be exported.
1668 Restrictions may be put on this, see the global smb.conf parameters:
1669 "usershare owner only", "usershare prefix allow list", and
1670 "usershare prefix deny list".
1671 </para>
1673 <para>
1674 The optional "comment" parameter is the comment that will appear
1675 on the share when browsed to by a client.
1676 </para>
1678 <para>The optional "acl" field
1679 specifies which users have read and write access to the entire share.
1680 Note that guest connections are not allowed unless the smb.conf parameter
1681 "usershare allow guests" has been set. The definition of a user
1682 defined share acl is: "user:permission", where user is a valid
1683 username on the system and permission can be "F", "R", or "D".
1684 "F" stands for "full permissions", ie. read and write permissions.
1685 "D" stands for "deny" for a user, ie. prevent this user from accessing
1686 this share.
1687 "R" stands for "read only", ie. only allow read access to this
1688 share (no creation of new files or directories or writing to files).
1689 </para>
1691 <para>
1692 The default if no "acl" is given is "Everyone:R", which means any 
1693 authenticated user has read-only access.
1694 </para>
1696 <para>
1697 The optional "guest_ok" has the same effect as the parameter of the
1698 same name in smb.conf, in that it allows guest access to this user
1699 defined share. This parameter is only allowed if the global parameter
1700 "usershare allow guests" has been set to true in the smb.conf.
1701 </para>
1703 There is no separate command to modify an existing user defined share,
1704 just use the "net usershare add [sharename]" command using the same
1705 sharename as the one you wish to modify and specify the new options
1706 you wish. The Samba smbd daemon notices user defined share modifications
1707 at connect time so will see the change immediately, there is no need
1708 to restart smbd on adding, deleting or changing a user defined share.
1709 </refsect3>
1711 <refsect3>
1712 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1714 <para>
1715 Deletes the user defined share by name. The Samba smbd daemon
1716 immediately notices this change, although it will not disconnect
1717 any users currently connected to the deleted share.
1718 </para>
1720 </refsect3>
1722 <refsect3>
1723 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1725 <para>
1726 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1727 </para>
1729 <para>
1730 net usershare info on its own dumps out info on the user defined shares that were
1731 created by the current user, or restricts them to share names that match the given
1732 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1733 If the '-l' or '--long' option is also given, it prints out info on user defined
1734 shares created by other users.
1735 </para>
1737 <para>
1738 The information given about a share looks like:
1740 [foobar]
1741 path=/home/jeremy
1742 comment=testme
1743 usershare_acl=Everyone:F
1744 guest_ok=n
1746 And is a list of the current settings of the user defined share that can be
1747 modified by the "net usershare add" command.
1748 </para>
1750 </refsect3>
1752 <refsect3>
1753 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1755 <para>
1756 List all the user defined shares owned by the current user matching the given pattern, or all users.
1757 </para>
1759 <para>
1760 net usershare list on its own list out the names of the user defined shares that were
1761 created by the current user, or restricts the list to share names that match the given
1762 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1763 If the '-l' or '--long' option is also given, it includes the names of user defined
1764 shares created by other users.
1765 </para>
1767 </refsect3>
1769 </refsect2>
1771 <refsect2>
1772 <title>[RPC] CONF</title>
1774 <para>Starting with version 3.2.0, a Samba server can be configured by data
1775 stored in registry. This configuration data can be edited with the new "net
1776 conf" commands. There is also the possibility to configure a remote Samba server
1777 by enabling the RPC conf mode and specifying the address of the remote server.
1778 </para>
1780 <para>
1781 The deployment of this configuration data can be activated in two levels from the
1782 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
1783 activated by setting <parameter>registry shares</parameter> to
1784 <quote>yes</quote> in the [global] section and global configuration options are
1785 activated by setting <smbconfoption name="include">registry</smbconfoption> in
1786 the [global] section for a mixed configuration or by setting
1787 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
1788 section for a registry-only configuration.
1789 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
1790 <manvolnum>5</manvolnum></citerefentry> manpage for details.
1791 </para>
1793 <para>The conf commands are:
1794 <simplelist>
1795 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
1796 format.</member>
1797 <member>net [rpc] conf import - Import configuration from file in smb.conf
1798 format.</member>
1799 <member>net [rpc] conf listshares - List the registry shares.</member>
1800 <member>net [rpc] conf drop - Delete the complete configuration from
1801 registry.</member>
1802 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
1803 <member>net [rpc] conf addshare - Create a new registry share.</member>
1804 <member>net [rpc] conf delshare - Delete a registry share.</member>
1805 <member>net [rpc] conf setparm - Store a parameter.</member>
1806 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
1807 <member>net [rpc] conf delparm - Delete a parameter.</member>
1808 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
1809 <member>net [rpc] conf setincludes - Set includes for a share.</member>
1810 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
1811 </simplelist>
1812 </para>
1814 <refsect3>
1815 <title>[RPC] CONF LIST</title>
1817 <para>
1818 Print the configuration data stored in the registry in a smb.conf-like format to
1819 standard output.
1820 </para>
1821 </refsect3>
1823 <refsect3>
1824 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
1826 <para>
1827 This command imports configuration from a file in smb.conf format.
1828 If a section encountered in the input file is present in registry,
1829 its contents is replaced. Sections of registry configuration that have
1830 no counterpart in the input file are not affected. If you want to delete these,
1831 you will have to use the "net conf drop" or "net conf delshare" commands.
1832 Optionally, a section may be specified to restrict the effect of the
1833 import command to that specific section. A test mode is enabled by specifying
1834 the parameter "-T" on the commandline. In test mode, no changes are made to the
1835 registry, and the resulting configuration is printed to standard output instead.
1836 </para>
1837 </refsect3>
1839 <refsect3>
1840 <title>[RPC] CONF LISTSHARES</title>
1842 <para>
1843 List the names of the shares defined in registry.
1844 </para>
1845 </refsect3>
1847 <refsect3>
1848 <title>[RPC] CONF DROP</title>
1850 <para>
1851 Delete the complete configuration data from registry.
1852 </para>
1853 </refsect3>
1855 <refsect3>
1856 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
1858 <para>
1859 Show the definition of the share or section specified. It is valid to specify
1860 "global" as sharename to retrieve the global configuration options from
1861 registry.
1862 </para>
1863 </refsect3>
1865 <refsect3>
1866 <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>
1868 <para>Create a new share definition in registry.
1869 The sharename and path have to be given. The share name may
1870 <emphasis>not</emphasis> be "global". Optionally, values for the very
1871 common options "writeable", "guest ok" and a "comment" may be specified.
1872 The same result may be obtained by a sequence of "net conf setparm"
1873 commands.
1874 </para>
1875 </refsect3>
1877 <refsect3>
1878 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
1880 <para>
1881 Delete a share definition from registry.
1882 </para>
1883 </refsect3>
1885 <refsect3>
1886 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
1888 <para>
1889 Store a parameter in registry. The section may be global or a sharename.
1890 The section is created if it does not exist yet.
1891 </para>
1892 </refsect3>
1894 <refsect3>
1895 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1897 <para>
1898 Show a parameter stored in registry.
1899 </para>
1900 </refsect3>
1902 <refsect3>
1903 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1905 <para>
1906 Delete a parameter stored in registry.
1907 </para>
1908 </refsect3>
1910 <refsect3>
1911 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
1913 <para>
1914 Get the list of includes for the provided section (global or share).
1915 </para>
1917 <para>
1918 Note that due to the nature of the registry database and the nature of include directives,
1919 the includes need special treatment: Parameters are stored in registry by the parameter
1920 name as valuename, so there is only ever one instance of a parameter per share.
1921 Also, a specific order like in a text file is not guaranteed. For all real
1922 parameters, this is perfectly ok, but the include directive is rather a meta
1923 parameter, for which, in the smb.conf text file, the place where it is specified
1924 between the other parameters is very important. This can not be achieved by the
1925 simple registry smbconf data model, so there is one ordered list of includes
1926 per share, and this list is evaluated after all the parameters of the share.
1927 </para>
1929 <para>
1930 Further note that currently, only files can be included from registry
1931 configuration. In the future, there will be the ability to include configuration
1932 data from other registry keys.
1933 </para>
1934 </refsect3>
1936 <refsect3>
1937 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
1939 <para>
1940 Set the list of includes for the provided section (global or share) to the given
1941 list of one or more filenames. The filenames may contain the usual smb.conf
1942 macros like %I.
1943 </para>
1944 </refsect3>
1946 <refsect3>
1947 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
1949 <para>
1950 Delete the list of includes from the provided section (global or share).
1951 </para>
1952 </refsect3>
1954 </refsect2>
1956 <refsect2>
1957 <title>REGISTRY</title>
1958 <para>
1959 Manipulate Samba's registry.
1960 </para>
1962 <para>The registry commands are:
1963 <simplelist>
1964 <member>net registry enumerate   - Enumerate registry keys and values.</member>
1965 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
1966 <member>net registry createkey   - Create a new registry key.</member>
1967 <member>net registry deletekey   - Delete a registry key.</member>
1968 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
1969 <member>net registry getvalue    - Print a registry value.</member>
1970 <member>net registry getvalueraw - Print a registry value (raw format).</member>
1971 <member>net registry setvalue    - Set a new registry value.</member>
1972 <member>net registry increment   - Increment a DWORD registry value under a lock.
1973 </member>
1974 <member>net registry deletevalue - Delete a registry value.</member>
1975 <member>net registry getsd       - Get security descriptor.</member>
1976 <member>net registry getsd_sdd1  - Get security descriptor in sddl format.
1977 </member>
1978 <member>net registry setsd_sdd1  - Set security descriptor from sddl format
1979 string.</member>
1980 <member>net registry import      - Import a registration entries (.reg) file.
1981 </member>
1982 <member>net registry export      - Export a registration entries (.reg) file.
1983 </member>
1984 <member>net registry convert     - Convert a registration entries (.reg) file.
1985 </member>
1986 <member>net registry check       - Check and repair a registry database.
1987 </member>
1988 </simplelist>
1989 </para>
1991 <refsect3>
1992   <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
1993   <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
1994   </para>
1995 </refsect3>
1997 <refsect3>
1998   <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
1999   <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
2000   </para>
2001 </refsect3>
2003 <refsect3>
2004   <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
2005   <para>Create a new <emphasis>key</emphasis> if not yet existing.
2006   </para>
2007 </refsect3>
2009 <refsect3>
2010   <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
2011   <para>Delete the given <emphasis>key</emphasis> and its
2012   values from the registry, if it has no subkeys.
2013   </para>
2014 </refsect3>
2016 <refsect3>
2017   <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
2018   <para>Delete the given <emphasis>key</emphasis> and all of its
2019   subkeys and values from the registry.
2020   </para>
2021 </refsect3>
2023 <refsect3>
2024   <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
2025   --><replaceable>name</replaceable></title>
2027   <para>Output type and actual value of the value <emphasis>name</emphasis>
2028   of the given <emphasis>key</emphasis>.
2029   </para>
2030 </refsect3>
2032 <refsect3>
2033   <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
2034   --><replaceable>name</replaceable></title>
2035   <para>Output the actual value of the value <emphasis>name</emphasis>
2036   of the given <emphasis>key</emphasis>.
2037   </para>
2038 </refsect3>
2040 <refsect3>
2041   <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
2042   --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
2043   --><replaceable>value</replaceable> ...<!--
2044   --></title>
2046   <para>Set the value <emphasis>name</emphasis>
2047   of an existing <emphasis>key</emphasis>.
2048   <emphasis>type</emphasis> may be one of
2049   <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
2050   <emphasis>dword</emphasis>.
2051   In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
2052   be given multiple times.
2053   </para>
2054 </refsect3>
2056 <refsect3>
2057   <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
2058   --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
2059   --></title>
2061   <para>Increment the DWORD value <emphasis>name</emphasis>
2062   of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
2063   while holding a g_lock.
2064   <emphasis>inc</emphasis> defaults to 1.
2065   </para>
2066 </refsect3>
2068 <refsect3>
2069   <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
2070   --><replaceable>name</replaceable></title>
2072   <para>Delete the value <emphasis>name</emphasis>
2073   of the given <emphasis>key</emphasis>.
2074   </para>
2075 </refsect3>
2077 <refsect3>
2078   <title>REGISTRY GETSD <replaceable>key</replaceable></title>
2080   <para>Get the security descriptor of the given <emphasis>key</emphasis>.
2081   </para>
2082 </refsect3>
2084 <refsect3>
2085   <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
2087   <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
2088   Security Descriptor Definition Language (SDDL) string.
2089   </para>
2090 </refsect3>
2092 <refsect3>
2093   <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
2094   --><replaceable>sd</replaceable></title>
2096   <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
2097   Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
2098   </para>
2099 </refsect3>
2101 <refsect3>
2102   <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
2103   --><replaceable> [--precheck &lt;check-file&gt;] [opt]</replaceable></title>
2104   <para>Import a registration entries (.reg) <emphasis>file</emphasis>.</para>
2105   <para>The following options are available:</para>
2106   <variablelist>
2107     <varlistentry><term>--precheck <replaceable>check-file</replaceable></term>
2108     <listitem><para>
2109       This is a mechanism to check the existence or non-existence of
2110       certain keys or values specified in a precheck file before applying
2111       the import file.
2112       The import file will only be applied if the precheck succeeds.
2113     </para>
2114     <para>
2115       The check-file follows the normal registry file syntax with the
2116       following semantics:
2117     </para>
2118       <itemizedlist>
2119         <listitem><para>&lt;value name&gt;=&lt;value&gt; checks whether the
2120           value exists and has the given value.</para></listitem>
2121         <listitem><para>&lt;value name&gt;=- checks whether the value does
2122           not exist.</para></listitem>
2123         <listitem><para>[key] checks whether the key exists.</para>
2124         </listitem>
2125         <listitem><para>[-key] checks whether the key does not exist.</para>
2126         </listitem>
2127       </itemizedlist>
2128     </listitem>
2129     </varlistentry>
2130   </variablelist>
2131 </refsect3>
2133 <refsect3>
2134   <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2135   --><replaceable>file</replaceable><!--
2136   --><replaceable>[opt]</replaceable></title>
2138   <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2139   <emphasis>file</emphasis>.
2140   </para>
2141 </refsect3>
2143 <refsect3>
2144   <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2145   --><replaceable>out</replaceable> <!--
2146   --><replaceable>[[inopt] outopt]</replaceable></title>
2148   <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2149   </para>
2150 </refsect3>
2152 <refsect3>
2153   <title>REGISTRY CHECK [-ravTl] [-o &lt;ODB&gt;] [--wipe] [&lt;DB&gt;]</title>
2154   <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
2156   <variablelist>
2157     <varlistentry><term>-r|--repair</term>
2158     <listitem><para>
2159       Interactive repair mode, ask a lot of questions.
2160     </para></listitem>
2161     </varlistentry>
2163     <varlistentry><term>-a|--auto</term>
2164     <listitem><para>
2165       Noninteractive repair mode, use default answers.
2166     </para></listitem>
2167     </varlistentry>
2169     <varlistentry><term>-v|--verbose</term>
2170       <listitem><para>
2171         Produce more output.
2172       </para></listitem>
2173     </varlistentry>
2175     <varlistentry><term>-T|--test</term>
2176       <listitem><para>
2177         Dry run, show what changes would be made but don't touch anything.
2178       </para></listitem>
2179     </varlistentry>
2181     <varlistentry><term>-l|--lock</term>
2182       <listitem><para>
2183         Lock the database while doing the check.
2184       </para></listitem>
2185     </varlistentry>
2187    <varlistentry><term>--reg-version={1,2,3}</term>
2188       <listitem><para>
2189         Specify the format of the registry database. If not given it defaults to
2190         the value of the binary or, if an registry.tdb is explizitly stated at
2191         the commandline, to the value found in the INFO/version record.
2192       </para></listitem>
2193     </varlistentry>
2195     <varlistentry><term>[--db] &lt;DB&gt;</term>
2196       <listitem><para>
2197         Check the specified database.
2198       </para></listitem>
2199     </varlistentry>
2201     <varlistentry><term>-o|--output &lt;ODB&gt;</term>
2202       <listitem><para>
2203         Create a new registry database &lt;ODB&gt; instead of modifying the
2204         input. If &lt;ODB&gt; is already existing --wipe may be used to
2205         overwrite it.
2206       </para></listitem>
2207     </varlistentry>
2209    <varlistentry><term>--wipe</term>
2210       <listitem><para>
2211         Replace the registry database instead of modifying the input or
2212         overwrite an existing output database.
2213       </para></listitem>
2214     </varlistentry>
2216     <varlistentry><term></term>
2217       <listitem><para>
2218       </para></listitem>
2219     </varlistentry>
2220   </variablelist>
2221   </para>
2222 </refsect3>
2224 </refsect2>
2226 <refsect2>
2227 <title>EVENTLOG</title>
2229 <para>Starting with version 3.4.0 net can read, dump, import and export native
2230 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2231 </para>
2233 <para>
2234 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2235 <emphasis>smb.conf</emphasis> file.
2236 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2237 </para>
2239 <para>The eventlog commands are:
2240 <simplelist>
2241 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2242 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2243 tdb based representation of eventlogs.</member>
2244 <member>net eventlog export - Export the samba internal tdb based representation
2245 of eventlogs into an eventlog *.evt file.</member>
2246 </simplelist>
2247 </para>
2249 <refsect3>
2250 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2252 <para>
2253 Prints a eventlog *.evt file to standard output.
2254 </para>
2255 </refsect3>
2257 <refsect3>
2258 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2260 <para>
2261 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2262 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2263 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2264 defined in smb.conf.
2265 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2266 </para>
2268 </refsect3>
2270 <refsect3>
2271 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2273 <para>
2274 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2275 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2276 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2277 defined in smb.conf.
2278 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2279 </para>
2281 </refsect3>
2283 </refsect2>
2285 <refsect2>
2286 <title>DOM</title>
2288 <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.
2289 </para>
2290 <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.
2291 </para>
2293 <para>The client side support for remote join is implemented in the net dom commands which are:
2294 <simplelist>
2295 <member>net dom join - Join a remote computer into a domain.</member>
2296 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2297 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2298 </simplelist>
2299 </para>
2301 <refsect3>
2302 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2304 <para>
2305 Joins a computer into a domain. This command supports the following additional parameters:
2306 </para>
2308 <itemizedlist>
2310 <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>
2312 <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>
2314 <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>
2316 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2318 <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>
2320 </itemizedlist>
2322 <para>
2323 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.
2324 </para>
2325 <para>
2326         Example:
2327         net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2328 </para>
2329 <para>
2330 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.
2331 </para>
2333 </refsect3>
2335 <refsect3>
2336 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2338 <para>
2339 Unjoins a computer from a domain. This command supports the following additional parameters:
2340 </para>
2342 <itemizedlist>
2344 <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>
2346 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2348 <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>
2350 </itemizedlist>
2352 <para>
2353 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.
2354 </para>
2355 <para>
2356         Example:
2357         net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2358 </para>
2359 <para>
2360 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.
2361 </para>
2363 </refsect3>
2365 <refsect3>
2366 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2368 <para>
2369 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2370 </para>
2372 <itemizedlist>
2374 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2376 <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>
2378 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2380 <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>
2382 </itemizedlist>
2384 <para>
2385 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.
2386 </para>
2387 <para>
2388         Example:
2389         net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2390 </para>
2391 <para>
2392 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.
2393 </para>
2395 </refsect3>
2397 </refsect2>
2399 <refsect2>
2400 <title>G_LOCK</title>
2402 <para>Manage global locks.</para>
2404 <refsect3>
2405 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2407 <para>
2408 Execute a shell command under a global lock. This might be useful to define the
2409 order in which several shell commands will be executed. The locking information
2410 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2411 running, the locking information will be available on all cluster nodes.
2412 </para>
2414 <itemizedlist>
2415 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2416 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2417 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2418 </itemizedlist>
2419 </refsect3>
2421 <refsect3>
2422 <title>G_LOCK LOCKS</title>
2424 <para>
2425 Print a list of all currently existing locknames.
2426 </para>
2427 </refsect3>
2429 <refsect3>
2430 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2432 <para>
2433 Dump the locking table of a certain global lock.
2434 </para>
2435 </refsect3>
2437 </refsect2>
2439 <refsect2>
2440 <title>HELP [COMMAND]</title>
2442 <para>Gives usage information for the specified command.</para>
2444 </refsect2>
2446 </refsect1>
2448 <refsect1>
2449         <title>VERSION</title>
2451         <para>This man page is complete for version 3 of the Samba 
2452         suite.</para>
2453 </refsect1>
2455 <refsect1>
2456         <title>AUTHOR</title>
2457         
2458         <para>The original Samba software and related utilities 
2459         were created by Andrew Tridgell. Samba is now developed
2460         by the Samba Team as an Open Source project similar 
2461         to the way the Linux kernel is developed.</para>
2463         <para>The net manpage was written by Jelmer Vernooij.</para>
2464         
2465 </refsect1>
2467 </refentry>