docs: Fix a typo
[Samba/bjacke.git] / docs-xml / manpages / net.8.xml
blobdd5b3ab1f26e02fb1eff05ecfa29f574eeca5574
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</arg>
26                 <arg choice="opt">-w workgroup</arg>
27                 <arg choice="opt">-W myworkgroup</arg>
28                 <arg choice="opt">-U user</arg>
29                 <arg choice="opt">-I ip-address</arg>
30                 <arg choice="opt">-p port</arg>
31                 <arg choice="opt">-n myname</arg>
32                 <arg choice="opt">-s conffile</arg>
33                 <arg choice="opt">-S server</arg>
34                 <arg choice="opt">-l</arg>
35                 <arg choice="opt">-P</arg>
36                 <arg choice="opt">-d debuglevel</arg>
37                 <arg choice="opt">-V</arg>
38                 <arg choice="opt">--request-timeout seconds</arg>
39         </cmdsynopsis>
40 </refsynopsisdiv>
42 <refsect1>
43         <title>DESCRIPTION</title>
45         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
46         <manvolnum>7</manvolnum></citerefentry> suite.</para>
48         <para>The Samba net utility is meant to work just like the net utility 
49         available for windows and DOS. The first argument should be used 
50         to specify the protocol to use when executing a certain command. 
51         ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3) 
52         clients and RPC can be used for NT4 and Windows 2000. If this 
53         argument is omitted, net will try to determine it automatically. 
54         Not all commands are available on all protocols.
55         </para>
57 </refsect1>
59 <refsect1>
60         <title>OPTIONS</title>
62         <variablelist>
63                 &stdarg.help;
64                 &stdarg.kerberos;
65                 
66                 <varlistentry>
67                 <term>-w target-workgroup</term>
68                 <listitem><para>
69                 Sets target workgroup or domain. You have to specify 
70                 either this option or the IP address or the name of a server.
71                 </para></listitem>
72                 </varlistentry>
74                 <varlistentry>
75                 <term>-W workgroup</term>
76                 <listitem><para>
77                 Sets client workgroup or domain
78                 </para></listitem>
79                 </varlistentry>
81                 <varlistentry>
82                 <term>-U user</term>
83                 <listitem><para>
84                 User name to use
85                 </para></listitem>
86                 </varlistentry>
88                 <varlistentry>
89                 <term>-I ip-address</term>
90                 <listitem><para>
91                 IP address of target server to use. You have to
92                 specify either this option or a target workgroup or
93                 a target server.
94                 </para></listitem>
95                 </varlistentry>
97                 <varlistentry>
98                 <term>-p port</term>
99                 <listitem><para>
100                 Port on the target server to connect to (usually 139 or 445). 
101                 Defaults to trying 445 first, then 139.
102                 </para></listitem>
103                 </varlistentry>
105                 &stdarg.netbios.name;
106                 &stdarg.configfile;
108                 <varlistentry>
109                 <term>-S server</term>
110                 <listitem><para>
111                 Name of target server. You should specify either 
112                 this option or a target workgroup or a target IP address.
113                 </para></listitem>
114                 </varlistentry>
116                 <varlistentry>
117                 <term>-l</term>
118                 <listitem><para>
119                 When listing data, give more information on each item.
120                 </para></listitem>
121                 </varlistentry>
123                 <varlistentry>
124                 <term>-P</term>
125                 <listitem><para>
126                 Make queries to the external server using the machine account of the local server.
127                 </para></listitem>
128                 </varlistentry>
130                 <varlistentry>
131                 <term>--request-timeout 30</term>
132                 <listitem><para>
133                 Let client requests timeout after 30 seconds the default is 10
134                 seconds.
135                 </para></listitem>
136                 </varlistentry>
138                 &stdarg.server.debug;
139         </variablelist>
140 </refsect1>
142 <refsect1>
143 <title>COMMANDS</title>
145 <refsect2>
146 <title>CHANGESECRETPW</title>
148 <para>This command allows the Samba machine account password to be set from an external application
149 to a machine account password that has already been stored in Active Directory. DO NOT USE this command
150 unless you know exactly what you are doing. The use of this command requires that the force flag (-f)
151 be used also. There will be NO command prompt. Whatever information is piped into stdin, either by
152 typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use
153 this without care and attention as it will overwrite a legitimate machine password without warning.
154 YOU HAVE BEEN WARNED.
155 </para>
157 </refsect2>
159 <refsect2>
160         <title>TIME</title>
162         <para>The <command>NET TIME</command> command allows you to view the time on a remote server
163         or synchronise the time on the local server with the time on the remote server.</para>
165 <refsect3>
166 <title>TIME</title>
168 <para>Without any options, the <command>NET TIME</command> command 
169 displays the time on the remote server.
170 </para>
172 </refsect3>
174 <refsect3>
175 <title>TIME SYSTEM</title>
177 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.</para>
179 </refsect3>
181 <refsect3>
182 <title>TIME SET</title>
183 <para>Tries to set the date and time of the local server to that on 
184 the remote server using <command>/bin/date</command>. </para>
186 </refsect3>
188 <refsect3>
189 <title>TIME ZONE</title>
191 <para>Displays the timezone in hours from GMT on the remote computer.</para>
193 </refsect3>
194 </refsect2>
196 <refsect2>
197 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN]
198 [createcomputer=OU] [machinepass=PASS] [osName=string osVer=string] [options]</title>
200 <para>
201 Join a domain.  If the account already exists on the server, and 
202 [TYPE] is MEMBER, the machine will attempt to join automatically. 
203 (Assuming that the machine has been created in server manager)
204 Otherwise, a password will be prompted for, and a new account may
205 be created.</para>
207 <para>
208 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
209 joining the domain.
210 </para>
212 <para>
213 [UPN] (ADS only) set the principalname attribute during the join.  The default
214 format is host/netbiosname@REALM.
215 </para>
217 <para>
218 [OU] (ADS only) Precreate the computer account in a specific OU.  The
219 OU string reads from top to bottom without RDNs, and is delimited by
220 a '/'.  Please note that '\' is used for escape by both the shell
221 and ldap, so it may need to be doubled or quadrupled to pass through, 
222 and it is not used as a delimiter.
223 </para>
224 <para>
225 [PASS] (ADS only) Set a specific password on the computer account
226 being created by the join.
227 </para>
228 <para>
229 [osName=string osVer=String] (ADS only) Set the operatingSystem and
230 operatingSystemVersion attribute during the join.  Both parameters
231 must be specified for either to take effect.
232 </para>
233 </refsect2>
235 <refsect2>
236 <title>[RPC] OLDJOIN [options]</title>
238 <para>Join a domain. Use the OLDJOIN option to join the domain 
239 using the old style of domain joining - you need to create a trust 
240 account in server manager first.</para>
241 </refsect2>
243 <refsect2>
244 <title>[RPC|ADS] USER</title>
246 <refsect3>
247 <title>[RPC|ADS] USER</title>
249 <para>List all users</para>
251 </refsect3>
253 <refsect3>
254 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
256 <para>Delete specified user</para>
258 </refsect3>
260 <refsect3>
261 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
263 <para>List the domain groups of the specified user.</para>
265 </refsect3>
267 <refsect3>
268 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
270 <para>Rename specified user.</para>
272 </refsect3>
274 <refsect3>
275 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
277 <para>Add specified user.</para>
278 </refsect3>
279 </refsect2>
281 <refsect2>
282 <title>[RPC|ADS] GROUP</title>
284 <refsect3>
285 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
286 <para>List user groups.</para>
287 </refsect3>
289 <refsect3>
290 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
292 <para>Delete specified group.</para>
294 </refsect3>
296 <refsect3>
297 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
299 <para>Create specified group.</para>
301 </refsect3>
302 </refsect2>
304 <refsect2>
305 <title>[RAP|RPC] SHARE</title>
307 <refsect3>
308 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
310 <para>Enumerates all exported resources (network shares) on target server.</para>
312 </refsect3>
314 <refsect3>
315 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
317 <para>Adds a share from a server (makes the export active). Maxusers 
318 specifies the number of users that can be connected to the 
319 share simultaneously.</para>
321 </refsect3>
323 <refsect3>
324 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
326 <para>Delete specified share.</para>
327 </refsect3>
328 </refsect2>
330 <refsect2>
331 <title>[RPC|RAP] FILE</title>
333 <refsect3>
334 <title>[RPC|RAP] FILE</title>
336 <para>List all open files on remote server.</para>
338 </refsect3>
340 <refsect3>
341 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
343 <para>Close file with specified <replaceable>fileid</replaceable> on 
344 remote server.</para>
346 </refsect3>
348 <refsect3>
349 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
351 <para>
352 Print information on specified <replaceable>fileid</replaceable>. 
353 Currently listed are: file-id, username, locks, path, permissions.
354 </para>
356 </refsect3>
358 <refsect3>
359 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
361 <para>
362 List files opened by specified <replaceable>user</replaceable>.
363 Please note that <command>net rap file user</command> does not work
364 against Samba servers. 
365 </para>
367 </refsect3>
369 </refsect2>
371 <refsect2>
372 <title>SESSION</title>
374 <refsect3>
375 <title>RAP SESSION</title>
377 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
378 sessions on the target server.</para>
380 </refsect3>
382 <refsect3>
383 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
385 <para>Close the specified sessions.</para>
387 </refsect3>
389 <refsect3>
390 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
392 <para>Give a list with all the open files in specified session.</para>
394 </refsect3>
396 </refsect2>
398 <refsect2>
399 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
401 <para>List all servers in specified domain or workgroup. Defaults
402 to local domain.</para>
404 </refsect2>
406 <refsect2>
407 <title>RAP DOMAIN</title>
409 <para>Lists all domains and workgroups visible on the 
410 current network.</para>
412 </refsect2>
414 <refsect2>
415 <title>RAP PRINTQ</title>
417 <refsect3>
418 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
420 <para>Lists the specified print queue and print jobs on the server.
421 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all 
422 queues are listed.</para>
424 </refsect3>
426 <refsect3>
427 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
429 <para>Delete job with specified id.</para>
431 </refsect3>
433 </refsect2>
435 <refsect2>
436 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
438 <para>
439 Validate whether the specified user can log in to the 
440 remote server. If the password is not specified on the commandline, it 
441 will be prompted. 
442 </para>
444 &not.implemented;
446 </refsect2>
448 <refsect2>
449 <title>RAP GROUPMEMBER</title>
451 <refsect3>
452 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
454 <para>List all members of the specified group.</para>
456 </refsect3>
458 <refsect3>
459 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
461 <para>Delete member from group.</para>
463 </refsect3>
465 <refsect3>
466 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
468 <para>Add member to group.</para>
470 </refsect3>
472 </refsect2>
474 <refsect2>
475 <title>RAP ADMIN <replaceable>command</replaceable></title>
477 <para>Execute the specified <replaceable>command</replaceable> on 
478 the remote server. Only works with OS/2 servers.
479 </para>
481 &not.implemented;
483 </refsect2>
485 <refsect2>
486 <title>RAP SERVICE</title>
488 <refsect3>
489 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
491 <para>Start the specified service on the remote server. Not implemented yet.</para>
493 &not.implemented;
495 </refsect3>
497 <refsect3>
498 <title>RAP SERVICE STOP</title>
500 <para>Stop the specified service on the remote server.</para>
502 &not.implemented;
504 </refsect3>
506 </refsect2>
508 <refsect2>
509 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
511 <para>
512 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
513 </para>
515 </refsect2>
517 <refsect2>
518 <title>LOOKUP</title>
520 <refsect3>
521 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
523 <para>
524 Lookup the IP address of the given host with the specified type (netbios suffix). 
525 The type defaults to 0x20 (workstation).
526 </para>
528 </refsect3>
530 <refsect3>
531 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
533 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
535 </refsect3>
537 <refsect3>
538 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
540 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
541 Defaults to local realm.</para>
543 </refsect3>
545 <refsect3>
546 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
548 <para>Give IP's of Domain Controllers for specified <replaceable>
549 DOMAIN</replaceable>. Defaults to local domain.</para>
551 </refsect3>
553 <refsect3>
554 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
556 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
557 or workgroup. Defaults to local domain.</para>
559 </refsect3>
561 </refsect2>
563 <refsect2>
564 <title>CACHE</title>
566 <para>Samba uses a general caching interface called 'gencache'. It 
567 can be controlled using 'NET CACHE'.</para>
569 <para>All the timeout parameters support the suffixes:
571 <simplelist>
572 <member>s - Seconds</member>
573 <member>m - Minutes</member>
574 <member>h - Hours</member>
575 <member>d - Days</member>
576 <member>w - Weeks</member>
577 </simplelist>
579 </para>
581 <refsect3>
582 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
584 <para>Add specified key+data to the cache with the given timeout.</para>
586 </refsect3>
588 <refsect3>
589 <title>CACHE DEL <replaceable>key</replaceable></title>
591 <para>Delete key from the cache.</para>
593 </refsect3>
595 <refsect3>
596 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
598 <para>Update data of existing cache entry.</para>
600 </refsect3>
602 <refsect3>
603 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
605 <para>Search for the specified pattern in the cache data.</para>
607 </refsect3>
609 <refsect3>
610 <title>CACHE LIST</title>
612 <para>
613 List all current items in the cache.
614 </para>
616 </refsect3>
618 <refsect3>
619 <title>CACHE FLUSH</title>
621 <para>Remove all the current items from the cache.</para>
623 </refsect3>
625 </refsect2>
627 <refsect2>
628 <title>GETLOCALSID [DOMAIN]</title>
630 <para>Prints the SID of the specified domain, or if the parameter is
631 omitted, the SID of the local server.</para>
633 </refsect2>
635 <refsect2>
636 <title>SETLOCALSID S-1-5-21-x-y-z</title>
638 <para>Sets SID for the local server to the specified SID.</para>
640 </refsect2>
642 <refsect2>
643 <title>GETDOMAINSID</title>
645 <para>Prints the local machine SID and the SID of the current 
646 domain.</para>
648 </refsect2>
650 <refsect2>
651 <title>SETDOMAINSID</title>
653 <para>Sets the SID of the current domain.</para>
655 </refsect2>
657 <refsect2>
658 <title>GROUPMAP</title>
660 <para>Manage the mappings between Windows group SIDs and UNIX groups.
661 Common options include:</para>
663 <itemizedlist>
664 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
665 <listitem><para>ntgroup - Name of the Windows NT group (must be
666   resolvable to a SID</para></listitem>
667 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
668 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
669 <listitem><para>type - Type of the group; either 'domain', 'local',
670   or 'builtin'</para></listitem>
671 <listitem><para>comment - Freeform text description of the group</para></listitem>
672 </itemizedlist>
674 <refsect3>
675 <title>GROUPMAP ADD</title>
677 <para>
678 Add a new group mapping entry:
679 <programlisting>
680 net groupmap add {rid=int|sid=string} unixgroup=string \
681         [type={domain|local}] [ntgroup=string] [comment=string]
682 </programlisting>
683 </para>
685 </refsect3>
687 <refsect3>
688 <title>GROUPMAP DELETE</title>
690 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
692 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
694 </refsect3>
696 <refsect3>
697 <title>GROUPMAP MODIFY</title>
699 <para>Update an existing group entry.</para>
701 <para>
702 <programlisting>
703 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
704        [comment=string] [type={domain|local}]
705 </programlisting>
706 </para>
707 </refsect3>
709 <refsect3>
710 <title>GROUPMAP LIST</title>
712 <para>List existing group mapping entries.</para>
714 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
716 </refsect3>
717 </refsect2>
721 <refsect2>
722 <title>MAXRID</title>
724 <para>Prints out the highest RID currently in use on the local
725 server (by the active 'passdb backend').
726 </para>
728 </refsect2>
730 <refsect2>
731 <title>RPC INFO</title>
733 <para>Print information about the domain of the remote server,
734 such as domain name, domain sid and number of users and groups.
735 </para>
737 </refsect2>
739 <refsect2>
740 <title>[RPC|ADS] TESTJOIN</title>
742 <para>Check whether participation in a domain is still valid.</para>
744 </refsect2>
746 <refsect2>
747 <title>[RPC|ADS] CHANGETRUSTPW</title>
749 <para>Force change of domain trust password.</para>
751 </refsect2>
753 <refsect2>
754 <title>RPC TRUSTDOM</title>
756 <refsect3>
757 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
759 <para>Add a interdomain trust account for <replaceable>DOMAIN</replaceable>. 
760 This is in fact a Samba account named <replaceable>DOMAIN$</replaceable> 
761 with the account flag <constant>'I'</constant> (interdomain trust account). 
762 This is required for incoming trusts to work. It makes Samba be a
763 trusted domain of the foreign (trusting) domain.
764 Users of the Samba domain will be made available in the foreign domain.
765 If the command is used against localhost it has the same effect as 
766 <command>smbpasswd -a -i DOMAIN</command>. Please note that both commands
767 expect a appropriate UNIX account. 
768 </para>
770 </refsect3>
772 <refsect3>
773 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
775 <para>Remove interdomain trust account for 
776 <replaceable>DOMAIN</replaceable>. If it is used against localhost 
777 it has the same effect as <command>smbpasswd -x DOMAIN$</command>. 
778 </para>
780 </refsect3>
782 <refsect3>
783 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
785 <para>
786 Establish a trust relationship to a trusted domain. 
787 Interdomain account must already be created on the remote PDC.
788 This is required for outgoing trusts to work. It makes Samba be a
789 trusting domain of a foreign (trusted) domain.
790 Users of the foreign domain will be made available in our domain.
791 You'll need winbind and a working idmap config to make them
792 appear in your system.
793 </para>
795 </refsect3>
797 <refsect3>
798 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
799 <para>Abandon relationship to trusted domain</para>
801 </refsect3>
803 <refsect3>
804 <title>RPC TRUSTDOM LIST</title>
806 <para>List all interdomain trust relationships.</para>
808 </refsect3>
809 </refsect2>
811 <refsect2>
812 <title>RPC TRUST</title>
814 <refsect3>
815 <title>RPC TRUST CREATE</title>
817 <para>Create a trust object by calling lsaCreateTrustedDomainEx2.
818 The can be done on a single server or on two servers at once with the
819 possibility to use a random trust password.</para>
821 <variablelist><title>Options:</title>
822 <varlistentry>
823 <term>otherserver</term>
824 <listitem><para>Domain controller of the second domain</para></listitem>
825 </varlistentry>
827 <varlistentry>
828 <term>otheruser</term>
829 <listitem><para>Admin user in the second domain</para></listitem>
830 </varlistentry>
832 <varlistentry>
833 <term>otherdomainsid</term>
834 <listitem><para>SID of the second domain</para></listitem>
835 </varlistentry>
837 <varlistentry>
838 <term>other_netbios_domain</term>
839 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
840 </varlistentry>
842 <varlistentry>
843 <term>otherdomain</term>
844 <listitem><para>DNS (full) name of the second domain</para></listitem>
845 </varlistentry>
847 <varlistentry>
848 <term>trustpw</term>
849 <listitem><para>Trust password</para></listitem>
850 </varlistentry>
851 </variablelist>
853 <variablelist><title>Examples:</title>
854 <varlistentry>
855 <term>Create a trust object on srv1.dom1.dom for the domain dom2</term>
856 <listitem><literallayout>
857 net rpc trust create \
858     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
859     other_netbios_domain=dom2 \
860     otherdomain=dom2.dom \
861     trustpw=12345678 \
862     -S srv1.dom1.dom
863 </literallayout></listitem>
864 </varlistentry>
865 <varlistentry>
866 <term>Create a trust relationship between dom1 and dom2</term>
867 <listitem><literallayout>
868 net rpc trust create \
869     otherserver=srv2.dom2.test \
870     otheruser=dom2adm \
871     -S srv1.dom1.dom
872 </literallayout></listitem>
873 </varlistentry>
874 </variablelist>
875 </refsect3>
877 <refsect3>
878 <title>RPC TRUST DELETE</title>
880 <para>Delete a trust trust object by calling lsaDeleteTrustedDomain.
881 The can be done on a single server or on two servers at once.</para>
883 <variablelist><title>Options:</title>
884 <varlistentry>
885 <term>otherserver</term>
886 <listitem><para>Domain controller of the second domain</para></listitem>
887 </varlistentry>
889 <varlistentry>
890 <term>otheruser</term>
891 <listitem><para>Admin user in the second domain</para></listitem>
892 </varlistentry>
894 <varlistentry>
895 <term>otherdomainsid</term>
896 <listitem><para>SID of the second domain</para></listitem>
897 </varlistentry>
898 </variablelist>
900 <variablelist><title>Examples:</title>
901 <varlistentry>
902 <term>Delete a trust object on srv1.dom1.dom for the domain dom2</term>
903 <listitem><literallayout>
904 net rpc trust delete \
905     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
906     -S srv1.dom1.dom
907 </literallayout></listitem>
908 </varlistentry>
909 <varlistentry>
910 <term>Delete a trust relationship between dom1 and dom2</term>
911 <listitem><literallayout>
912 net rpc trust delete \
913     otherserver=srv2.dom2.test \
914     otheruser=dom2adm \
915     -S srv1.dom1.dom
916 </literallayout></listitem>
917 </varlistentry>
918 </variablelist>
919 </refsect3>
921 </refsect2>
923 <refsect2>
924 <refsect3>
925 <title>RPC RIGHTS</title>
927 <para>This subcommand is used to view and manage Samba's rights assignments (also 
928 referred to as privileges).  There are three options currently available: 
929 <parameter>list</parameter>, <parameter>grant</parameter>, and 
930 <parameter>revoke</parameter>.  More details on Samba's privilege model and its use
931 can be found in the Samba-HOWTO-Collection.</para>
933 </refsect3>
936 </refsect2>
938 <refsect2>
939 <title>RPC ABORTSHUTDOWN</title>
941 <para>Abort the shutdown of a remote server.</para>
943 </refsect2>
945 <refsect2>
946 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
948 <para>Shut down the remote server.</para>
950 <variablelist>
951 <varlistentry>
952 <term>-r</term>
953 <listitem><para>
954 Reboot after shutdown.
955 </para></listitem>
956 </varlistentry>
958 <varlistentry>
959 <term>-f</term>
960 <listitem><para>
961 Force shutting down all applications.
962 </para></listitem>
963 </varlistentry>
965 <varlistentry>
966 <term>-t timeout</term>
967 <listitem><para>
968 Timeout before system will be shut down. An interactive 
969 user of the system can use this time to cancel the shutdown.
970 </para></listitem>
971 </varlistentry>
973 <varlistentry>
974 <term>-C message</term>
975 <listitem><para>Display the specified message on the screen to 
976 announce the shutdown.</para></listitem>
977 </varlistentry>
978 </variablelist>
980 </refsect2>
982 <refsect2>
983 <title>RPC SAMDUMP</title>
985 <para>Print out sam database of remote server. You need
986 to run this against the PDC, from a Samba machine joined as a BDC. </para>
987 </refsect2>
989 <refsect2>
990 <title>RPC VAMPIRE</title>
992 <para>Export users, aliases and groups from remote server to 
993 local server.  You need to run this against the PDC, from a Samba machine joined as a BDC. 
994 </para>
995 </refsect2>
997 <refsect2>
998 <title>RPC VAMPIRE KEYTAB</title>
1000 <para>Dump remote SAM database to local Kerberos keytab file.
1001 </para>
1002 </refsect2>
1004 <refsect2>
1005 <title>RPC VAMPIRE LDIF</title>
1007 <para>Dump remote SAM database to local LDIF file or standard output.
1008 </para>
1009 </refsect2>
1011 <refsect2>
1012 <title>RPC GETSID</title>
1014 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename> (or <filename>secrets.ntdb</filename>). </para>
1016 </refsect2>
1018 <refsect2>
1019 <title>ADS LEAVE</title>
1021 <para>Make the remote host leave the domain it is part of. </para>
1023 </refsect2>
1025 <refsect2>
1026 <title>ADS STATUS</title>
1028 <para>Print out status of machine account of the local machine in ADS.
1029 Prints out quite some debug info. Aimed at developers, regular 
1030 users should use <command>NET ADS TESTJOIN</command>.</para>
1032 </refsect2>
1034 <refsect2>
1035 <title>ADS PRINTER</title>
1037 <refsect3>
1038 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1040 <para>
1041 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the 
1042 server name defaults to the local host.</para>
1044 </refsect3>
1046 <refsect3>
1047 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1049 <para>Publish specified printer using ADS.</para>
1051 </refsect3>
1053 <refsect3>
1054 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1056 <para>Remove specified printer from ADS directory.</para>
1058 </refsect3>
1060 </refsect2>
1062 <refsect2>
1063 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1065 <para>Perform a raw LDAP search on a ADS server and dump the results. The 
1066 expression is a standard LDAP search expression, and the 
1067 attributes are a list of LDAP fields to show in the results.</para>
1069 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1070 </para>
1072 </refsect2>
1074 <refsect2>
1075 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1077 <para>
1078 Perform a raw LDAP search on a ADS server and dump the results. The 
1079 DN standard LDAP DN, and the attributes are a list of LDAP fields 
1080 to show in the result. 
1081 </para>
1083 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1085 </refsect2>
1087 <refsect2>
1088 <title>ADS WORKGROUP</title>
1090 <para>Print out workgroup name for specified kerberos realm.</para>
1092 </refsect2>
1094 <refsect2>
1095 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
1097 <para>
1098 (Re)Create a BUILTIN group.
1099 Only a wellknown set of BUILTIN groups can be created with this command.
1100 This is the list of currently recognized group names: Administrators,
1101 Users, Guests, Power Users, Account Operators, Server Operators, Print
1102 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1103 compatible Access.
1105 This command requires a running Winbindd with idmap allocation properly
1106 configured. The group gid will be allocated out of the winbindd range.
1107 </para>
1109 </refsect2>
1111 <refsect2>
1112 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
1114 <para>
1115 Create a LOCAL group (also known as Alias).
1117 This command requires a running Winbindd with idmap allocation properly
1118 configured. The group gid will be allocated out of the winbindd range.
1119 </para>
1121 </refsect2>
1123 <refsect2>
1124 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
1126 <para>
1127 Delete an existing LOCAL group (also known as Alias).
1129 </para>
1131 </refsect2>
1133 <refsect2>
1134 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
1136 <para>
1137 Map an existing Unix group and make it a Domain Group, the domain group
1138 will have the same name.
1139 </para>
1141 </refsect2>
1143 <refsect2>
1144 <title>SAM UNMAPUNIXGROUP &lt;NAME&gt;</title>
1146 <para>
1147 Remove an existing group mapping entry.
1148 </para>
1150 </refsect2>
1152 <refsect2>
1153 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1155 <para>
1156 Add a member to a Local group. The group can be specified only by name,
1157 the member can be specified by name or SID.
1158 </para>
1160 </refsect2>
1162 <refsect2>
1163 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1165 <para>
1166 Remove a member from a Local group. The group and the member must be
1167 specified by name.
1168 </para>
1170 </refsect2>
1172 <refsect2>
1173 <title>SAM LISTMEM &lt;GROUP&gt;</title>
1175 <para>
1176 List Local group members. The group must be specified by name.
1177 </para>
1179 </refsect2>
1181 <refsect2>
1182 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
1184 <para>
1185 List the specified set of accounts by name. If verbose is specified,
1186 the rid and description is also provided for each account.
1187 </para>
1189 </refsect2>
1191 <refsect2>
1192 <title>SAM RIGHTS LIST</title>
1194 <para>
1195 List all available privileges.
1196 </para>
1198 </refsect2>
1200 <refsect2>
1201 <title>SAM RIGHTS GRANT &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1203 <para>
1204 Grant one or more privileges to a user.
1205 </para>
1207 </refsect2>
1209 <refsect2>
1210 <title>SAM RIGHTS REVOKE &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1212 <para>
1213 Revoke one or more privileges from a user.
1214 </para>
1216 </refsect2>
1218 <refsect2>
1219 <title>SAM SHOW &lt;NAME&gt;</title>
1221 <para>
1222 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1223 account.
1224 </para>
1226 </refsect2>
1228 <refsect2>
1229 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1231 <para>
1232 Set the home directory for a user account.
1233 </para>
1235 </refsect2>
1237 <refsect2>
1238 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1240 <para>
1241 Set the profile path for a user account.
1242 </para>
1244 </refsect2>
1246 <refsect2>
1247 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1249 <para>
1250 Set the comment for a user or group account.
1251 </para>
1253 </refsect2>
1255 <refsect2>
1256 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1258 <para>
1259 Set the full name for a user account.
1260 </para>
1262 </refsect2>
1264 <refsect2>
1265 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1267 <para>
1268 Set the logon script for a user account.
1269 </para>
1271 </refsect2>
1273 <refsect2>
1274 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1276 <para>
1277 Set the home drive for a user account.
1278 </para>
1280 </refsect2>
1282 <refsect2>
1283 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1285 <para>
1286 Set the workstations a user account is allowed to log in from.
1287 </para>
1289 </refsect2>
1291 <refsect2>
1292 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1294 <para>
1295 Set the "disabled" flag for a user account.
1296 </para>
1298 </refsect2>
1300 <refsect2>
1301 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1303 <para>
1304 Set the "password not required" flag for a user account.
1305 </para>
1307 </refsect2>
1309 <refsect2>
1310 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1312 <para>
1313 Set the "autolock" flag for a user account.
1314 </para>
1316 </refsect2>
1318 <refsect2>
1319 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1321 <para>
1322 Set the "password do not expire" flag for a user account.
1323 </para>
1325 </refsect2>
1327 <refsect2>
1328 <title>SAM SET PWDMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1330 <para>
1331 Set or unset the "password must change" flag for a user account.
1332 </para>
1334 </refsect2>
1336 <refsect2>
1337 <title>SAM POLICY LIST</title>
1339 <para>
1340 List the available account policies.
1341 </para>
1343 </refsect2>
1345 <refsect2>
1346 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1348 <para>
1349 Show the account policy value.
1350 </para>
1352 </refsect2>
1354 <refsect2>
1355 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1357 <para>
1358 Set a value for the account policy.
1359 Valid values can be: "forever", "never", "off", or a number.
1360 </para>
1362 </refsect2>
1364 <refsect2>
1365 <title>SAM PROVISION</title>
1367 <para>
1368 Only available if ldapsam:editposix is set and winbindd is running.
1369 Properly populates the ldap tree with the basic accounts (Administrator)
1370 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1371 </para>
1373 </refsect2>
1375 <refsect2>
1376 <title>IDMAP DUMP &lt;local tdb file name&gt;</title>
1378 <para>
1379 Dumps the mappings contained in the local tdb file specified.
1380 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1381 </para>
1383 </refsect2>
1385 <refsect2>
1386 <title>IDMAP RESTORE [input file]</title>
1388 <para>
1389 Restore the mappings from the specified file or stdin.
1390 </para>
1392 </refsect2>
1394 <refsect2>
1395 <title>IDMAP SECRET &lt;DOMAIN&gt; &lt;secret&gt;</title>
1397 <para>
1398 Store a secret for the specified domain, used primarily for domains
1399 that use idmap_ldap as a backend. In this case the secret is used
1400 as the password for the user DN used to bind to the ldap server.
1401 </para>
1403 </refsect2>
1405 <refsect2>
1407 <title>IDMAP DELETE [-f] [--db=&lt;DB&gt;] &lt;ID&gt;</title>
1409 <para>
1410 Delete a mapping sid &lt;-&gt; gid or sid &lt;-&gt; uid from the IDMAP database.
1411 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".
1412 Use -f to delete an invalid partial mapping &lt;ID&gt; -&gt; xx
1413 </para>
1414 <para>
1415   Use "smbcontrol all idmap ..." to notify running smbd instances.
1416   See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
1417   <manvolnum>1</manvolnum></citerefentry> manpage for details.
1418 </para>
1419 </refsect2>
1421 <refsect2>
1423 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=&lt;DB&gt;]</title>
1425 <para>
1426   Check and repair the IDMAP database. If no option is given a read only check
1427   of the database is done. Among others an interactive or automatic repair mode
1428   may be chosen with one of the following options:
1430   <variablelist>
1431     <varlistentry><term>-r|--repair</term>
1432     <listitem><para>
1433       Interactive repair mode, ask a lot of questions.
1434     </para></listitem>
1435     </varlistentry>
1437     <varlistentry><term>-a|--auto</term>
1438     <listitem><para>
1439       Noninteractive repair mode, use default answers.
1440     </para></listitem>
1441     </varlistentry>
1443     <varlistentry><term>-v|--verbose</term>
1444       <listitem><para>
1445         Produce more output.
1446       </para></listitem>
1447     </varlistentry>
1449     <varlistentry><term>-f|--force</term>
1450       <listitem><para>
1451         Try to apply changes, even if they do not apply cleanly.
1452       </para></listitem>
1453     </varlistentry>
1455     <varlistentry><term>-T|--test</term>
1456       <listitem><para>
1457         Dry run, show what changes would be made but don't touch anything.
1458       </para></listitem>
1459     </varlistentry>
1461     <varlistentry><term>-l|--lock</term>
1462       <listitem><para>
1463         Lock the database while doing the check.
1464       </para></listitem>
1465     </varlistentry>
1467     <varlistentry><term>--db &lt;DB&gt;</term>
1468       <listitem><para>
1469         Check the specified database.
1470       </para></listitem>
1471     </varlistentry>
1472     <varlistentry><term></term>
1473       <listitem><para>
1474       </para></listitem>
1475     </varlistentry>
1476   </variablelist>
1478   It reports about the finding of the following errors:
1480   <variablelist>
1481     <varlistentry><term>Missing reverse mapping:</term>
1482     <listitem><para>
1483       A record with mapping A-&gt;B where there is no B-&gt;A. Default action
1484       in repair mode is to "fix" this by adding the reverse mapping.
1485     </para></listitem>
1486     </varlistentry>
1488     <varlistentry><term>Invalid mapping:</term>
1489     <listitem><para>
1490       A record with mapping A-&gt;B where B-&gt;C. Default action
1491       is to "delete" this record.
1492     </para></listitem>
1493   </varlistentry>
1495   <varlistentry><term>Missing or invalid HWM:</term>
1496     <listitem><para>
1497       A high water mark is not at least equal to the largest ID in the
1498       database. Default action is to "fix" this by setting it to the
1499       largest ID found +1.
1500     </para></listitem>
1501   </varlistentry>
1503   <varlistentry><term>Invalid record:</term>
1504     <listitem><para>
1505       Something we failed to parse. Default action is to "edit" it
1506       in interactive and "delete" it in automatic mode.
1507     </para></listitem>
1508   </varlistentry>
1509 </variablelist>
1510 </para>
1511 </refsect2>
1514 <refsect2>
1515 <title>USERSHARE</title>
1517 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1518 non-root users to add user defined shares to be exported using the "net usershare"
1519 commands.
1520 </para>
1522 <para>
1523 To set this up, first set up your smb.conf by adding to the [global] section:
1525 usershare path = /usr/local/samba/lib/usershares
1527 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1528 set the group owner to the UNIX group who should have the ability to create usershares,
1529 for example a group called "serverops".
1531 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1533 (Owner and group all access, no access for others, plus the sticky bit,
1534 which means that a file in that directory can be renamed or deleted only
1535 by the owner of the file).
1537 Finally, tell smbd how many usershares you will allow by adding to the [global]
1538 section of smb.conf a line such as :
1540 usershare max shares = 100.
1542 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1543 can create user defined shares on demand using the commands below.
1544 </para>
1546 <para>The usershare commands are:
1548 <simplelist>
1549 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
1550 <member>net usershare delete sharename - to delete a user defined share.</member>
1551 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1552 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1553 </simplelist>
1555 </para>
1557 <refsect3>
1558 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1560 <para>
1561 Add or replace a new user defined share, with name "sharename".
1562 </para>
1564 <para>
1565 "path" specifies the absolute pathname on the system to be exported.
1566 Restrictions may be put on this, see the global smb.conf parameters:
1567 "usershare owner only", "usershare prefix allow list", and
1568 "usershare prefix deny list".
1569 </para>
1571 <para>
1572 The optional "comment" parameter is the comment that will appear
1573 on the share when browsed to by a client.
1574 </para>
1576 <para>The optional "acl" field
1577 specifies which users have read and write access to the entire share.
1578 Note that guest connections are not allowed unless the smb.conf parameter
1579 "usershare allow guests" has been set. The definition of a user
1580 defined share acl is: "user:permission", where user is a valid
1581 username on the system and permission can be "F", "R", or "D".
1582 "F" stands for "full permissions", ie. read and write permissions.
1583 "D" stands for "deny" for a user, ie. prevent this user from accessing
1584 this share.
1585 "R" stands for "read only", ie. only allow read access to this
1586 share (no creation of new files or directories or writing to files).
1587 </para>
1589 <para>
1590 The default if no "acl" is given is "Everyone:R", which means any 
1591 authenticated user has read-only access.
1592 </para>
1594 <para>
1595 The optional "guest_ok" has the same effect as the parameter of the
1596 same name in smb.conf, in that it allows guest access to this user
1597 defined share. This parameter is only allowed if the global parameter
1598 "usershare allow guests" has been set to true in the smb.conf.
1599 </para>
1601 There is no separate command to modify an existing user defined share,
1602 just use the "net usershare add [sharename]" command using the same
1603 sharename as the one you wish to modify and specify the new options
1604 you wish. The Samba smbd daemon notices user defined share modifications
1605 at connect time so will see the change immediately, there is no need
1606 to restart smbd on adding, deleting or changing a user defined share.
1607 </refsect3>
1609 <refsect3>
1610 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1612 <para>
1613 Deletes the user defined share by name. The Samba smbd daemon
1614 immediately notices this change, although it will not disconnect
1615 any users currently connected to the deleted share.
1616 </para>
1618 </refsect3>
1620 <refsect3>
1621 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1623 <para>
1624 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1625 </para>
1627 <para>
1628 net usershare info on its own dumps out info on the user defined shares that were
1629 created by the current user, or restricts them to share names that match the given
1630 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1631 If the '-l' or '--long' option is also given, it prints out info on user defined
1632 shares created by other users.
1633 </para>
1635 <para>
1636 The information given about a share looks like:
1638 [foobar]
1639 path=/home/jeremy
1640 comment=testme
1641 usershare_acl=Everyone:F
1642 guest_ok=n
1644 And is a list of the current settings of the user defined share that can be
1645 modified by the "net usershare add" command.
1646 </para>
1648 </refsect3>
1650 <refsect3>
1651 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1653 <para>
1654 List all the user defined shares owned by the current user matching the given pattern, or all users.
1655 </para>
1657 <para>
1658 net usershare list on its own list out the names of the user defined shares that were
1659 created by the current user, or restricts the list to share names that match the given
1660 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1661 If the '-l' or '--long' option is also given, it includes the names of user defined
1662 shares created by other users.
1663 </para>
1665 </refsect3>
1667 </refsect2>
1669 <refsect2>
1670 <title>[RPC] CONF</title>
1672 <para>Starting with version 3.2.0, a Samba server can be configured by data
1673 stored in registry. This configuration data can be edited with the new "net
1674 conf" commands. There is also the possiblity to configure a remote Samba server
1675 by enabling the RPC conf mode and specifying the the address of the remote server.
1676 </para>
1678 <para>
1679 The deployment of this configuration data can be activated in two levels from the
1680 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
1681 activated by setting <parameter>registry shares</parameter> to
1682 <quote>yes</quote> in the [global] section and global configuration options are
1683 activated by setting <smbconfoption name="include">registry</smbconfoption> in
1684 the [global] section for a mixed configuration or by setting
1685 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
1686 section for a registry-only configuration.
1687 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
1688 <manvolnum>5</manvolnum></citerefentry> manpage for details.
1689 </para>
1691 <para>The conf commands are:
1692 <simplelist>
1693 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
1694 format.</member>
1695 <member>net [rpc] conf import - Import configuration from file in smb.conf
1696 format.</member>
1697 <member>net [rpc] conf listshares - List the registry shares.</member>
1698 <member>net [rpc] conf drop - Delete the complete configuration from
1699 registry.</member>
1700 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
1701 <member>net [rpc] conf addshare - Create a new registry share.</member>
1702 <member>net [rpc] conf delshare - Delete a registry share.</member>
1703 <member>net [rpc] conf setparm - Store a parameter.</member>
1704 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
1705 <member>net [rpc] conf delparm - Delete a parameter.</member>
1706 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
1707 <member>net [rpc] conf setincludes - Set includes for a share.</member>
1708 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
1709 </simplelist>
1710 </para>
1712 <refsect3>
1713 <title>[RPC] CONF LIST</title>
1715 <para>
1716 Print the configuration data stored in the registry in a smb.conf-like format to
1717 standard output.
1718 </para>
1719 </refsect3>
1721 <refsect3>
1722 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
1724 <para>
1725 This command imports configuration from a file in smb.conf format.
1726 If a section encountered in the input file is present in registry,
1727 its contents is replaced. Sections of registry configuration that have
1728 no counterpart in the input file are not affected. If you want to delete these,
1729 you will have to use the "net conf drop" or "net conf delshare" commands.
1730 Optionally, a section may be specified to restrict the effect of the
1731 import command to that specific section. A test mode is enabled by specifying
1732 the parameter "-T" on the commandline. In test mode, no changes are made to the
1733 registry, and the resulting configuration is printed to standard output instead.
1734 </para>
1735 </refsect3>
1737 <refsect3>
1738 <title>[RPC] CONF LISTSHARES</title>
1740 <para>
1741 List the names of the shares defined in registry.
1742 </para>
1743 </refsect3>
1745 <refsect3>
1746 <title>[RPC] CONF DROP</title>
1748 <para>
1749 Delete the complete configuration data from registry.
1750 </para>
1751 </refsect3>
1753 <refsect3>
1754 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
1756 <para>
1757 Show the definition of the share or section specified. It is valid to specify
1758 "global" as sharename to retrieve the global configuration options from
1759 registry.
1760 </para>
1761 </refsect3>
1763 <refsect3>
1764 <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>
1766 <para>Create a new share definition in registry.
1767 The sharename and path have to be given. The share name may
1768 <emphasis>not</emphasis> be "global". Optionally, values for the very
1769 common options "writeable", "guest ok" and a "comment" may be specified.
1770 The same result may be obtained by a sequence of "net conf setparm"
1771 commands.
1772 </para>
1773 </refsect3>
1775 <refsect3>
1776 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
1778 <para>
1779 Delete a share definition from registry.
1780 </para>
1781 </refsect3>
1783 <refsect3>
1784 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
1786 <para>
1787 Store a parameter in registry. The section may be global or a sharename.
1788 The section is created if it does not exist yet.
1789 </para>
1790 </refsect3>
1792 <refsect3>
1793 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1795 <para>
1796 Show a parameter stored in registry.
1797 </para>
1798 </refsect3>
1800 <refsect3>
1801 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1803 <para>
1804 Delete a parameter stored in registry.
1805 </para>
1806 </refsect3>
1808 <refsect3>
1809 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
1811 <para>
1812 Get the list of includes for the provided section (global or share).
1813 </para>
1815 <para>
1816 Note that due to the nature of the registry database and the nature of include directives,
1817 the includes need special treatment: Parameters are stored in registry by the parameter
1818 name as valuename, so there is only ever one instance of a parameter per share.
1819 Also, a specific order like in a text file is not guaranteed. For all real
1820 parameters, this is perfectly ok, but the include directive is rather a meta
1821 parameter, for which, in the smb.conf text file, the place where it is specified
1822 between the other parameters is very important. This can not be achieved by the
1823 simple registry smbconf data model, so there is one ordered list of includes
1824 per share, and this list is evaluated after all the parameters of the share.
1825 </para>
1827 <para>
1828 Further note that currently, only files can be included from registry
1829 configuration. In the future, there will be the ability to include configuration
1830 data from other registry keys.
1831 </para>
1832 </refsect3>
1834 <refsect3>
1835 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
1837 <para>
1838 Set the list of includes for the provided section (global or share) to the given
1839 list of one or more filenames. The filenames may contain the usual smb.conf
1840 macros like %I.
1841 </para>
1842 </refsect3>
1844 <refsect3>
1845 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
1847 <para>
1848 Delete the list of includes from the provided section (global or share).
1849 </para>
1850 </refsect3>
1852 </refsect2>
1854 <refsect2>
1855 <title>REGISTRY</title>
1856 <para>
1857 Manipulate Samba's registry.
1858 </para>
1860 <para>The registry commands are:
1861 <simplelist>
1862 <member>net registry enumerate   - Enumerate registry keys and values.</member>
1863 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
1864 <member>net registry createkey   - Create a new registry key.</member>
1865 <member>net registry deletekey   - Delete a registry key.</member>
1866 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
1867 <member>net registry getvalue    - Print a registry value.</member>
1868 <member>net registry getvalueraw - Print a registry value (raw format).</member>
1869 <member>net registry setvalue    - Set a new registry value.</member>
1870 <member>net registry increment   - Increment a DWORD registry value under a lock.
1871 </member>
1872 <member>net registry deletevalue - Delete a registry value.</member>
1873 <member>net registry getsd       - Get security descriptor.</member>
1874 <member>net registry getsd_sdd1  - Get security descriptor in sddl format.
1875 </member>
1876 <member>net registry setsd_sdd1  - Set security descriptor from sddl format
1877 string.</member>
1878 <member>net registry import      - Import a registration entries (.reg) file.
1879 </member>
1880 <member>net registry export      - Export a registration entries (.reg) file.
1881 </member>
1882 <member>net registry convert     - Convert a registration entries (.reg) file.
1883 </member>
1884 <member>net registry check       - Check and repair a registry database.
1885 </member>
1886 </simplelist>
1887 </para>
1889 <refsect3>
1890   <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
1891   <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
1892   </para>
1893 </refsect3>
1895 <refsect3>
1896   <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
1897   <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
1898   </para>
1899 </refsect3>
1901 <refsect3>
1902   <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
1903   <para>Create a new <emphasis>key</emphasis> if not yet existing.
1904   </para>
1905 </refsect3>
1907 <refsect3>
1908   <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
1909   <para>Delete the given <emphasis>key</emphasis> and its
1910   values from the registry, if it has no subkeys.
1911   </para>
1912 </refsect3>
1914 <refsect3>
1915   <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
1916   <para>Delete the given <emphasis>key</emphasis> and all of its
1917   subkeys and values from the registry.
1918   </para>
1919 </refsect3>
1921 <refsect3>
1922   <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
1923   --><replaceable>name</replaceable></title>
1925   <para>Output type and actual value of the value <emphasis>name</emphasis>
1926   of the given <emphasis>key</emphasis>.
1927   </para>
1928 </refsect3>
1930 <refsect3>
1931   <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
1932   --><replaceable>name</replaceable></title>
1933   <para>Output the actual value of the value <emphasis>name</emphasis>
1934   of the given <emphasis>key</emphasis>.
1935   </para>
1936 </refsect3>
1938 <refsect3>
1939   <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
1940   --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
1941   --><replaceable>value</replaceable> ...<!--
1942   --></title>
1944   <para>Set the value <emphasis>name</emphasis>
1945   of an existing <emphasis>key</emphasis>.
1946   <emphasis>type</emphasis> may be one of
1947   <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
1948   <emphasis>dword</emphasis>.
1949   In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
1950   be given multiple times.
1951   </para>
1952 </refsect3>
1954 <refsect3>
1955   <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
1956   --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
1957   --></title>
1959   <para>Increment the DWORD value <emphasis>name</emphasis>
1960   of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
1961   while holding a g_lock.
1962   <emphasis>inc</emphasis> defaults to 1.
1963   </para>
1964 </refsect3>
1966 <refsect3>
1967   <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
1968   --><replaceable>name</replaceable></title>
1970   <para>Delete the value <emphasis>name</emphasis>
1971   of the given <emphasis>key</emphasis>.
1972   </para>
1973 </refsect3>
1975 <refsect3>
1976   <title>REGISTRY GETSD <replaceable>key</replaceable></title>
1978   <para>Get the security descriptor of the given <emphasis>key</emphasis>.
1979   </para>
1980 </refsect3>
1982 <refsect3>
1983   <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
1985   <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
1986   Security Descriptor Definition Language (SDDL) string.
1987   </para>
1988 </refsect3>
1990 <refsect3>
1991   <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
1992   --><replaceable>sd</replaceable></title>
1994   <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
1995   Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
1996   </para>
1997 </refsect3>
1999 <refsect3>
2000   <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
2001   --><replaceable> [--precheck &lt;check-file&gt;] [opt]</replaceable></title>
2002   <para>Import a registration entries (.reg) <emphasis>file</emphasis>.</para>
2003   <para>The following options are available:</para>
2004   <variablelist>
2005     <varlistentry><term>--precheck <replaceable>check-file</replaceable></term>
2006     <listitem><para>
2007       This is a mechanism to check the existence or non-existence of
2008       certain keys or values specified in a precheck file before applying
2009       the import file.
2010       The import file will only be applied if the precheck succeeds.
2011     </para>
2012     <para>
2013       The check-file follows the normal registry file syntax with the
2014       following semantics:
2015     </para>
2016       <itemizedlist>
2017         <listitem><para>&lt;value name&gt;=&lt;value&gt; checks whether the
2018           value exists and has the given value.</para></listitem>
2019         <listitem><para>&lt;value name&gt;=- checks whether the value does
2020           not exist.</para></listitem>
2021         <listitem><para>[key] checks whether the key exists.</para>
2022         </listitem>
2023         <listitem><para>[-key] checks whether the key does not exist.</para>
2024         </listitem>
2025       </itemizedlist>
2026     </listitem>
2027     </varlistentry>
2028   </variablelist>
2029 </refsect3>
2031 <refsect3>
2032   <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2033   --><replaceable>file</replaceable><!--
2034   --><replaceable>[opt]</replaceable></title>
2036   <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2037   <emphasis>file</emphasis>.
2038   </para>
2039 </refsect3>
2041 <refsect3>
2042   <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2043   --><replaceable>out</replaceable> <!--
2044   --><replaceable>[[inopt] outopt]</replaceable></title>
2046   <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2047   </para>
2048 </refsect3>
2050 <refsect3>
2051   <title>REGISTRY CHECK [-ravTl] [-o &lt;ODB&gt;] [--wipe] [&lt;DB&gt;]</title>
2052   <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
2054   <variablelist>
2055     <varlistentry><term>-r|--repair</term>
2056     <listitem><para>
2057       Interactive repair mode, ask a lot of questions.
2058     </para></listitem>
2059     </varlistentry>
2061     <varlistentry><term>-a|--auto</term>
2062     <listitem><para>
2063       Noninteractive repair mode, use default answers.
2064     </para></listitem>
2065     </varlistentry>
2067     <varlistentry><term>-v|--verbose</term>
2068       <listitem><para>
2069         Produce more output.
2070       </para></listitem>
2071     </varlistentry>
2073     <varlistentry><term>-T|--test</term>
2074       <listitem><para>
2075         Dry run, show what changes would be made but don't touch anything.
2076       </para></listitem>
2077     </varlistentry>
2079     <varlistentry><term>-l|--lock</term>
2080       <listitem><para>
2081         Lock the database while doing the check.
2082       </para></listitem>
2083     </varlistentry>
2085    <varlistentry><term>--reg-version={1,2,3}</term>
2086       <listitem><para>
2087         Specify the format of the registry database. If not given it defaults to
2088         the value of the binary or, if an registry.tdb is explizitly stated at
2089         the commandline, to the value found in the INFO/version record.
2090       </para></listitem>
2091     </varlistentry>
2093     <varlistentry><term>[--db] &lt;DB&gt;</term>
2094       <listitem><para>
2095         Check the specified database.
2096       </para></listitem>
2097     </varlistentry>
2099     <varlistentry><term>-o|--output &lt;ODB&gt;</term>
2100       <listitem><para>
2101         Create a new registry database &lt;ODB&gt; instead of modifying the
2102         input. If &lt;ODB&gt; is already existing --wipe may be used to
2103         overwrite it.
2104       </para></listitem>
2105     </varlistentry>
2107    <varlistentry><term>--wipe</term>
2108       <listitem><para>
2109         Replace the registry database instead of modifying the input or
2110         overwrite an existing output database.
2111       </para></listitem>
2112     </varlistentry>
2114     <varlistentry><term></term>
2115       <listitem><para>
2116       </para></listitem>
2117     </varlistentry>
2118   </variablelist>
2119   </para>
2120 </refsect3>
2122 </refsect2>
2124 <refsect2>
2125 <title>EVENTLOG</title>
2127 <para>Starting with version 3.4.0 net can read, dump, import and export native
2128 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2129 </para>
2131 <para>
2132 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2133 <emphasis>smb.conf</emphasis> file.
2134 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2135 </para>
2137 <para>The eventlog commands are:
2138 <simplelist>
2139 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2140 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2141 tdb based representation of eventlogs.</member>
2142 <member>net eventlog export - Export the samba internal tdb based representation
2143 of eventlogs into an eventlog *.evt file.</member>
2144 </simplelist>
2145 </para>
2147 <refsect3>
2148 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2150 <para>
2151 Prints a eventlog *.evt file to standard output.
2152 </para>
2153 </refsect3>
2155 <refsect3>
2156 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2158 <para>
2159 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2160 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2161 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2162 defined in smb.conf.
2163 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2164 </para>
2166 </refsect3>
2168 <refsect3>
2169 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2171 <para>
2172 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2173 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2174 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2175 defined in smb.conf.
2176 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2177 </para>
2179 </refsect3>
2181 </refsect2>
2183 <refsect2>
2184 <title>DOM</title>
2186 <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.
2187 </para>
2188 <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.
2189 </para>
2191 <para>The client side support for remote join is implemented in the net dom commands which are:
2192 <simplelist>
2193 <member>net dom join - Join a remote computer into a domain.</member>
2194 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2195 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2196 </simplelist>
2197 </para>
2199 <refsect3>
2200 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2202 <para>
2203 Joins a computer into a domain. This command supports the following additional parameters:
2204 </para>
2206 <itemizedlist>
2208 <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>
2210 <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>
2212 <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>
2214 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2216 <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>
2218 </itemizedlist>
2220 <para>
2221 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.
2222 </para>
2223 <para>
2224         Example:
2225         net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2226 </para>
2227 <para>
2228 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.
2229 </para>
2231 </refsect3>
2233 <refsect3>
2234 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2236 <para>
2237 Unjoins a computer from a domain. This command supports the following additional parameters:
2238 </para>
2240 <itemizedlist>
2242 <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>
2244 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2246 <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>
2248 </itemizedlist>
2250 <para>
2251 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.
2252 </para>
2253 <para>
2254         Example:
2255         net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2256 </para>
2257 <para>
2258 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.
2259 </para>
2261 </refsect3>
2263 <refsect3>
2264 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2266 <para>
2267 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2268 </para>
2270 <itemizedlist>
2272 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2274 <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>
2276 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2278 <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>
2280 </itemizedlist>
2282 <para>
2283 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.
2284 </para>
2285 <para>
2286         Example:
2287         net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2288 </para>
2289 <para>
2290 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.
2291 </para>
2293 </refsect3>
2295 </refsect2>
2297 <refsect2>
2298 <title>G_LOCK</title>
2300 <para>Manage global locks.</para>
2302 <refsect3>
2303 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2305 <para>
2306 Execute a shell command under a global lock. This might be useful to define the
2307 order in which several shell commands will be executed. The locking information
2308 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2309 running, the locking information will be available on all cluster nodes.
2310 </para>
2312 <itemizedlist>
2313 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2314 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2315 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2316 </itemizedlist>
2317 </refsect3>
2319 <refsect3>
2320 <title>G_LOCK LOCKS</title>
2322 <para>
2323 Print a list of all currently existing locknames.
2324 </para>
2325 </refsect3>
2327 <refsect3>
2328 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2330 <para>
2331 Dump the locking table of a certain global lock.
2332 </para>
2333 </refsect3>
2335 </refsect2>
2337 <refsect2>
2338 <title>HELP [COMMAND]</title>
2340 <para>Gives usage information for the specified command.</para>
2342 </refsect2>
2344 </refsect1>
2346 <refsect1>
2347         <title>VERSION</title>
2349         <para>This man page is complete for version 3 of the Samba 
2350         suite.</para>
2351 </refsect1>
2353 <refsect1>
2354         <title>AUTHOR</title>
2355         
2356         <para>The original Samba software and related utilities 
2357         were created by Andrew Tridgell. Samba is now developed
2358         by the Samba Team as an Open Source project similar 
2359         to the way the Linux kernel is developed.</para>
2361         <para>The net manpage was written by Jelmer Vernooij.</para>
2362         
2363 </refsect1>
2365 </refentry>