s3:lib: make use of samba_tevent_context_init()
[Samba/gebeck_regimport.git] / docs-xml / manpages / net.8.xml
blob3765af9be971cb961bfa1bf154c65ae7c241ae30
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] [createcomputer=OU] [options]</title>
199 <para>
200 Join a domain.  If the account already exists on the server, and 
201 [TYPE] is MEMBER, the machine will attempt to join automatically. 
202 (Assuming that the machine has been created in server manager)
203 Otherwise, a password will be prompted for, and a new account may
204 be created.</para>
206 <para>
207 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
208 joining the domain.
209 </para>
211 <para>
212 [UPN] (ADS only) set the principalname attribute during the join.  The default
213 format is host/netbiosname@REALM.
214 </para>
216 <para>
217 [OU] (ADS only) Precreate the computer account in a specific OU.  The
218 OU string reads from top to bottom without RDNs, and is delimited by
219 a '/'.  Please note that '\' is used for escape by both the shell
220 and ldap, so it may need to be doubled or quadrupled to pass through, 
221 and it is not used as a delimiter.
222 </para>
223 </refsect2>
225 <refsect2>
226 <title>[RPC] OLDJOIN [options]</title>
228 <para>Join a domain. Use the OLDJOIN option to join the domain 
229 using the old style of domain joining - you need to create a trust 
230 account in server manager first.</para>
231 </refsect2>
233 <refsect2>
234 <title>[RPC|ADS] USER</title>
236 <refsect3>
237 <title>[RPC|ADS] USER</title>
239 <para>List all users</para>
241 </refsect3>
243 <refsect3>
244 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
246 <para>Delete specified user</para>
248 </refsect3>
250 <refsect3>
251 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
253 <para>List the domain groups of the specified user.</para>
255 </refsect3>
257 <refsect3>
258 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
260 <para>Rename specified user.</para>
262 </refsect3>
264 <refsect3>
265 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
267 <para>Add specified user.</para>
268 </refsect3>
269 </refsect2>
271 <refsect2>
272 <title>[RPC|ADS] GROUP</title>
274 <refsect3>
275 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
276 <para>List user groups.</para>
277 </refsect3>
279 <refsect3>
280 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
282 <para>Delete specified group.</para>
284 </refsect3>
286 <refsect3>
287 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
289 <para>Create specified group.</para>
291 </refsect3>
292 </refsect2>
294 <refsect2>
295 <title>[RAP|RPC] SHARE</title>
297 <refsect3>
298 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
300 <para>Enumerates all exported resources (network shares) on target server.</para>
302 </refsect3>
304 <refsect3>
305 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
307 <para>Adds a share from a server (makes the export active). Maxusers 
308 specifies the number of users that can be connected to the 
309 share simultaneously.</para>
311 </refsect3>
313 <refsect3>
314 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
316 <para>Delete specified share.</para>
317 </refsect3>
318 </refsect2>
320 <refsect2>
321 <title>[RPC|RAP] FILE</title>
323 <refsect3>
324 <title>[RPC|RAP] FILE</title>
326 <para>List all open files on remote server.</para>
328 </refsect3>
330 <refsect3>
331 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
333 <para>Close file with specified <replaceable>fileid</replaceable> on 
334 remote server.</para>
336 </refsect3>
338 <refsect3>
339 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
341 <para>
342 Print information on specified <replaceable>fileid</replaceable>. 
343 Currently listed are: file-id, username, locks, path, permissions.
344 </para>
346 </refsect3>
348 <refsect3>
349 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
351 <para>
352 List files opened by specified <replaceable>user</replaceable>.
353 Please note that <command>net rap file user</command> does not work
354 against Samba servers. 
355 </para>
357 </refsect3>
359 </refsect2>
361 <refsect2>
362 <title>SESSION</title>
364 <refsect3>
365 <title>RAP SESSION</title>
367 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
368 sessions on the target server.</para>
370 </refsect3>
372 <refsect3>
373 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
375 <para>Close the specified sessions.</para>
377 </refsect3>
379 <refsect3>
380 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
382 <para>Give a list with all the open files in specified session.</para>
384 </refsect3>
386 </refsect2>
388 <refsect2>
389 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
391 <para>List all servers in specified domain or workgroup. Defaults
392 to local domain.</para>
394 </refsect2>
396 <refsect2>
397 <title>RAP DOMAIN</title>
399 <para>Lists all domains and workgroups visible on the 
400 current network.</para>
402 </refsect2>
404 <refsect2>
405 <title>RAP PRINTQ</title>
407 <refsect3>
408 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
410 <para>Lists the specified print queue and print jobs on the server.
411 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all 
412 queues are listed.</para>
414 </refsect3>
416 <refsect3>
417 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
419 <para>Delete job with specified id.</para>
421 </refsect3>
423 </refsect2>
425 <refsect2>
426 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
428 <para>
429 Validate whether the specified user can log in to the 
430 remote server. If the password is not specified on the commandline, it 
431 will be prompted. 
432 </para>
434 &not.implemented;
436 </refsect2>
438 <refsect2>
439 <title>RAP GROUPMEMBER</title>
441 <refsect3>
442 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
444 <para>List all members of the specified group.</para>
446 </refsect3>
448 <refsect3>
449 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
451 <para>Delete member from group.</para>
453 </refsect3>
455 <refsect3>
456 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
458 <para>Add member to group.</para>
460 </refsect3>
462 </refsect2>
464 <refsect2>
465 <title>RAP ADMIN <replaceable>command</replaceable></title>
467 <para>Execute the specified <replaceable>command</replaceable> on 
468 the remote server. Only works with OS/2 servers.
469 </para>
471 &not.implemented;
473 </refsect2>
475 <refsect2>
476 <title>RAP SERVICE</title>
478 <refsect3>
479 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
481 <para>Start the specified service on the remote server. Not implemented yet.</para>
483 &not.implemented;
485 </refsect3>
487 <refsect3>
488 <title>RAP SERVICE STOP</title>
490 <para>Stop the specified service on the remote server.</para>
492 &not.implemented;
494 </refsect3>
496 </refsect2>
498 <refsect2>
499 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
501 <para>
502 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
503 </para>
505 </refsect2>
507 <refsect2>
508 <title>LOOKUP</title>
510 <refsect3>
511 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
513 <para>
514 Lookup the IP address of the given host with the specified type (netbios suffix). 
515 The type defaults to 0x20 (workstation).
516 </para>
518 </refsect3>
520 <refsect3>
521 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
523 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
525 </refsect3>
527 <refsect3>
528 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
530 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
531 Defaults to local realm.</para>
533 </refsect3>
535 <refsect3>
536 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
538 <para>Give IP's of Domain Controllers for specified <replaceable>
539 DOMAIN</replaceable>. Defaults to local domain.</para>
541 </refsect3>
543 <refsect3>
544 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
546 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
547 or workgroup. Defaults to local domain.</para>
549 </refsect3>
551 </refsect2>
553 <refsect2>
554 <title>CACHE</title>
556 <para>Samba uses a general caching interface called 'gencache'. It 
557 can be controlled using 'NET CACHE'.</para>
559 <para>All the timeout parameters support the suffixes:
561 <simplelist>
562 <member>s - Seconds</member>
563 <member>m - Minutes</member>
564 <member>h - Hours</member>
565 <member>d - Days</member>
566 <member>w - Weeks</member>
567 </simplelist>
569 </para>
571 <refsect3>
572 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
574 <para>Add specified key+data to the cache with the given timeout.</para>
576 </refsect3>
578 <refsect3>
579 <title>CACHE DEL <replaceable>key</replaceable></title>
581 <para>Delete key from the cache.</para>
583 </refsect3>
585 <refsect3>
586 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
588 <para>Update data of existing cache entry.</para>
590 </refsect3>
592 <refsect3>
593 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
595 <para>Search for the specified pattern in the cache data.</para>
597 </refsect3>
599 <refsect3>
600 <title>CACHE LIST</title>
602 <para>
603 List all current items in the cache.
604 </para>
606 </refsect3>
608 <refsect3>
609 <title>CACHE FLUSH</title>
611 <para>Remove all the current items from the cache.</para>
613 </refsect3>
615 </refsect2>
617 <refsect2>
618 <title>GETLOCALSID [DOMAIN]</title>
620 <para>Prints the SID of the specified domain, or if the parameter is
621 omitted, the SID of the local server.</para>
623 </refsect2>
625 <refsect2>
626 <title>SETLOCALSID S-1-5-21-x-y-z</title>
628 <para>Sets SID for the local server to the specified SID.</para>
630 </refsect2>
632 <refsect2>
633 <title>GETDOMAINSID</title>
635 <para>Prints the local machine SID and the SID of the current 
636 domain.</para>
638 </refsect2>
640 <refsect2>
641 <title>SETDOMAINSID</title>
643 <para>Sets the SID of the current domain.</para>
645 </refsect2>
647 <refsect2>
648 <title>GROUPMAP</title>
650 <para>Manage the mappings between Windows group SIDs and UNIX groups.
651 Common options include:</para>
653 <itemizedlist>
654 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
655 <listitem><para>ntgroup - Name of the Windows NT group (must be
656   resolvable to a SID</para></listitem>
657 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
658 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
659 <listitem><para>type - Type of the group; either 'domain', 'local',
660   or 'builtin'</para></listitem>
661 <listitem><para>comment - Freeform text description of the group</para></listitem>
662 </itemizedlist>
664 <refsect3>
665 <title>GROUPMAP ADD</title>
667 <para>
668 Add a new group mapping entry:
669 <programlisting>
670 net groupmap add {rid=int|sid=string} unixgroup=string \
671         [type={domain|local}] [ntgroup=string] [comment=string]
672 </programlisting>
673 </para>
675 </refsect3>
677 <refsect3>
678 <title>GROUPMAP DELETE</title>
680 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
682 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
684 </refsect3>
686 <refsect3>
687 <title>GROUPMAP MODIFY</title>
689 <para>Update an existing group entry.</para>
691 <para>
692 <programlisting>
693 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
694        [comment=string] [type={domain|local}]
695 </programlisting>
696 </para>
697 </refsect3>
699 <refsect3>
700 <title>GROUPMAP LIST</title>
702 <para>List existing group mapping entries.</para>
704 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
706 </refsect3>
707 </refsect2>
711 <refsect2>
712 <title>MAXRID</title>
714 <para>Prints out the highest RID currently in use on the local
715 server (by the active 'passdb backend').
716 </para>
718 </refsect2>
720 <refsect2>
721 <title>RPC INFO</title>
723 <para>Print information about the domain of the remote server,
724 such as domain name, domain sid and number of users and groups.
725 </para>
727 </refsect2>
729 <refsect2>
730 <title>[RPC|ADS] TESTJOIN</title>
732 <para>Check whether participation in a domain is still valid.</para>
734 </refsect2>
736 <refsect2>
737 <title>[RPC|ADS] CHANGETRUSTPW</title>
739 <para>Force change of domain trust password.</para>
741 </refsect2>
743 <refsect2>
744 <title>RPC TRUSTDOM</title>
746 <refsect3>
747 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
749 <para>Add a interdomain trust account for <replaceable>DOMAIN</replaceable>. 
750 This is in fact a Samba account named <replaceable>DOMAIN$</replaceable> 
751 with the account flag <constant>'I'</constant> (interdomain trust account). 
752 This is required for incoming trusts to work. It makes Samba be a
753 trusted domain of the foreign (trusting) domain.
754 Users of the Samba domain will be made available in the foreign domain.
755 If the command is used against localhost it has the same effect as 
756 <command>smbpasswd -a -i DOMAIN</command>. Please note that both commands
757 expect a appropriate UNIX account. 
758 </para>
760 </refsect3>
762 <refsect3>
763 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
765 <para>Remove interdomain trust account for 
766 <replaceable>DOMAIN</replaceable>. If it is used against localhost 
767 it has the same effect as <command>smbpasswd -x DOMAIN$</command>. 
768 </para>
770 </refsect3>
772 <refsect3>
773 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
775 <para>
776 Establish a trust relationship to a trusted domain. 
777 Interdomain account must already be created on the remote PDC.
778 This is required for outgoing trusts to work. It makes Samba be a
779 trusting domain of a foreign (trusted) domain.
780 Users of the foreign domain will be made available in our domain.
781 You'll need winbind and a working idmap config to make them
782 appear in your system.
783 </para>
785 </refsect3>
787 <refsect3>
788 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
789 <para>Abandon relationship to trusted domain</para>
791 </refsect3>
793 <refsect3>
794 <title>RPC TRUSTDOM LIST</title>
796 <para>List all interdomain trust relationships.</para>
798 </refsect3>
799 </refsect2>
801 <refsect2>
802 <title>RPC TRUST</title>
804 <refsect3>
805 <title>RPC TRUST CREATE</title>
807 <para>Create a trust object by calling lsaCreateTrustedDomainEx2.
808 The can be done on a single server or on two servers at once with the
809 possibility to use a random trust password.</para>
811 <variablelist><title>Options:</title>
812 <varlistentry>
813 <term>otherserver</term>
814 <listitem><para>Domain controller of the second domain</para></listitem>
815 </varlistentry>
817 <varlistentry>
818 <term>otheruser</term>
819 <listitem><para>Admin user in the second domain</para></listitem>
820 </varlistentry>
822 <varlistentry>
823 <term>otherdomainsid</term>
824 <listitem><para>SID of the second domain</para></listitem>
825 </varlistentry>
827 <varlistentry>
828 <term>other_netbios_domain</term>
829 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
830 </varlistentry>
832 <varlistentry>
833 <term>otherdomain</term>
834 <listitem><para>DNS (full) name of the second domain</para></listitem>
835 </varlistentry>
837 <varlistentry>
838 <term>trustpw</term>
839 <listitem><para>Trust password</para></listitem>
840 </varlistentry>
841 </variablelist>
843 <variablelist><title>Examples:</title>
844 <varlistentry>
845 <term>Create a trust object on srv1.dom1.dom for the domain dom2</term>
846 <listitem><literallayout>
847 net rpc trust create \
848     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
849     other_netbios_domain=dom2 \
850     otherdomain=dom2.dom \
851     trustpw=12345678 \
852     -S srv1.dom1.dom
853 </literallayout></listitem>
854 </varlistentry>
855 <varlistentry>
856 <term>Create a trust relationship between dom1 and dom2</term>
857 <listitem><literallayout>
858 net rpc trust create \
859     otherserver=srv2.dom2.test \
860     otheruser=dom2adm \
861     -S srv1.dom1.dom
862 </literallayout></listitem>
863 </varlistentry>
864 </variablelist>
865 </refsect3>
867 <refsect3>
868 <title>RPC TRUST DELETE</title>
870 <para>Delete a trust trust object by calling lsaDeleteTrustedDomain.
871 The can be done on a single server or on two servers at once.</para>
873 <variablelist><title>Options:</title>
874 <varlistentry>
875 <term>otherserver</term>
876 <listitem><para>Domain controller of the second domain</para></listitem>
877 </varlistentry>
879 <varlistentry>
880 <term>otheruser</term>
881 <listitem><para>Admin user in the second domain</para></listitem>
882 </varlistentry>
884 <varlistentry>
885 <term>otherdomainsid</term>
886 <listitem><para>SID of the second domain</para></listitem>
887 </varlistentry>
888 </variablelist>
890 <variablelist><title>Examples:</title>
891 <varlistentry>
892 <term>Delete a trust object on srv1.dom1.dom for the domain dom2</term>
893 <listitem><literallayout>
894 net rpc trust delete \
895     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
896     -S srv1.dom1.dom
897 </literallayout></listitem>
898 </varlistentry>
899 <varlistentry>
900 <term>Delete a trust relationship between dom1 and dom2</term>
901 <listitem><literallayout>
902 net rpc trust delete \
903     otherserver=srv2.dom2.test \
904     otheruser=dom2adm \
905     -S srv1.dom1.dom
906 </literallayout></listitem>
907 </varlistentry>
908 </variablelist>
909 </refsect3>
911 </refsect2>
913 <refsect2>
914 <refsect3>
915 <title>RPC RIGHTS</title>
917 <para>This subcommand is used to view and manage Samba's rights assignments (also 
918 referred to as privileges).  There are three options currently available: 
919 <parameter>list</parameter>, <parameter>grant</parameter>, and 
920 <parameter>revoke</parameter>.  More details on Samba's privilege model and its use
921 can be found in the Samba-HOWTO-Collection.</para>
923 </refsect3>
926 </refsect2>
928 <refsect2>
929 <title>RPC ABORTSHUTDOWN</title>
931 <para>Abort the shutdown of a remote server.</para>
933 </refsect2>
935 <refsect2>
936 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
938 <para>Shut down the remote server.</para>
940 <variablelist>
941 <varlistentry>
942 <term>-r</term>
943 <listitem><para>
944 Reboot after shutdown.
945 </para></listitem>
946 </varlistentry>
948 <varlistentry>
949 <term>-f</term>
950 <listitem><para>
951 Force shutting down all applications.
952 </para></listitem>
953 </varlistentry>
955 <varlistentry>
956 <term>-t timeout</term>
957 <listitem><para>
958 Timeout before system will be shut down. An interactive 
959 user of the system can use this time to cancel the shutdown.
960 </para></listitem>
961 </varlistentry>
963 <varlistentry>
964 <term>-C message</term>
965 <listitem><para>Display the specified message on the screen to 
966 announce the shutdown.</para></listitem>
967 </varlistentry>
968 </variablelist>
970 </refsect2>
972 <refsect2>
973 <title>RPC SAMDUMP</title>
975 <para>Print out sam database of remote server. You need
976 to run this against the PDC, from a Samba machine joined as a BDC. </para>
977 </refsect2>
979 <refsect2>
980 <title>RPC VAMPIRE</title>
982 <para>Export users, aliases and groups from remote server to 
983 local server.  You need to run this against the PDC, from a Samba machine joined as a BDC. 
984 </para>
985 </refsect2>
987 <refsect2>
988 <title>RPC VAMPIRE KEYTAB</title>
990 <para>Dump remote SAM database to local Kerberos keytab file.
991 </para>
992 </refsect2>
994 <refsect2>
995 <title>RPC VAMPIRE LDIF</title>
997 <para>Dump remote SAM database to local LDIF file or standard output.
998 </para>
999 </refsect2>
1001 <refsect2>
1002 <title>RPC GETSID</title>
1004 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
1006 </refsect2>
1008 <refsect2>
1009 <title>ADS LEAVE</title>
1011 <para>Make the remote host leave the domain it is part of. </para>
1013 </refsect2>
1015 <refsect2>
1016 <title>ADS STATUS</title>
1018 <para>Print out status of machine account of the local machine in ADS.
1019 Prints out quite some debug info. Aimed at developers, regular 
1020 users should use <command>NET ADS TESTJOIN</command>.</para>
1022 </refsect2>
1024 <refsect2>
1025 <title>ADS PRINTER</title>
1027 <refsect3>
1028 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1030 <para>
1031 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the 
1032 server name defaults to the local host.</para>
1034 </refsect3>
1036 <refsect3>
1037 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1039 <para>Publish specified printer using ADS.</para>
1041 </refsect3>
1043 <refsect3>
1044 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1046 <para>Remove specified printer from ADS directory.</para>
1048 </refsect3>
1050 </refsect2>
1052 <refsect2>
1053 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1055 <para>Perform a raw LDAP search on a ADS server and dump the results. The 
1056 expression is a standard LDAP search expression, and the 
1057 attributes are a list of LDAP fields to show in the results.</para>
1059 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1060 </para>
1062 </refsect2>
1064 <refsect2>
1065 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1067 <para>
1068 Perform a raw LDAP search on a ADS server and dump the results. The 
1069 DN standard LDAP DN, and the attributes are a list of LDAP fields 
1070 to show in the result. 
1071 </para>
1073 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1075 </refsect2>
1077 <refsect2>
1078 <title>ADS WORKGROUP</title>
1080 <para>Print out workgroup name for specified kerberos realm.</para>
1082 </refsect2>
1084 <refsect2>
1085 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
1087 <para>
1088 (Re)Create a BUILTIN group.
1089 Only a wellknown set of BUILTIN groups can be created with this command.
1090 This is the list of currently recognized group names: Administrators,
1091 Users, Guests, Power Users, Account Operators, Server Operators, Print
1092 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1093 compatible Access.
1095 This command requires a running Winbindd with idmap allocation properly
1096 configured. The group gid will be allocated out of the winbindd range.
1097 </para>
1099 </refsect2>
1101 <refsect2>
1102 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
1104 <para>
1105 Create a LOCAL group (also known as Alias).
1107 This command requires a running Winbindd with idmap allocation properly
1108 configured. The group gid will be allocated out of the winbindd range.
1109 </para>
1111 </refsect2>
1113 <refsect2>
1114 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
1116 <para>
1117 Delete an existing LOCAL group (also known as Alias).
1119 </para>
1121 </refsect2>
1123 <refsect2>
1124 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
1126 <para>
1127 Map an existing Unix group and make it a Domain Group, the domain group
1128 will have the same name.
1129 </para>
1131 </refsect2>
1133 <refsect2>
1134 <title>SAM UNMAPUNIXGROUP &lt;NAME&gt;</title>
1136 <para>
1137 Remove an existing group mapping entry.
1138 </para>
1140 </refsect2>
1142 <refsect2>
1143 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1145 <para>
1146 Add a member to a Local group. The group can be specified only by name,
1147 the member can be specified by name or SID.
1148 </para>
1150 </refsect2>
1152 <refsect2>
1153 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1155 <para>
1156 Remove a member from a Local group. The group and the member must be
1157 specified by name.
1158 </para>
1160 </refsect2>
1162 <refsect2>
1163 <title>SAM LISTMEM &lt;GROUP&gt;</title>
1165 <para>
1166 List Local group members. The group must be specified by name.
1167 </para>
1169 </refsect2>
1171 <refsect2>
1172 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
1174 <para>
1175 List the specified set of accounts by name. If verbose is specified,
1176 the rid and description is also provided for each account.
1177 </para>
1179 </refsect2>
1181 <refsect2>
1182 <title>SAM RIGHTS LIST</title>
1184 <para>
1185 List all available privileges.
1186 </para>
1188 </refsect2>
1190 <refsect2>
1191 <title>SAM RIGHTS GRANT &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1193 <para>
1194 Grant one or more privileges to a user.
1195 </para>
1197 </refsect2>
1199 <refsect2>
1200 <title>SAM RIGHTS REVOKE &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1202 <para>
1203 Revoke one or more privileges from a user.
1204 </para>
1206 </refsect2>
1208 <refsect2>
1209 <title>SAM SHOW &lt;NAME&gt;</title>
1211 <para>
1212 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1213 account.
1214 </para>
1216 </refsect2>
1218 <refsect2>
1219 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1221 <para>
1222 Set the home directory for a user account.
1223 </para>
1225 </refsect2>
1227 <refsect2>
1228 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1230 <para>
1231 Set the profile path for a user account.
1232 </para>
1234 </refsect2>
1236 <refsect2>
1237 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1239 <para>
1240 Set the comment for a user or group account.
1241 </para>
1243 </refsect2>
1245 <refsect2>
1246 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1248 <para>
1249 Set the full name for a user account.
1250 </para>
1252 </refsect2>
1254 <refsect2>
1255 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1257 <para>
1258 Set the logon script for a user account.
1259 </para>
1261 </refsect2>
1263 <refsect2>
1264 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1266 <para>
1267 Set the home drive for a user account.
1268 </para>
1270 </refsect2>
1272 <refsect2>
1273 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1275 <para>
1276 Set the workstations a user account is allowed to log in from.
1277 </para>
1279 </refsect2>
1281 <refsect2>
1282 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1284 <para>
1285 Set the "disabled" flag for a user account.
1286 </para>
1288 </refsect2>
1290 <refsect2>
1291 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1293 <para>
1294 Set the "password not required" flag for a user account.
1295 </para>
1297 </refsect2>
1299 <refsect2>
1300 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1302 <para>
1303 Set the "autolock" flag for a user account.
1304 </para>
1306 </refsect2>
1308 <refsect2>
1309 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1311 <para>
1312 Set the "password do not expire" flag for a user account.
1313 </para>
1315 </refsect2>
1317 <refsect2>
1318 <title>SAM SET PWDMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1320 <para>
1321 Set or unset the "password must change" flag for a user account.
1322 </para>
1324 </refsect2>
1326 <refsect2>
1327 <title>SAM POLICY LIST</title>
1329 <para>
1330 List the available account policies.
1331 </para>
1333 </refsect2>
1335 <refsect2>
1336 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1338 <para>
1339 Show the account policy value.
1340 </para>
1342 </refsect2>
1344 <refsect2>
1345 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1347 <para>
1348 Set a value for the account policy.
1349 Valid values can be: "forever", "never", "off", or a number.
1350 </para>
1352 </refsect2>
1354 <refsect2>
1355 <title>SAM PROVISION</title>
1357 <para>
1358 Only available if ldapsam:editposix is set and winbindd is running.
1359 Properly populates the ldap tree with the basic accounts (Administrator)
1360 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1361 </para>
1363 </refsect2>
1365 <refsect2>
1366 <title>IDMAP DUMP &lt;local tdb file name&gt;</title>
1368 <para>
1369 Dumps the mappings contained in the local tdb file specified.
1370 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1371 </para>
1373 </refsect2>
1375 <refsect2>
1376 <title>IDMAP RESTORE [input file]</title>
1378 <para>
1379 Restore the mappings from the specified file or stdin.
1380 </para>
1382 </refsect2>
1384 <refsect2>
1385 <title>IDMAP SECRET &lt;DOMAIN&gt; &lt;secret&gt;</title>
1387 <para>
1388 Store a secret for the specified domain, used primarily for domains
1389 that use idmap_ldap as a backend. In this case the secret is used
1390 as the password for the user DN used to bind to the ldap server.
1391 </para>
1393 </refsect2>
1395 <refsect2>
1397 <title>IDMAP DELETE [-f] [--db=&lt;DB&gt;] &lt;ID&gt;</title>
1399 <para>
1400 Delete a mapping sid &lt;-&gt; gid or sid &lt;-&gt; uid from the IDMAP database.
1401 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".
1402 Use -f to delete an invalid partial mapping &lt;ID&gt; -&gt; xx
1403 </para>
1404 <para>
1405   Use "smbcontrol all idmap ..." to notify running smbd instances.
1406   See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
1407   <manvolnum>1</manvolnum></citerefentry> manpage for details.
1408 </para>
1409 </refsect2>
1411 <refsect2>
1413 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=&lt;DB&gt;]</title>
1415 <para>
1416   Check and repair the IDMAP database. If no option is given a read only check
1417   of the database is done. Among others an interactive or automatic repair mode
1418   may be chosen with one of the following options:
1420   <variablelist>
1421     <varlistentry><term>-r|--repair</term>
1422     <listitem><para>
1423       Interactive repair mode, ask a lot of questions.
1424     </para></listitem>
1425     </varlistentry>
1427     <varlistentry><term>-a|--auto</term>
1428     <listitem><para>
1429       Noninteractive repair mode, use default answers.
1430     </para></listitem>
1431     </varlistentry>
1433     <varlistentry><term>-v|--verbose</term>
1434       <listitem><para>
1435         Produce more output.
1436       </para></listitem>
1437     </varlistentry>
1439     <varlistentry><term>-f|--force</term>
1440       <listitem><para>
1441         Try to apply changes, even if they do not apply cleanly.
1442       </para></listitem>
1443     </varlistentry>
1445     <varlistentry><term>-T|--test</term>
1446       <listitem><para>
1447         Dry run, show what changes would be made but don't touch anything.
1448       </para></listitem>
1449     </varlistentry>
1451     <varlistentry><term>-l|--lock</term>
1452       <listitem><para>
1453         Lock the database while doing the check.
1454       </para></listitem>
1455     </varlistentry>
1457     <varlistentry><term>--db &lt;DB&gt;</term>
1458       <listitem><para>
1459         Check the specified database.
1460       </para></listitem>
1461     </varlistentry>
1462     <varlistentry><term></term>
1463       <listitem><para>
1464       </para></listitem>
1465     </varlistentry>
1466   </variablelist>
1468   It reports about the finding of the following errors:
1470   <variablelist>
1471     <varlistentry><term>Missing reverse mapping:</term>
1472     <listitem><para>
1473       A record with mapping A-&gt;B where there is no B-&gt;A. Default action
1474       in repair mode is to "fix" this by adding the reverse mapping.
1475     </para></listitem>
1476     </varlistentry>
1478     <varlistentry><term>Invalid mapping:</term>
1479     <listitem><para>
1480       A record with mapping A-&gt;B where B-&gt;C. Default action
1481       is to "delete" this record.
1482     </para></listitem>
1483   </varlistentry>
1485   <varlistentry><term>Missing or invalid HWM:</term>
1486     <listitem><para>
1487       A high water mark is not at least equal to the largest ID in the
1488       database. Default action is to "fix" this by setting it to the
1489       largest ID found +1.
1490     </para></listitem>
1491   </varlistentry>
1493   <varlistentry><term>Invalid record:</term>
1494     <listitem><para>
1495       Something we failed to parse. Default action is to "edit" it
1496       in interactive and "delete" it in automatic mode.
1497     </para></listitem>
1498   </varlistentry>
1499 </variablelist>
1500 </para>
1501 </refsect2>
1504 <refsect2>
1505 <title>USERSHARE</title>
1507 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1508 non-root users to add user defined shares to be exported using the "net usershare"
1509 commands.
1510 </para>
1512 <para>
1513 To set this up, first set up your smb.conf by adding to the [global] section:
1515 usershare path = /usr/local/samba/lib/usershares
1517 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1518 set the group owner to the UNIX group who should have the ability to create usershares,
1519 for example a group called "serverops".
1521 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1523 (Owner and group all access, no access for others, plus the sticky bit,
1524 which means that a file in that directory can be renamed or deleted only
1525 by the owner of the file).
1527 Finally, tell smbd how many usershares you will allow by adding to the [global]
1528 section of smb.conf a line such as :
1530 usershare max shares = 100.
1532 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1533 can create user defined shares on demand using the commands below.
1534 </para>
1536 <para>The usershare commands are:
1538 <simplelist>
1539 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
1540 <member>net usershare delete sharename - to delete a user defined share.</member>
1541 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1542 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1543 </simplelist>
1545 </para>
1547 <refsect3>
1548 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1550 <para>
1551 Add or replace a new user defined share, with name "sharename".
1552 </para>
1554 <para>
1555 "path" specifies the absolute pathname on the system to be exported.
1556 Restrictions may be put on this, see the global smb.conf parameters:
1557 "usershare owner only", "usershare prefix allow list", and
1558 "usershare prefix deny list".
1559 </para>
1561 <para>
1562 The optional "comment" parameter is the comment that will appear
1563 on the share when browsed to by a client.
1564 </para>
1566 <para>The optional "acl" field
1567 specifies which users have read and write access to the entire share.
1568 Note that guest connections are not allowed unless the smb.conf parameter
1569 "usershare allow guests" has been set. The definition of a user
1570 defined share acl is: "user:permission", where user is a valid
1571 username on the system and permission can be "F", "R", or "D".
1572 "F" stands for "full permissions", ie. read and write permissions.
1573 "D" stands for "deny" for a user, ie. prevent this user from accessing
1574 this share.
1575 "R" stands for "read only", ie. only allow read access to this
1576 share (no creation of new files or directories or writing to files).
1577 </para>
1579 <para>
1580 The default if no "acl" is given is "Everyone:R", which means any 
1581 authenticated user has read-only access.
1582 </para>
1584 <para>
1585 The optional "guest_ok" has the same effect as the parameter of the
1586 same name in smb.conf, in that it allows guest access to this user
1587 defined share. This parameter is only allowed if the global parameter
1588 "usershare allow guests" has been set to true in the smb.conf.
1589 </para>
1591 There is no separate command to modify an existing user defined share,
1592 just use the "net usershare add [sharename]" command using the same
1593 sharename as the one you wish to modify and specify the new options
1594 you wish. The Samba smbd daemon notices user defined share modifications
1595 at connect time so will see the change immediately, there is no need
1596 to restart smbd on adding, deleting or changing a user defined share.
1597 </refsect3>
1599 <refsect3>
1600 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1602 <para>
1603 Deletes the user defined share by name. The Samba smbd daemon
1604 immediately notices this change, although it will not disconnect
1605 any users currently connected to the deleted share.
1606 </para>
1608 </refsect3>
1610 <refsect3>
1611 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1613 <para>
1614 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1615 </para>
1617 <para>
1618 net usershare info on its own dumps out info on the user defined shares that were
1619 created by the current user, or restricts them to share names that match the given
1620 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1621 If the '-l' or '--long' option is also given, it prints out info on user defined
1622 shares created by other users.
1623 </para>
1625 <para>
1626 The information given about a share looks like:
1628 [foobar]
1629 path=/home/jeremy
1630 comment=testme
1631 usershare_acl=Everyone:F
1632 guest_ok=n
1634 And is a list of the current settings of the user defined share that can be
1635 modified by the "net usershare add" command.
1636 </para>
1638 </refsect3>
1640 <refsect3>
1641 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1643 <para>
1644 List all the user defined shares owned by the current user matching the given pattern, or all users.
1645 </para>
1647 <para>
1648 net usershare list on its own list out the names of the user defined shares that were
1649 created by the current user, or restricts the list to share names that match the given
1650 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1651 If the '-l' or '--long' option is also given, it includes the names of user defined
1652 shares created by other users.
1653 </para>
1655 </refsect3>
1657 </refsect2>
1659 <refsect2>
1660 <title>[RPC] CONF</title>
1662 <para>Starting with version 3.2.0, a Samba server can be configured by data
1663 stored in registry. This configuration data can be edited with the new "net
1664 conf" commands. There is also the possiblity to configure a remote Samba server
1665 by enabling the RPC conf mode and specifying the the address of the remote server.
1666 </para>
1668 <para>
1669 The deployment of this configuration data can be activated in two levels from the
1670 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
1671 activated by setting <parameter>registry shares</parameter> to
1672 <quote>yes</quote> in the [global] section and global configuration options are
1673 activated by setting <smbconfoption name="include">registry</smbconfoption> in
1674 the [global] section for a mixed configuration or by setting
1675 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
1676 section for a registry-only configuration.
1677 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
1678 <manvolnum>5</manvolnum></citerefentry> manpage for details.
1679 </para>
1681 <para>The conf commands are:
1682 <simplelist>
1683 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
1684 format.</member>
1685 <member>net [rpc] conf import - Import configuration from file in smb.conf
1686 format.</member>
1687 <member>net [rpc] conf listshares - List the registry shares.</member>
1688 <member>net [rpc] conf drop - Delete the complete configuration from
1689 registry.</member>
1690 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
1691 <member>net [rpc] conf addshare - Create a new registry share.</member>
1692 <member>net [rpc] conf delshare - Delete a registry share.</member>
1693 <member>net [rpc] conf setparm - Store a parameter.</member>
1694 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
1695 <member>net [rpc] conf delparm - Delete a parameter.</member>
1696 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
1697 <member>net [rpc] conf setincludes - Set includes for a share.</member>
1698 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
1699 </simplelist>
1700 </para>
1702 <refsect3>
1703 <title>[RPC] CONF LIST</title>
1705 <para>
1706 Print the configuration data stored in the registry in a smb.conf-like format to
1707 standard output.
1708 </para>
1709 </refsect3>
1711 <refsect3>
1712 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
1714 <para>
1715 This command imports configuration from a file in smb.conf format.
1716 If a section encountered in the input file is present in registry,
1717 its contents is replaced. Sections of registry configuration that have
1718 no counterpart in the input file are not affected. If you want to delete these,
1719 you will have to use the "net conf drop" or "net conf delshare" commands.
1720 Optionally, a section may be specified to restrict the effect of the
1721 import command to that specific section. A test mode is enabled by specifying
1722 the parameter "-T" on the commandline. In test mode, no changes are made to the
1723 registry, and the resulting configuration is printed to standard output instead.
1724 </para>
1725 </refsect3>
1727 <refsect3>
1728 <title>[RPC] CONF LISTSHARES</title>
1730 <para>
1731 List the names of the shares defined in registry.
1732 </para>
1733 </refsect3>
1735 <refsect3>
1736 <title>[RPC] CONF DROP</title>
1738 <para>
1739 Delete the complete configuration data from registry.
1740 </para>
1741 </refsect3>
1743 <refsect3>
1744 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
1746 <para>
1747 Show the definition of the share or section specified. It is valid to specify
1748 "global" as sharename to retrieve the global configuration options from
1749 registry.
1750 </para>
1751 </refsect3>
1753 <refsect3>
1754 <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>
1756 <para>Create a new share definition in registry.
1757 The sharename and path have to be given. The share name may
1758 <emphasis>not</emphasis> be "global". Optionally, values for the very
1759 common options "writeable", "guest ok" and a "comment" may be specified.
1760 The same result may be obtained by a sequence of "net conf setparm"
1761 commands.
1762 </para>
1763 </refsect3>
1765 <refsect3>
1766 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
1768 <para>
1769 Delete a share definition from registry.
1770 </para>
1771 </refsect3>
1773 <refsect3>
1774 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
1776 <para>
1777 Store a parameter in registry. The section may be global or a sharename.
1778 The section is created if it does not exist yet.
1779 </para>
1780 </refsect3>
1782 <refsect3>
1783 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1785 <para>
1786 Show a parameter stored in registry.
1787 </para>
1788 </refsect3>
1790 <refsect3>
1791 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1793 <para>
1794 Delete a parameter stored in registry.
1795 </para>
1796 </refsect3>
1798 <refsect3>
1799 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
1801 <para>
1802 Get the list of includes for the provided section (global or share).
1803 </para>
1805 <para>
1806 Note that due to the nature of the registry database and the nature of include directives,
1807 the includes need special treatment: Parameters are stored in registry by the parameter
1808 name as valuename, so there is only ever one instance of a parameter per share.
1809 Also, a specific order like in a text file is not guaranteed. For all real
1810 parameters, this is perfectly ok, but the include directive is rather a meta
1811 parameter, for which, in the smb.conf text file, the place where it is specified
1812 between the other parameters is very important. This can not be achieved by the
1813 simple registry smbconf data model, so there is one ordered list of includes
1814 per share, and this list is evaluated after all the parameters of the share.
1815 </para>
1817 <para>
1818 Further note that currently, only files can be included from registry
1819 configuration. In the future, there will be the ability to include configuration
1820 data from other registry keys.
1821 </para>
1822 </refsect3>
1824 <refsect3>
1825 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
1827 <para>
1828 Set the list of includes for the provided section (global or share) to the given
1829 list of one or more filenames. The filenames may contain the usual smb.conf
1830 macros like %I.
1831 </para>
1832 </refsect3>
1834 <refsect3>
1835 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
1837 <para>
1838 Delete the list of includes from the provided section (global or share).
1839 </para>
1840 </refsect3>
1842 </refsect2>
1844 <refsect2>
1845 <title>REGISTRY</title>
1846 <para>
1847 Manipulate Samba's registry.
1848 </para>
1850 <para>The registry commands are:
1851 <simplelist>
1852 <member>net registry enumerate   - Enumerate registry keys and values.</member>
1853 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
1854 <member>net registry createkey   - Create a new registry key.</member>
1855 <member>net registry deletekey   - Delete a registry key.</member>
1856 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
1857 <member>net registry getvalue    - Print a registry value.</member>
1858 <member>net registry getvalueraw - Print a registry value (raw format).</member>
1859 <member>net registry setvalue    - Set a new registry value.</member>
1860 <member>net registry increment   - Increment a DWORD registry value under a lock.
1861 </member>
1862 <member>net registry deletevalue - Delete a registry value.</member>
1863 <member>net registry getsd       - Get security descriptor.</member>
1864 <member>net registry getsd_sdd1  - Get security descriptor in sddl format.
1865 </member>
1866 <member>net registry setsd_sdd1  - Set security descriptor from sddl format
1867 string.</member>
1868 <member>net registry import      - Import a registration entries (.reg) file.
1869 </member>
1870 <member>net registry export      - Export a registration entries (.reg) file.
1871 </member>
1872 <member>net registry convert     - Convert a registration entries (.reg) file.
1873 </member>
1874 <member>net registry check       - Check and reapair a registry database.
1875 </member>
1876 </simplelist>
1877 </para>
1879 <refsect3>
1880   <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
1881   <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
1882   </para>
1883 </refsect3>
1885 <refsect3>
1886   <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
1887   <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
1888   </para>
1889 </refsect3>
1891 <refsect3>
1892   <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
1893   <para>Create a new <emphasis>key</emphasis> if not yet existing.
1894   </para>
1895 </refsect3>
1897 <refsect3>
1898   <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
1899   <para>Delete the given <emphasis>key</emphasis> and its
1900   values from the registry, if it has no subkeys.
1901   </para>
1902 </refsect3>
1904 <refsect3>
1905   <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
1906   <para>Delete the given <emphasis>key</emphasis> and all of its
1907   subkeys and values from the registry.
1908   </para>
1909 </refsect3>
1911 <refsect3>
1912   <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
1913   --><replaceable>name</replaceable></title>
1915   <para>Output type and actual value of the value <emphasis>name</emphasis>
1916   of the given <emphasis>key</emphasis>.
1917   </para>
1918 </refsect3>
1920 <refsect3>
1921   <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
1922   --><replaceable>name</replaceable></title>
1923   <para>Output the actual value of the value <emphasis>name</emphasis>
1924   of the given <emphasis>key</emphasis>.
1925   </para>
1926 </refsect3>
1928 <refsect3>
1929   <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
1930   --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
1931   --><replaceable>value</replaceable> ...<!--
1932   --></title>
1934   <para>Set the value <emphasis>name</emphasis>
1935   of an existing <emphasis>key</emphasis>.
1936   <emphasis>type</emphasis> may be one of
1937   <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
1938   <emphasis>dword</emphasis>.
1939   In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
1940   be given multiple times.
1941   </para>
1942 </refsect3>
1944 <refsect3>
1945   <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
1946   --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
1947   --></title>
1949   <para>Increment the DWORD value <emphasis>name</emphasis>
1950   of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
1951   while holding a g_lock.
1952   <emphasis>inc</emphasis> defaults to 1.
1953   </para>
1954 </refsect3>
1956 <refsect3>
1957   <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
1958   --><replaceable>name</replaceable></title>
1960   <para>Delete the value <emphasis>name</emphasis>
1961   of the given <emphasis>key</emphasis>.
1962   </para>
1963 </refsect3>
1965 <refsect3>
1966   <title>REGISTRY GETSD <replaceable>key</replaceable></title>
1968   <para>Get the security descriptor of the given <emphasis>key</emphasis>.
1969   </para>
1970 </refsect3>
1972 <refsect3>
1973   <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
1975   <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
1976   Security Descriptor Definition Language (SDDL) string.
1977   </para>
1978 </refsect3>
1980 <refsect3>
1981   <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
1982   --><replaceable>sd</replaceable></title>
1984   <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
1985   Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
1986   </para>
1987 </refsect3>
1989 <refsect3>
1990   <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
1991   --><replaceable> [--precheck &lt;check-file&gt;] [opt]</replaceable></title>
1992   <para>Import a registration entries (.reg) <emphasis>file</emphasis>.</para>
1993   <para>The following options are available:</para>
1994   <variablelist>
1995     <varlistentry><term>--precheck <replaceable>check-file</replaceable></term>
1996     <listitem><para>
1997       This is a mechanism to check the existence or non-existence of
1998       certain keys or values specified in a precheck file before applying
1999       the import file.
2000       The import file will only be applied if the precheck succeeds.
2001     </para>
2002     <para>
2003       The check-file follows the normal registry file syntax with the
2004       following semantics:
2005     </para>
2006       <itemizedlist>
2007         <listitem><para>&lt;value name&gt;=&lt;value&gt; checks whether the
2008           value exists and has the given value.</para></listitem>
2009         <listitem><para>&lt;value name&gt;=- checks whether the value does
2010           not exist.</para></listitem>
2011         <listitem><para>[key] checks whether the key exists.</para>
2012         </listitem>
2013         <listitem><para>[-key] checks whether the key does not exist.</para>
2014         </listitem>
2015       </itemizedlist>
2016     </listitem>
2017     </varlistentry>
2018   </variablelist>
2019 </refsect3>
2021 <refsect3>
2022   <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2023   --><replaceable>file</replaceable><!--
2024   --><replaceable>[opt]</replaceable></title>
2026   <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2027   <emphasis>file</emphasis>.
2028   </para>
2029 </refsect3>
2031 <refsect3>
2032   <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2033   --><replaceable>out</replaceable> <!--
2034   --><replaceable>[[inopt] outopt]</replaceable></title>
2036   <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2037   </para>
2038 </refsect3>
2040 <refsect3>
2041   <title>REGISTRY CHECK [-ravTl] [-o &lt;ODB&gt;] [--wipe] [&lt;DB&gt;]</title>
2042   <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
2044   <variablelist>
2045     <varlistentry><term>-r|--repair</term>
2046     <listitem><para>
2047       Interactive repair mode, ask a lot of questions.
2048     </para></listitem>
2049     </varlistentry>
2051     <varlistentry><term>-a|--auto</term>
2052     <listitem><para>
2053       Noninteractive repair mode, use default answers.
2054     </para></listitem>
2055     </varlistentry>
2057     <varlistentry><term>-v|--verbose</term>
2058       <listitem><para>
2059         Produce more output.
2060       </para></listitem>
2061     </varlistentry>
2063     <varlistentry><term>-T|--test</term>
2064       <listitem><para>
2065         Dry run, show what changes would be made but don't touch anything.
2066       </para></listitem>
2067     </varlistentry>
2069     <varlistentry><term>-l|--lock</term>
2070       <listitem><para>
2071         Lock the database while doing the check.
2072       </para></listitem>
2073     </varlistentry>
2075    <varlistentry><term>--reg-version={1,2,3}</term>
2076       <listitem><para>
2077         Specify the format of the registry database. If not given it defaults to
2078         the value of the binary or, if an registry.tdb is explizitly stated at
2079         the commandline, to the value found in the INFO/version record.
2080       </para></listitem>
2081     </varlistentry>
2083     <varlistentry><term>[--db] &lt;DB&gt;</term>
2084       <listitem><para>
2085         Check the specified database.
2086       </para></listitem>
2087     </varlistentry>
2089     <varlistentry><term>-o|--output &lt;ODB&gt;</term>
2090       <listitem><para>
2091         Create a new registry database &lt;ODB&gt; instead of modifying the
2092         input. If &lt;ODB&gt; is already existing --wipe may be used to
2093         overwrite it.
2094       </para></listitem>
2095     </varlistentry>
2097    <varlistentry><term>--wipe</term>
2098       <listitem><para>
2099         Replace the registry database instead of modifying the input or
2100         overwrite an existing output database.
2101       </para></listitem>
2102     </varlistentry>
2104     <varlistentry><term></term>
2105       <listitem><para>
2106       </para></listitem>
2107     </varlistentry>
2108   </variablelist>
2109   </para>
2110 </refsect3>
2112 </refsect2>
2114 <refsect2>
2115 <title>EVENTLOG</title>
2117 <para>Starting with version 3.4.0 net can read, dump, import and export native
2118 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2119 </para>
2121 <para>
2122 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2123 <emphasis>smb.conf</emphasis> file.
2124 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2125 </para>
2127 <para>The eventlog commands are:
2128 <simplelist>
2129 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2130 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2131 tdb based representation of eventlogs.</member>
2132 <member>net eventlog export - Export the samba internal tdb based representation
2133 of eventlogs into an eventlog *.evt file.</member>
2134 </simplelist>
2135 </para>
2137 <refsect3>
2138 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2140 <para>
2141 Prints a eventlog *.evt file to standard output.
2142 </para>
2143 </refsect3>
2145 <refsect3>
2146 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2148 <para>
2149 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2150 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2151 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2152 defined in smb.conf.
2153 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2154 </para>
2156 </refsect3>
2158 <refsect3>
2159 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2161 <para>
2162 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2163 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2164 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2165 defined in smb.conf.
2166 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2167 </para>
2169 </refsect3>
2171 </refsect2>
2173 <refsect2>
2174 <title>DOM</title>
2176 <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.
2177 </para>
2178 <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.
2179 </para>
2181 <para>The client side support for remote join is implemented in the net dom commands which are:
2182 <simplelist>
2183 <member>net dom join - Join a remote computer into a domain.</member>
2184 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2185 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2186 </simplelist>
2187 </para>
2189 <refsect3>
2190 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2192 <para>
2193 Joins a computer into a domain. This command supports the following additional parameters:
2194 </para>
2196 <itemizedlist>
2198 <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>
2200 <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>
2202 <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>
2204 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2206 <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>
2208 </itemizedlist>
2210 <para>
2211 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.
2212 </para>
2213 <para>
2214         Example:
2215         net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2216 </para>
2217 <para>
2218 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.
2219 </para>
2221 </refsect3>
2223 <refsect3>
2224 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2226 <para>
2227 Unjoins a computer from a domain. This command supports the following additional parameters:
2228 </para>
2230 <itemizedlist>
2232 <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>
2234 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2236 <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>
2238 </itemizedlist>
2240 <para>
2241 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.
2242 </para>
2243 <para>
2244         Example:
2245         net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2246 </para>
2247 <para>
2248 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.
2249 </para>
2251 </refsect3>
2253 <refsect3>
2254 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2256 <para>
2257 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2258 </para>
2260 <itemizedlist>
2262 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2264 <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>
2266 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2268 <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>
2270 </itemizedlist>
2272 <para>
2273 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.
2274 </para>
2275 <para>
2276         Example:
2277         net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2278 </para>
2279 <para>
2280 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.
2281 </para>
2283 </refsect3>
2285 </refsect2>
2287 <refsect2>
2288 <title>G_LOCK</title>
2290 <para>Manage global locks.</para>
2292 <refsect3>
2293 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2295 <para>
2296 Execute a shell command under a global lock. This might be useful to define the
2297 order in which several shell commands will be executed. The locking information
2298 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2299 running, the locking information will be available on all cluster nodes.
2300 </para>
2302 <itemizedlist>
2303 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2304 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2305 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2306 </itemizedlist>
2307 </refsect3>
2309 <refsect3>
2310 <title>G_LOCK LOCKS</title>
2312 <para>
2313 Print a list of all currently existing locknames.
2314 </para>
2315 </refsect3>
2317 <refsect3>
2318 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2320 <para>
2321 Dump the locking table of a certain global lock.
2322 </para>
2323 </refsect3>
2325 </refsect2>
2327 <refsect2>
2328 <title>HELP [COMMAND]</title>
2330 <para>Gives usage information for the specified command.</para>
2332 </refsect2>
2334 </refsect1>
2336 <refsect1>
2337         <title>VERSION</title>
2339         <para>This man page is complete for version 3 of the Samba 
2340         suite.</para>
2341 </refsect1>
2343 <refsect1>
2344         <title>AUTHOR</title>
2345         
2346         <para>The original Samba software and related utilities 
2347         were created by Andrew Tridgell. Samba is now developed
2348         by the Samba Team as an Open Source project similar 
2349         to the way the Linux kernel is developed.</para>
2351         <para>The net manpage was written by Jelmer Vernooij.</para>
2352         
2353 </refsect1>
2355 </refentry>