docs: Added documentation for net rpc conf.
[Samba/gebeck_regimport.git] / docs-xml / manpages-3 / net.8.xml
blob6e6b7e3acf5beeb6f06b9fc27ff813bd2f2b12c5
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">3.6</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                 
65                 <varlistentry>
66                 <term>-w target-workgroup</term>
67                 <listitem><para>
68                 Sets target workgroup or domain. You have to specify 
69                 either this option or the IP address or the name of a server.
70                 </para></listitem>
71                 </varlistentry>
73                 <varlistentry>
74                 <term>-W workgroup</term>
75                 <listitem><para>
76                 Sets client workgroup or domain
77                 </para></listitem>
78                 </varlistentry>
80                 <varlistentry>
81                 <term>-U user</term>
82                 <listitem><para>
83                 User name to use
84                 </para></listitem>
85                 </varlistentry>
87                 <varlistentry>
88                 <term>-I ip-address</term>
89                 <listitem><para>
90                 IP address of target server to use. You have to
91                 specify either this option or a target workgroup or
92                 a target server.
93                 </para></listitem>
94                 </varlistentry>
96                 <varlistentry>
97                 <term>-p port</term>
98                 <listitem><para>
99                 Port on the target server to connect to (usually 139 or 445). 
100                 Defaults to trying 445 first, then 139.
101                 </para></listitem>
102                 </varlistentry>
104                 &stdarg.netbios.name;
105                 &stdarg.configfile;
107                 <varlistentry>
108                 <term>-S server</term>
109                 <listitem><para>
110                 Name of target server. You should specify either 
111                 this option or a target workgroup or a target IP address.
112                 </para></listitem>
113                 </varlistentry>
115                 <varlistentry>
116                 <term>-l</term>
117                 <listitem><para>
118                 When listing data, give more information on each item.
119                 </para></listitem>
120                 </varlistentry>
122                 <varlistentry>
123                 <term>-P</term>
124                 <listitem><para>
125                 Make queries to the external server using the machine account of the local server.
126                 </para></listitem>
127                 </varlistentry>
129                 <varlistentry>
130                 <term>--request-timeout 30</term>
131                 <listitem><para>
132                 Let client requests timeout after 30 seconds the default is 10
133                 seconds.
134                 </para></listitem>
135                 </varlistentry>
137                 &stdarg.server.debug;
138         </variablelist>
139 </refsect1>
141 <refsect1>
142 <title>COMMANDS</title>
144 <refsect2>
145 <title>CHANGESECRETPW</title>
147 <para>This command allows the Samba machine account password to be set from an external application
148 to a machine account password that has already been stored in Active Directory. DO NOT USE this command
149 unless you know exactly what you are doing. The use of this command requires that the force flag (-f)
150 be used also. There will be NO command prompt. Whatever information is piped into stdin, either by
151 typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use
152 this without care and attention as it will overwrite a legitimate machine password without warning.
153 YOU HAVE BEEN WARNED.
154 </para>
156 </refsect2>
158 <refsect2>
159         <title>TIME</title>
161         <para>The <command>NET TIME</command> command allows you to view the time on a remote server
162         or synchronise the time on the local server with the time on the remote server.</para>
164 <refsect3>
165 <title>TIME</title>
167 <para>Without any options, the <command>NET TIME</command> command 
168 displays the time on the remote server.
169 </para>
171 </refsect3>
173 <refsect3>
174 <title>TIME SYSTEM</title>
176 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.</para>
178 </refsect3>
180 <refsect3>
181 <title>TIME SET</title>
182 <para>Tries to set the date and time of the local server to that on 
183 the remote server using <command>/bin/date</command>. </para>
185 </refsect3>
187 <refsect3>
188 <title>TIME ZONE</title>
190 <para>Displays the timezone in hours from GMT on the remote computer.</para>
192 </refsect3>
193 </refsect2>
195 <refsect2>
196 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN] [createcomputer=OU] [options]</title>
198 <para>
199 Join a domain.  If the account already exists on the server, and 
200 [TYPE] is MEMBER, the machine will attempt to join automatically. 
201 (Assuming that the machine has been created in server manager)
202 Otherwise, a password will be prompted for, and a new account may
203 be created.</para>
205 <para>
206 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
207 joining the domain.
208 </para>
210 <para>
211 [UPN] (ADS only) set the principalname attribute during the join.  The default
212 format is host/netbiosname@REALM.
213 </para>
215 <para>
216 [OU] (ADS only) Precreate the computer account in a specific OU.  The
217 OU string reads from top to bottom without RDNs, and is delimited by
218 a '/'.  Please note that '\' is used for escape by both the shell
219 and ldap, so it may need to be doubled or quadrupled to pass through, 
220 and it is not used as a delimiter.
221 </para>
222 </refsect2>
224 <refsect2>
225 <title>[RPC] OLDJOIN [options]</title>
227 <para>Join a domain. Use the OLDJOIN option to join the domain 
228 using the old style of domain joining - you need to create a trust 
229 account in server manager first.</para>
230 </refsect2>
232 <refsect2>
233 <title>[RPC|ADS] USER</title>
235 <refsect3>
236 <title>[RPC|ADS] USER</title>
238 <para>List all users</para>
240 </refsect3>
242 <refsect3>
243 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
245 <para>Delete specified user</para>
247 </refsect3>
249 <refsect3>
250 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
252 <para>List the domain groups of the specified user.</para>
254 </refsect3>
256 <refsect3>
257 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
259 <para>Rename specified user.</para>
261 </refsect3>
263 <refsect3>
264 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
266 <para>Add specified user.</para>
267 </refsect3>
268 </refsect2>
270 <refsect2>
271 <title>[RPC|ADS] GROUP</title>
273 <refsect3>
274 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
275 <para>List user groups.</para>
276 </refsect3>
278 <refsect3>
279 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
281 <para>Delete specified group.</para>
283 </refsect3>
285 <refsect3>
286 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
288 <para>Create specified group.</para>
290 </refsect3>
291 </refsect2>
293 <refsect2>
294 <title>[RAP|RPC] SHARE</title>
296 <refsect3>
297 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
299 <para>Enumerates all exported resources (network shares) on target server.</para>
301 </refsect3>
303 <refsect3>
304 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
306 <para>Adds a share from a server (makes the export active). Maxusers 
307 specifies the number of users that can be connected to the 
308 share simultaneously.</para>
310 </refsect3>
312 <refsect3>
313 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
315 <para>Delete specified share.</para>
316 </refsect3>
317 </refsect2>
319 <refsect2>
320 <title>[RPC|RAP] FILE</title>
322 <refsect3>
323 <title>[RPC|RAP] FILE</title>
325 <para>List all open files on remote server.</para>
327 </refsect3>
329 <refsect3>
330 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
332 <para>Close file with specified <replaceable>fileid</replaceable> on 
333 remote server.</para>
335 </refsect3>
337 <refsect3>
338 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
340 <para>
341 Print information on specified <replaceable>fileid</replaceable>. 
342 Currently listed are: file-id, username, locks, path, permissions.
343 </para>
345 </refsect3>
347 <refsect3>
348 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
350 <para>
351 List files opened by specified <replaceable>user</replaceable>.
352 Please note that <command>net rap file user</command> does not work
353 against Samba servers. 
354 </para>
356 </refsect3>
358 </refsect2>
360 <refsect2>
361 <title>SESSION</title>
363 <refsect3>
364 <title>RAP SESSION</title>
366 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
367 sessions on the target server.</para>
369 </refsect3>
371 <refsect3>
372 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
374 <para>Close the specified sessions.</para>
376 </refsect3>
378 <refsect3>
379 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
381 <para>Give a list with all the open files in specified session.</para>
383 </refsect3>
385 </refsect2>
387 <refsect2>
388 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
390 <para>List all servers in specified domain or workgroup. Defaults
391 to local domain.</para>
393 </refsect2>
395 <refsect2>
396 <title>RAP DOMAIN</title>
398 <para>Lists all domains and workgroups visible on the 
399 current network.</para>
401 </refsect2>
403 <refsect2>
404 <title>RAP PRINTQ</title>
406 <refsect3>
407 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
409 <para>Lists the specified print queue and print jobs on the server.
410 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all 
411 queues are listed.</para>
413 </refsect3>
415 <refsect3>
416 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
418 <para>Delete job with specified id.</para>
420 </refsect3>
422 </refsect2>
424 <refsect2>
425 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
427 <para>
428 Validate whether the specified user can log in to the 
429 remote server. If the password is not specified on the commandline, it 
430 will be prompted. 
431 </para>
433 &not.implemented;
435 </refsect2>
437 <refsect2>
438 <title>RAP GROUPMEMBER</title>
440 <refsect3>
441 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
443 <para>List all members of the specified group.</para>
445 </refsect3>
447 <refsect3>
448 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
450 <para>Delete member from group.</para>
452 </refsect3>
454 <refsect3>
455 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
457 <para>Add member to group.</para>
459 </refsect3>
461 </refsect2>
463 <refsect2>
464 <title>RAP ADMIN <replaceable>command</replaceable></title>
466 <para>Execute the specified <replaceable>command</replaceable> on 
467 the remote server. Only works with OS/2 servers.
468 </para>
470 &not.implemented;
472 </refsect2>
474 <refsect2>
475 <title>RAP SERVICE</title>
477 <refsect3>
478 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
480 <para>Start the specified service on the remote server. Not implemented yet.</para>
482 &not.implemented;
484 </refsect3>
486 <refsect3>
487 <title>RAP SERVICE STOP</title>
489 <para>Stop the specified service on the remote server.</para>
491 &not.implemented;
493 </refsect3>
495 </refsect2>
497 <refsect2>
498 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
500 <para>
501 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
502 </para>
504 </refsect2>
506 <refsect2>
507 <title>LOOKUP</title>
509 <refsect3>
510 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
512 <para>
513 Lookup the IP address of the given host with the specified type (netbios suffix). 
514 The type defaults to 0x20 (workstation).
515 </para>
517 </refsect3>
519 <refsect3>
520 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
522 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
524 </refsect3>
526 <refsect3>
527 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
529 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
530 Defaults to local realm.</para>
532 </refsect3>
534 <refsect3>
535 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
537 <para>Give IP's of Domain Controllers for specified <replaceable>
538 DOMAIN</replaceable>. Defaults to local domain.</para>
540 </refsect3>
542 <refsect3>
543 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
545 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
546 or workgroup. Defaults to local domain.</para>
548 </refsect3>
550 </refsect2>
552 <refsect2>
553 <title>CACHE</title>
555 <para>Samba uses a general caching interface called 'gencache'. It 
556 can be controlled using 'NET CACHE'.</para>
558 <para>All the timeout parameters support the suffixes:
560 <simplelist>
561 <member>s - Seconds</member>
562 <member>m - Minutes</member>
563 <member>h - Hours</member>
564 <member>d - Days</member>
565 <member>w - Weeks</member>
566 </simplelist>
568 </para>
570 <refsect3>
571 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
573 <para>Add specified key+data to the cache with the given timeout.</para>
575 </refsect3>
577 <refsect3>
578 <title>CACHE DEL <replaceable>key</replaceable></title>
580 <para>Delete key from the cache.</para>
582 </refsect3>
584 <refsect3>
585 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
587 <para>Update data of existing cache entry.</para>
589 </refsect3>
591 <refsect3>
592 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
594 <para>Search for the specified pattern in the cache data.</para>
596 </refsect3>
598 <refsect3>
599 <title>CACHE LIST</title>
601 <para>
602 List all current items in the cache.
603 </para>
605 </refsect3>
607 <refsect3>
608 <title>CACHE FLUSH</title>
610 <para>Remove all the current items from the cache.</para>
612 </refsect3>
614 </refsect2>
616 <refsect2>
617 <title>GETLOCALSID [DOMAIN]</title>
619 <para>Prints the SID of the specified domain, or if the parameter is
620 omitted, the SID of the local server.</para>
622 </refsect2>
624 <refsect2>
625 <title>SETLOCALSID S-1-5-21-x-y-z</title>
627 <para>Sets SID for the local server to the specified SID.</para>
629 </refsect2>
631 <refsect2>
632 <title>GETDOMAINSID</title>
634 <para>Prints the local machine SID and the SID of the current 
635 domain.</para>
637 </refsect2>
639 <refsect2>
640 <title>SETDOMAINSID</title>
642 <para>Sets the SID of the current domain.</para>
644 </refsect2>
646 <refsect2>
647 <title>GROUPMAP</title>
649 <para>Manage the mappings between Windows group SIDs and UNIX groups.
650 Common options include:</para>
652 <itemizedlist>
653 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
654 <listitem><para>ntgroup - Name of the Windows NT group (must be
655   resolvable to a SID</para></listitem>
656 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
657 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
658 <listitem><para>type - Type of the group; either 'domain', 'local',
659   or 'builtin'</para></listitem>
660 <listitem><para>comment - Freeform text description of the group</para></listitem>
661 </itemizedlist>
663 <refsect3>
664 <title>GROUPMAP ADD</title>
666 <para>
667 Add a new group mapping entry:
668 <programlisting>
669 net groupmap add {rid=int|sid=string} unixgroup=string \
670         [type={domain|local}] [ntgroup=string] [comment=string]
671 </programlisting>
672 </para>
674 </refsect3>
676 <refsect3>
677 <title>GROUPMAP DELETE</title>
679 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
681 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
683 </refsect3>
685 <refsect3>
686 <title>GROUPMAP MODIFY</title>
688 <para>Update en existing group entry.</para>
690 <para>
691 <programlisting>
692 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
693        [comment=string] [type={domain|local}]
694 </programlisting>
695 </para>
696 </refsect3>
698 <refsect3>
699 <title>GROUPMAP LIST</title>
701 <para>List existing group mapping entries.</para>
703 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
705 </refsect3>
706 </refsect2>
710 <refsect2>
711 <title>MAXRID</title>
713 <para>Prints out the highest RID currently in use on the local
714 server (by the active 'passdb backend').
715 </para>
717 </refsect2>
719 <refsect2>
720 <title>RPC INFO</title>
722 <para>Print information about the domain of the remote server,
723 such as domain name, domain sid and number of users and groups.
724 </para>
726 </refsect2>
728 <refsect2>
729 <title>[RPC|ADS] TESTJOIN</title>
731 <para>Check whether participation in a domain is still valid.</para>
733 </refsect2>
735 <refsect2>
736 <title>[RPC|ADS] CHANGETRUSTPW</title>
738 <para>Force change of domain trust password.</para>
740 </refsect2>
742 <refsect2>
743 <title>RPC TRUSTDOM</title>
745 <refsect3>
746 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
748 <para>Add a interdomain trust account for <replaceable>DOMAIN</replaceable>. 
749 This is in fact a Samba account named <replaceable>DOMAIN$</replaceable> 
750 with the account flag <constant>'I'</constant> (interdomain trust account). 
751 This is required for incoming trusts to work. It makes Samba be a
752 trusted domain of the foreign (trusting) domain.
753 Users of the Samba domain will be made available in the foreign domain.
754 If the command is used against localhost it has the same effect as 
755 <command>smbpasswd -a -i DOMAIN</command>. Please note that both commands
756 expect a appropriate UNIX account. 
757 </para>
759 </refsect3>
761 <refsect3>
762 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
764 <para>Remove interdomain trust account for 
765 <replaceable>DOMAIN</replaceable>. If it is used against localhost 
766 it has the same effect as <command>smbpasswd -x DOMAIN$</command>. 
767 </para>
769 </refsect3>
771 <refsect3>
772 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
774 <para>
775 Establish a trust relationship to a trusted domain. 
776 Interdomain account must already be created on the remote PDC.
777 This is required for outgoing trusts to work. It makes Samba be a
778 trusting domain of a foreign (trusted) domain.
779 Users of the foreign domain will be made available in our domain.
780 You'll need winbind and a working idmap config to make them
781 appear in your system.
782 </para>
784 </refsect3>
786 <refsect3>
787 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
788 <para>Abandon relationship to trusted domain</para>
790 </refsect3>
792 <refsect3>
793 <title>RPC TRUSTDOM LIST</title>
795 <para>List all interdomain trust relationships.</para>
797 </refsect3>
798 </refsect2>
800 <refsect2>
801 <title>RPC TRUST</title>
803 <refsect3>
804 <title>RPC TRUST CREATE</title>
806 <para>Create a trust object by calling lsaCreateTrustedDomainEx2.
807 The can be done on a single server or on two servers at once with the
808 possibility to use a random trust password.</para>
810 <variablelist><title>Options:</title>
811 <varlistentry>
812 <term>otherserver</term>
813 <listitem><para>Domain controller of the second domain</para></listitem>
814 </varlistentry>
816 <varlistentry>
817 <term>otheruser</term>
818 <listitem><para>Admin user in the second domain</para></listitem>
819 </varlistentry>
821 <varlistentry>
822 <term>otherdomainsid</term>
823 <listitem><para>SID of the second domain</para></listitem>
824 </varlistentry>
826 <varlistentry>
827 <term>other_netbios_domain</term>
828 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
829 </varlistentry>
831 <varlistentry>
832 <term>otherdomain</term>
833 <listitem><para>DNS (full) name of the second domain</para></listitem>
834 </varlistentry>
836 <varlistentry>
837 <term>trustpw</term>
838 <listitem><para>Trust password</para></listitem>
839 </varlistentry>
840 </variablelist>
842 <variablelist><title>Examples:</title>
843 <varlistentry>
844 <term>Create a trust object on srv1.dom1.dom for the domain dom2</term>
845 <listitem><literallayout>
846 net rpc trust create \
847     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
848     other_netbios_domain=dom2 \
849     otherdomain=dom2.dom \
850     trustpw=12345678 \
851     -S srv1.dom1.dom
852 </literallayout></listitem>
853 </varlistentry>
854 <varlistentry>
855 <term>Create a trust relationship between dom1 and dom2</term>
856 <listitem><literallayout>
857 net rpc trust create \
858     otherserver=srv2.dom2.test \
859     otheruser=dom2adm \
860     -S srv1.dom1.dom
861 </literallayout></listitem>
862 </varlistentry>
863 </variablelist>
864 </refsect3>
866 <refsect3>
867 <title>RPC TRUST DELETE</title>
869 <para>Delete a trust trust object by calling lsaDeleteTrustedDomain.
870 The can be done on a single server or on two servers at once.</para>
872 <variablelist><title>Options:</title>
873 <varlistentry>
874 <term>otherserver</term>
875 <listitem><para>Domain controller of the second domain</para></listitem>
876 </varlistentry>
878 <varlistentry>
879 <term>otheruser</term>
880 <listitem><para>Admin user in the second domain</para></listitem>
881 </varlistentry>
883 <varlistentry>
884 <term>otherdomainsid</term>
885 <listitem><para>SID of the second domain</para></listitem>
886 </varlistentry>
887 </variablelist>
889 <variablelist><title>Examples:</title>
890 <varlistentry>
891 <term>Delete a trust object on srv1.dom1.dom for the domain dom2</term>
892 <listitem><literallayout>
893 net rpc trust delete \
894     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
895     -S srv1.dom1.dom
896 </literallayout></listitem>
897 </varlistentry>
898 <varlistentry>
899 <term>Delete a trust relationship between dom1 and dom2</term>
900 <listitem><literallayout>
901 net rpc trust delete \
902     otherserver=srv2.dom2.test \
903     otheruser=dom2adm \
904     -S srv1.dom1.dom
905 </literallayout></listitem>
906 </varlistentry>
907 </variablelist>
908 </refsect3>
910 </refsect2>
912 <refsect2>
913 <refsect3>
914 <title>RPC RIGHTS</title>
916 <para>This subcommand is used to view and manage Samba's rights assignments (also 
917 referred to as privileges).  There are three options currently available: 
918 <parameter>list</parameter>, <parameter>grant</parameter>, and 
919 <parameter>revoke</parameter>.  More details on Samba's privilege model and its use
920 can be found in the Samba-HOWTO-Collection.</para>
922 </refsect3>
925 </refsect2>
927 <refsect2>
928 <title>RPC ABORTSHUTDOWN</title>
930 <para>Abort the shutdown of a remote server.</para>
932 </refsect2>
934 <refsect2>
935 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
937 <para>Shut down the remote server.</para>
939 <variablelist>
940 <varlistentry>
941 <term>-r</term>
942 <listitem><para>
943 Reboot after shutdown.
944 </para></listitem>
945 </varlistentry>
947 <varlistentry>
948 <term>-f</term>
949 <listitem><para>
950 Force shutting down all applications.
951 </para></listitem>
952 </varlistentry>
954 <varlistentry>
955 <term>-t timeout</term>
956 <listitem><para>
957 Timeout before system will be shut down. An interactive 
958 user of the system can use this time to cancel the shutdown.
959 </para></listitem>
960 </varlistentry>
962 <varlistentry>
963 <term>-C message</term>
964 <listitem><para>Display the specified message on the screen to 
965 announce the shutdown.</para></listitem>
966 </varlistentry>
967 </variablelist>
969 </refsect2>
971 <refsect2>
972 <title>RPC SAMDUMP</title>
974 <para>Print out sam database of remote server. You need
975 to run this against the PDC, from a Samba machine joined as a BDC. </para>
976 </refsect2>
978 <refsect2>
979 <title>RPC VAMPIRE</title>
981 <para>Export users, aliases and groups from remote server to 
982 local server.  You need to run this against the PDC, from a Samba machine joined as a BDC. 
983 </para>
984 </refsect2>
986 <refsect2>
987 <title>RPC VAMPIRE KEYTAB</title>
989 <para>Dump remote SAM database to local Kerberos keytab file.
990 </para>
991 </refsect2>
993 <refsect2>
994 <title>RPC VAMPIRE LDIF</title>
996 <para>Dump remote SAM database to local LDIF file or standard output.
997 </para>
998 </refsect2>
1000 <refsect2>
1001 <title>RPC GETSID</title>
1003 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
1005 </refsect2>
1007 <refsect2>
1008 <title>ADS LEAVE</title>
1010 <para>Make the remote host leave the domain it is part of. </para>
1012 </refsect2>
1014 <refsect2>
1015 <title>ADS STATUS</title>
1017 <para>Print out status of machine account of the local machine in ADS.
1018 Prints out quite some debug info. Aimed at developers, regular 
1019 users should use <command>NET ADS TESTJOIN</command>.</para>
1021 </refsect2>
1023 <refsect2>
1024 <title>ADS PRINTER</title>
1026 <refsect3>
1027 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1029 <para>
1030 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the 
1031 server name defaults to the local host.</para>
1033 </refsect3>
1035 <refsect3>
1036 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1038 <para>Publish specified printer using ADS.</para>
1040 </refsect3>
1042 <refsect3>
1043 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1045 <para>Remove specified printer from ADS directory.</para>
1047 </refsect3>
1049 </refsect2>
1051 <refsect2>
1052 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1054 <para>Perform a raw LDAP search on a ADS server and dump the results. The 
1055 expression is a standard LDAP search expression, and the 
1056 attributes are a list of LDAP fields to show in the results.</para>
1058 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1059 </para>
1061 </refsect2>
1063 <refsect2>
1064 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1066 <para>
1067 Perform a raw LDAP search on a ADS server and dump the results. The 
1068 DN standard LDAP DN, and the attributes are a list of LDAP fields 
1069 to show in the result. 
1070 </para>
1072 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1074 </refsect2>
1076 <refsect2>
1077 <title>ADS WORKGROUP</title>
1079 <para>Print out workgroup name for specified kerberos realm.</para>
1081 </refsect2>
1083 <refsect2>
1084 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
1086 <para>
1087 (Re)Create a BUILTIN group.
1088 Only a wellknown set of BUILTIN groups can be created with this command.
1089 This is the list of currently recognized group names: Administrators,
1090 Users, Guests, Power Users, Account Operators, Server Operators, Print
1091 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1092 compatible Access.
1094 This command requires a running Winbindd with idmap allocation properly
1095 configured. The group gid will be allocated out of the winbindd range.
1096 </para>
1098 </refsect2>
1100 <refsect2>
1101 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
1103 <para>
1104 Create a LOCAL group (also known as Alias).
1106 This command requires a running Winbindd with idmap allocation properly
1107 configured. The group gid will be allocated out of the winbindd range.
1108 </para>
1110 </refsect2>
1112 <refsect2>
1113 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
1115 <para>
1116 Delete an existing LOCAL group (also known as Alias).
1118 </para>
1120 </refsect2>
1122 <refsect2>
1123 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
1125 <para>
1126 Map an existing Unix group and make it a Domain Group, the domain group
1127 will have the same name.
1128 </para>
1130 </refsect2>
1132 <refsect2>
1133 <title>SAM UNMAPUNIXGROUP &lt;NAME&gt;</title>
1135 <para>
1136 Remove an existing group mapping entry.
1137 </para>
1139 </refsect2>
1141 <refsect2>
1142 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1144 <para>
1145 Add a member to a Local group. The group can be specified only by name,
1146 the member can be specified by name or SID.
1147 </para>
1149 </refsect2>
1151 <refsect2>
1152 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1154 <para>
1155 Remove a member from a Local group. The group and the member must be
1156 specified by name.
1157 </para>
1159 </refsect2>
1161 <refsect2>
1162 <title>SAM LISTMEM &lt;GROUP&gt;</title>
1164 <para>
1165 List Local group members. The group must be specified by name.
1166 </para>
1168 </refsect2>
1170 <refsect2>
1171 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
1173 <para>
1174 List the specified set of accounts by name. If verbose is specified,
1175 the rid and description is also provided for each account.
1176 </para>
1178 </refsect2>
1180 <refsect2>
1181 <title>SAM RIGHTS LIST</title>
1183 <para>
1184 List all available privileges.
1185 </para>
1187 </refsect2>
1189 <refsect2>
1190 <title>SAM RIGHTS GRANT &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1192 <para>
1193 Grant one or more privileges to a user.
1194 </para>
1196 </refsect2>
1198 <refsect2>
1199 <title>SAM RIGHTS REVOKE &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1201 <para>
1202 Revoke one or more privileges from a user.
1203 </para>
1205 </refsect2>
1207 <refsect2>
1208 <title>SAM SHOW &lt;NAME&gt;</title>
1210 <para>
1211 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1212 account.
1213 </para>
1215 </refsect2>
1217 <refsect2>
1218 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1220 <para>
1221 Set the home directory for a user account.
1222 </para>
1224 </refsect2>
1226 <refsect2>
1227 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1229 <para>
1230 Set the profile path for a user account.
1231 </para>
1233 </refsect2>
1235 <refsect2>
1236 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1238 <para>
1239 Set the comment for a user or group account.
1240 </para>
1242 </refsect2>
1244 <refsect2>
1245 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1247 <para>
1248 Set the full name for a user account.
1249 </para>
1251 </refsect2>
1253 <refsect2>
1254 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1256 <para>
1257 Set the logon script for a user account.
1258 </para>
1260 </refsect2>
1262 <refsect2>
1263 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1265 <para>
1266 Set the home drive for a user account.
1267 </para>
1269 </refsect2>
1271 <refsect2>
1272 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1274 <para>
1275 Set the workstations a user account is allowed to log in from.
1276 </para>
1278 </refsect2>
1280 <refsect2>
1281 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1283 <para>
1284 Set the "disabled" flag for a user account.
1285 </para>
1287 </refsect2>
1289 <refsect2>
1290 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1292 <para>
1293 Set the "password not required" flag for a user account.
1294 </para>
1296 </refsect2>
1298 <refsect2>
1299 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1301 <para>
1302 Set the "autolock" flag for a user account.
1303 </para>
1305 </refsect2>
1307 <refsect2>
1308 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1310 <para>
1311 Set the "password do not expire" flag for a user account.
1312 </para>
1314 </refsect2>
1316 <refsect2>
1317 <title>SAM SET PWDMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1319 <para>
1320 Set or unset the "password must change" flag for a user account.
1321 </para>
1323 </refsect2>
1325 <refsect2>
1326 <title>SAM POLICY LIST</title>
1328 <para>
1329 List the available account policies.
1330 </para>
1332 </refsect2>
1334 <refsect2>
1335 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1337 <para>
1338 Show the account policy value.
1339 </para>
1341 </refsect2>
1343 <refsect2>
1344 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1346 <para>
1347 Set a value for the account policy.
1348 Valid values can be: "forever", "never", "off", or a number.
1349 </para>
1351 </refsect2>
1353 <refsect2>
1354 <title>SAM PROVISION</title>
1356 <para>
1357 Only available if ldapsam:editposix is set and winbindd is running.
1358 Properly populates the ldap tree with the basic accounts (Administrator)
1359 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1360 </para>
1362 </refsect2>
1364 <refsect2>
1365 <title>IDMAP DUMP &lt;local tdb file name&gt;</title>
1367 <para>
1368 Dumps the mappings contained in the local tdb file specified.
1369 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1370 </para>
1372 </refsect2>
1374 <refsect2>
1375 <title>IDMAP RESTORE [input file]</title>
1377 <para>
1378 Restore the mappings from the specified file or stdin.
1379 </para>
1381 </refsect2>
1383 <refsect2>
1384 <title>IDMAP SECRET &lt;DOMAIN&gt; &lt;secret&gt;</title>
1386 <para>
1387 Store a secret for the specified domain, used primarily for domains
1388 that use idmap_ldap as a backend. In this case the secret is used
1389 as the password for the user DN used to bind to the ldap server.
1390 </para>
1392 </refsect2>
1394 <refsect2>
1396 <title>IDMAP DELETE [-f] [--db=&lt;DB&gt;] &lt;ID&gt;</title>
1398 <para>
1399 Delete a mapping sid &lt;-&gt; gid or sid &lt;-&gt; uid from the IDMAP database.
1400 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".
1401 Use -f to delete an invalid partial mapping &lt;ID&gt; -&gt; xx
1402 </para>
1403 <para>
1404   Use "smbcontrol all idmap ..." to notify running smbd instances.
1405   See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
1406   <manvolnum>1</manvolnum></citerefentry> manpage for details.
1407 </para>
1408 </refsect2>
1410 <refsect2>
1412 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=&lt;DB&gt;]</title>
1414 <para>
1415   Check and repair the IDMAP database. If no option is given a read only check
1416   of the database is done. Among others an interactive or automatic repair mode
1417   may be chosen with one of the following options:
1419   <variablelist>
1420     <varlistentry><term>-r|--repair</term>
1421     <listitem><para>
1422       Interactive repair mode, ask a lot of questions.
1423     </para></listitem>
1424     </varlistentry>
1426     <varlistentry><term>-a|--auto</term>
1427     <listitem><para>
1428       Noninteractive repair mode, use default answers.
1429     </para></listitem>
1430     </varlistentry>
1432     <varlistentry><term>-v|--verbose</term>
1433       <listitem><para>
1434         Produce more output.
1435       </para></listitem>
1436     </varlistentry>
1438     <varlistentry><term>-f|--force</term>
1439       <listitem><para>
1440         Try to apply changes, even if they do not apply cleanly.
1441       </para></listitem>
1442     </varlistentry>
1444     <varlistentry><term>-T|--test</term>
1445       <listitem><para>
1446         Dry run, show what changes would be made but don't touch anything.
1447       </para></listitem>
1448     </varlistentry>
1450     <varlistentry><term>-l|--lock</term>
1451       <listitem><para>
1452         Lock the database while doing the check.
1453       </para></listitem>
1454     </varlistentry>
1456     <varlistentry><term>--db &lt;DB&gt;</term>
1457       <listitem><para>
1458         Check the specified database.
1459       </para></listitem>
1460     </varlistentry>
1461     <varlistentry><term></term>
1462       <listitem><para>
1463       </para></listitem>
1464     </varlistentry>
1465   </variablelist>
1467   It reports about the finding of the following errors:
1469   <variablelist>
1470     <varlistentry><term>Missing reverse mapping:</term>
1471     <listitem><para>
1472       A record with mapping A-&gt;B where there is no B-&gt;A. Default action
1473       in repair mode is to "fix" this by adding the reverse mapping.
1474     </para></listitem>
1475     </varlistentry>
1477     <varlistentry><term>Invalid mapping:</term>
1478     <listitem><para>
1479       A record with mapping A-&gt;B where B-&gt;C. Default action
1480       is to "delete" this record.
1481     </para></listitem>
1482   </varlistentry>
1484   <varlistentry><term>Missing or invalid HWM:</term>
1485     <listitem><para>
1486       A high water mark is not at least equal to the largest ID in the
1487       database. Default action is to "fix" this by setting it to the
1488       largest ID found +1.
1489     </para></listitem>
1490   </varlistentry>
1492   <varlistentry><term>Invalid record:</term>
1493     <listitem><para>
1494       Something we failed to parse. Default action is to "edit" it
1495       in interactive and "delete" it in automatic mode.
1496     </para></listitem>
1497   </varlistentry>
1498 </variablelist>
1499 </para>
1500 </refsect2>
1503 <refsect2>
1504 <title>USERSHARE</title>
1506 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1507 non-root users to add user defined shares to be exported using the "net usershare"
1508 commands.
1509 </para>
1511 <para>
1512 To set this up, first set up your smb.conf by adding to the [global] section:
1514 usershare path = /usr/local/samba/lib/usershares
1516 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1517 set the group owner to the UNIX group who should have the ability to create usershares,
1518 for example a group called "serverops".
1520 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1522 (Owner and group all access, no access for others, plus the sticky bit,
1523 which means that a file in that directory can be renamed or deleted only
1524 by the owner of the file).
1526 Finally, tell smbd how many usershares you will allow by adding to the [global]
1527 section of smb.conf a line such as :
1529 usershare max shares = 100.
1531 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1532 can create user defined shares on demand using the commands below.
1533 </para>
1535 <para>The usershare commands are:
1537 <simplelist>
1538 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
1539 <member>net usershare delete sharename - to delete a user defined share.</member>
1540 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1541 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1542 </simplelist>
1544 </para>
1546 <refsect3>
1547 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1549 <para>
1550 Add or replace a new user defined share, with name "sharename".
1551 </para>
1553 <para>
1554 "path" specifies the absolute pathname on the system to be exported.
1555 Restrictions may be put on this, see the global smb.conf parameters:
1556 "usershare owner only", "usershare prefix allow list", and
1557 "usershare prefix deny list".
1558 </para>
1560 <para>
1561 The optional "comment" parameter is the comment that will appear
1562 on the share when browsed to by a client.
1563 </para>
1565 <para>The optional "acl" field
1566 specifies which users have read and write access to the entire share.
1567 Note that guest connections are not allowed unless the smb.conf parameter
1568 "usershare allow guests" has been set. The definition of a user
1569 defined share acl is: "user:permission", where user is a valid
1570 username on the system and permission can be "F", "R", or "D".
1571 "F" stands for "full permissions", ie. read and write permissions.
1572 "D" stands for "deny" for a user, ie. prevent this user from accessing
1573 this share.
1574 "R" stands for "read only", ie. only allow read access to this
1575 share (no creation of new files or directories or writing to files).
1576 </para>
1578 <para>
1579 The default if no "acl" is given is "Everyone:R", which means any 
1580 authenticated user has read-only access.
1581 </para>
1583 <para>
1584 The optional "guest_ok" has the same effect as the parameter of the
1585 same name in smb.conf, in that it allows guest access to this user
1586 defined share. This parameter is only allowed if the global parameter
1587 "usershare allow guests" has been set to true in the smb.conf.
1588 </para>
1590 There is no separate command to modify an existing user defined share,
1591 just use the "net usershare add [sharename]" command using the same
1592 sharename as the one you wish to modify and specify the new options
1593 you wish. The Samba smbd daemon notices user defined share modifications
1594 at connect time so will see the change immediately, there is no need
1595 to restart smbd on adding, deleting or changing a user defined share.
1596 </refsect3>
1598 <refsect3>
1599 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1601 <para>
1602 Deletes the user defined share by name. The Samba smbd daemon
1603 immediately notices this change, although it will not disconnect
1604 any users currently connected to the deleted share.
1605 </para>
1607 </refsect3>
1609 <refsect3>
1610 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1612 <para>
1613 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1614 </para>
1616 <para>
1617 net usershare info on its own dumps out info on the user defined shares that were
1618 created by the current user, or restricts them to share names that match the given
1619 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1620 If the '-l' or '--long' option is also given, it prints out info on user defined
1621 shares created by other users.
1622 </para>
1624 <para>
1625 The information given about a share looks like:
1627 [foobar]
1628 path=/home/jeremy
1629 comment=testme
1630 usershare_acl=Everyone:F
1631 guest_ok=n
1633 And is a list of the current settings of the user defined share that can be
1634 modified by the "net usershare add" command.
1635 </para>
1637 </refsect3>
1639 <refsect3>
1640 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1642 <para>
1643 List all the user defined shares owned by the current user matching the given pattern, or all users.
1644 </para>
1646 <para>
1647 net usershare list on its own list out the names of the user defined shares that were
1648 created by the current user, or restricts the list to share names that match the given
1649 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1650 If the '-l' or '--long' option is also given, it includes the names of user defined
1651 shares created by other users.
1652 </para>
1654 </refsect3>
1656 </refsect2>
1658 <refsect2>
1659 <title>[RPC] CONF</title>
1661 <para>Starting with version 3.2.0, a Samba server can be configured by data
1662 stored in registry. This configuration data can be edited with the new "net
1663 conf" commands. There is also the possiblity to configure a remote Samba server
1664 by enabling the RPC conf mode and specifying the the address of the remote server.
1665 </para>
1667 <para>
1668 The deployment of this configuration data can be activated in two levels from the
1669 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
1670 activated by setting <parameter>registry shares</parameter> to
1671 <quote>yes</quote> in the [global] section and global configuration options are
1672 activated by setting <smbconfoption name="include">registry</smbconfoption> in
1673 the [global] section for a mixed configuration or by setting
1674 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
1675 section for a registry-only configuration.
1676 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
1677 <manvolnum>5</manvolnum></citerefentry> manpage for details.
1678 </para>
1680 <para>The conf commands are:
1681 <simplelist>
1682 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
1683 format.</member>
1684 <member>net [rpc] conf import - Import configuration from file in smb.conf
1685 format.</member>
1686 <member>net [rpc] conf listshares - List the registry shares.</member>
1687 <member>net [rpc] conf drop - Delete the complete configuration from
1688 registry.</member>
1689 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
1690 <member>net [rpc] conf addshare - Create a new registry share.</member>
1691 <member>net [rpc] conf delshare - Delete a registry share.</member>
1692 <member>net [rpc] conf setparm - Store a parameter.</member>
1693 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
1694 <member>net [rpc] conf delparm - Delete a parameter.</member>
1695 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
1696 <member>net [rpc] conf setincludes - Set includes for a share.</member>
1697 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
1698 </simplelist>
1699 </para>
1701 <refsect3>
1702 <title>[RPC] CONF LIST</title>
1704 <para>
1705 Print the configuration data stored in the registry in a smb.conf-like format to
1706 standard output.
1707 </para>
1708 </refsect3>
1710 <refsect3>
1711 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
1713 <para>
1714 This command imports configuration from a file in smb.conf format.
1715 If a section encountered in the input file is present in registry,
1716 its contents is replaced. Sections of registry configuration that have
1717 no counterpart in the input file are not affected. If you want to delete these,
1718 you will have to use the "net conf drop" or "net conf delshare" commands.
1719 Optionally, a section may be specified to restrict the effect of the
1720 import command to that specific section. A test mode is enabled by specifying
1721 the parameter "-T" on the commandline. In test mode, no changes are made to the
1722 registry, and the resulting configuration is printed to standard output instead.
1723 </para>
1724 </refsect3>
1726 <refsect3>
1727 <title>[RPC] CONF LISTSHARES</title>
1729 <para>
1730 List the names of the shares defined in registry.
1731 </para>
1732 </refsect3>
1734 <refsect3>
1735 <title>[RPC] CONF DROP</title>
1737 <para>
1738 Delete the complete configuration data from registry.
1739 </para>
1740 </refsect3>
1742 <refsect3>
1743 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
1745 <para>
1746 Show the definition of the share or section specified. It is valid to specify
1747 "global" as sharename to retrieve the global configuration options from
1748 registry.
1749 </para>
1750 </refsect3>
1752 <refsect3>
1753 <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>
1755 <para>Create a new share definition in registry.
1756 The sharename and path have to be given. The share name may
1757 <emphasis>not</emphasis> be "global". Optionally, values for the very
1758 common options "writeable", "guest ok" and a "comment" may be specified.
1759 The same result may be obtained by a sequence of "net conf setparm"
1760 commands.
1761 </para>
1762 </refsect3>
1764 <refsect3>
1765 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
1767 <para>
1768 Delete a share definition from registry.
1769 </para>
1770 </refsect3>
1772 <refsect3>
1773 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
1775 <para>
1776 Store a parameter in registry. The section may be global or a sharename.
1777 The section is created if it does not exist yet.
1778 </para>
1779 </refsect3>
1781 <refsect3>
1782 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1784 <para>
1785 Show a parameter stored in registry.
1786 </para>
1787 </refsect3>
1789 <refsect3>
1790 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1792 <para>
1793 Delete a parameter stored in registry.
1794 </para>
1795 </refsect3>
1797 <refsect3>
1798 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
1800 <para>
1801 Get the list of includes for the provided section (global or share).
1802 </para>
1804 <para>
1805 Note that due to the nature of the registry database and the nature of include directives,
1806 the includes need special treatment: Parameters are stored in registry by the parameter
1807 name as valuename, so there is only ever one instance of a parameter per share.
1808 Also, a specific order like in a text file is not guaranteed. For all real
1809 parameters, this is perfectly ok, but the include directive is rather a meta
1810 parameter, for which, in the smb.conf text file, the place where it is specified
1811 between the other parameters is very important. This can not be achieved by the
1812 simple registry smbconf data model, so there is one ordered list of includes
1813 per share, and this list is evaluated after all the parameters of the share.
1814 </para>
1816 <para>
1817 Further note that currently, only files can be included from registry
1818 configuration. In the future, there will be the ability to include configuration
1819 data from other registry keys.
1820 </para>
1821 </refsect3>
1823 <refsect3>
1824 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
1826 <para>
1827 Set the list of includes for the provided section (global or share) to the given
1828 list of one or more filenames. The filenames may contain the usual smb.conf
1829 macros like %I.
1830 </para>
1831 </refsect3>
1833 <refsect3>
1834 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
1836 <para>
1837 Delete the list of includes from the provided section (global or share).
1838 </para>
1839 </refsect3>
1841 </refsect2>
1843 <refsect2>
1844 <title>REGISTRY</title>
1845 <para>
1846 Manipulate Samba's registry.
1847 </para>
1849 <para>The registry commands are:
1850 <simplelist>
1851 <member>net registry enumerate   - Enumerate registry keys and values.</member>
1852 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
1853 <member>net registry createkey   - Create a new registry key.</member>
1854 <member>net registry deletekey   - Delete a registry key.</member>
1855 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
1856 <member>net registry getvalue    - Print a registry value.</member>
1857 <member>net registry getvalueraw - Print a registry value (raw format).</member>
1858 <member>net registry setvalue    - Set a new registry value.</member>
1859 <member>net registry increment   - Increment a DWORD registry value under a lock.
1860 </member>
1861 <member>net registry deletevalue - Delete a registry value.</member>
1862 <member>net registry getsd       - Get security descriptor.</member>
1863 <member>net registry getsd_sdd1  - Get security descriptor in sddl format.
1864 </member>
1865 <member>net registry setsd_sdd1  - Set security descriptor from sddl format
1866 string.</member>
1867 <member>net registry import      - Import a registration entries (.reg) file.
1868 </member>
1869 <member>net registry export      - Export a registration entries (.reg) file.
1870 </member>
1871 <member>net registry convert     - Convert a registration entries (.reg) file.
1872 </member>
1873 </simplelist>
1874 </para>
1876 <refsect3>
1877   <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
1878   <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
1879   </para>
1880 </refsect3>
1882 <refsect3>
1883   <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
1884   <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
1885   </para>
1886 </refsect3>
1888 <refsect3>
1889   <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
1890   <para>Create a new <emphasis>key</emphasis> if not yet existing.
1891   </para>
1892 </refsect3>
1894 <refsect3>
1895   <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
1896   <para>Delete the given <emphasis>key</emphasis> and its
1897   values from the registry, if it has no subkeys.
1898   </para>
1899 </refsect3>
1901 <refsect3>
1902   <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
1903   <para>Delete the given <emphasis>key</emphasis> and all of its
1904   subkeys and values from the registry.
1905   </para>
1906 </refsect3>
1908 <refsect3>
1909   <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
1910   --><replaceable>name</replaceable></title>
1912   <para>Output type and actual value of the value <emphasis>name</emphasis>
1913   of the given <emphasis>key</emphasis>.
1914   </para>
1915 </refsect3>
1917 <refsect3>
1918   <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
1919   --><replaceable>name</replaceable></title>
1920   <para>Output the actual value of the value <emphasis>name</emphasis>
1921   of the given <emphasis>key</emphasis>.
1922   </para>
1923 </refsect3>
1925 <refsect3>
1926   <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
1927   --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
1928   --><replaceable>value</replaceable> ...<!--
1929   --></title>
1931   <para>Set the value <emphasis>name</emphasis>
1932   of an existing <emphasis>key</emphasis>.
1933   <emphasis>type</emphasis> may be one of
1934   <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
1935   <emphasis>dword</emphasis>.
1936   In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
1937   be given multiple times.
1938   </para>
1939 </refsect3>
1941 <refsect3>
1942   <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
1943   --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
1944   --></title>
1946   <para>Increment the DWORD value <emphasis>name</emphasis>
1947   of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
1948   while holding a g_lock.
1949   <emphasis>inc</emphasis> defaults to 1.
1950   </para>
1951 </refsect3>
1953 <refsect3>
1954   <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
1955   --><replaceable>name</replaceable></title>
1957   <para>Delete the value <emphasis>name</emphasis>
1958   of the given <emphasis>key</emphasis>.
1959   </para>
1960 </refsect3>
1962 <refsect3>
1963   <title>REGISTRY GETSD <replaceable>key</replaceable></title>
1965   <para>Get the security descriptor of the given <emphasis>key</emphasis>.
1966   </para>
1967 </refsect3>
1969 <refsect3>
1970   <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
1972   <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
1973   Security Descriptor Definition Language (SDDL) string.
1974   </para>
1975 </refsect3>
1977 <refsect3>
1978   <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
1979   --><replaceable>sd</replaceable></title>
1981   <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
1982   Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
1983   </para>
1984 </refsect3>
1986 <refsect3>
1987   <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
1988   --><replaceable>[opt]</replaceable></title>
1990   <para>Import a registration entries (.reg) <emphasis>file</emphasis>.
1991   </para>
1992 </refsect3>
1994 <refsect3>
1995   <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
1996   --><replaceable>file</replaceable><!--
1997   --><replaceable>[opt]</replaceable></title>
1999   <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2000   <emphasis>file</emphasis>.
2001   </para>
2002 </refsect3>
2004 <refsect3>
2005   <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2006   --><replaceable>out</replaceable> <!--
2007   --><replaceable>[[inopt] outopt]</replaceable></title>
2009   <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2010   </para>
2011 </refsect3>
2014 </refsect2>
2016 <refsect2>
2017 <title>EVENTLOG</title>
2019 <para>Starting with version 3.4.0 net can read, dump, import and export native
2020 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2021 </para>
2023 <para>
2024 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2025 <emphasis>smb.conf</emphasis> file.
2026 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2027 </para>
2029 <para>The eventlog commands are:
2030 <simplelist>
2031 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2032 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2033 tdb based representation of eventlogs.</member>
2034 <member>net eventlog export - Export the samba internal tdb based representation
2035 of eventlogs into an eventlog *.evt file.</member>
2036 </simplelist>
2037 </para>
2039 <refsect3>
2040 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2042 <para>
2043 Prints a eventlog *.evt file to standard output.
2044 </para>
2045 </refsect3>
2047 <refsect3>
2048 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2050 <para>
2051 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2052 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2053 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2054 defined in smb.conf.
2055 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2056 </para>
2058 </refsect3>
2060 <refsect3>
2061 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2063 <para>
2064 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2065 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2066 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2067 defined in smb.conf.
2068 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2069 </para>
2071 </refsect3>
2073 </refsect2>
2075 <refsect2>
2076 <title>DOM</title>
2078 <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.
2079 </para>
2080 <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.
2081 </para>
2083 <para>The client side support for remote join is implemented in the net dom commands which are:
2084 <simplelist>
2085 <member>net dom join - Join a remote computer into a domain.</member>
2086 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2087 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2088 </simplelist>
2089 </para>
2091 <refsect3>
2092 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2094 <para>
2095 Joins a computer into a domain. This command supports the following additional parameters:
2096 </para>
2098 <itemizedlist>
2100 <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>
2102 <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 containter. This optional parameter is only supported when joining Active Directory Domains.</para></listitem>
2104 <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>
2106 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2108 <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>
2110 </itemizedlist>
2112 <para>
2113 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.
2114 </para>
2115 <para>
2116         Example:
2117         net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2118 </para>
2119 <para>
2120 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.
2121 </para>
2123 </refsect3>
2125 <refsect3>
2126 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2128 <para>
2129 Unjoins a computer from a domain. This command supports the following additional parameters:
2130 </para>
2132 <itemizedlist>
2134 <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>
2136 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2138 <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>
2140 </itemizedlist>
2142 <para>
2143 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.
2144 </para>
2145 <para>
2146         Example:
2147         net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2148 </para>
2149 <para>
2150 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.
2151 </para>
2153 </refsect3>
2155 <refsect3>
2156 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2158 <para>
2159 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2160 </para>
2162 <itemizedlist>
2164 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2166 <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>
2168 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2170 <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>
2172 </itemizedlist>
2174 <para>
2175 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.
2176 </para>
2177 <para>
2178         Example:
2179         net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2180 </para>
2181 <para>
2182 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.
2183 </para>
2185 </refsect3>
2187 </refsect2>
2189 <refsect2>
2190 <title>G_LOCK</title>
2192 <para>Manage global locks.</para>
2194 <refsect3>
2195 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2197 <para>
2198 Execute a shell command under a global lock. This might be useful to define the
2199 order in which several shell commands will be executed. The locking information
2200 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2201 running, the locking information will be available on all cluster nodes.
2202 </para>
2204 <itemizedlist>
2205 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2206 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2207 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2208 </itemizedlist>
2209 </refsect3>
2211 <refsect3>
2212 <title>G_LOCK LOCKS</title>
2214 <para>
2215 Print a list of all currently existing locknames.
2216 </para>
2217 </refsect3>
2219 <refsect3>
2220 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2222 <para>
2223 Dump the locking table of a certain global lock.
2224 </para>
2225 </refsect3>
2227 </refsect2>
2229 <refsect2>
2230 <title>HELP [COMMAND]</title>
2232 <para>Gives usage information for the specified command.</para>
2234 </refsect2>
2236 </refsect1>
2238 <refsect1>
2239         <title>VERSION</title>
2241         <para>This man page is complete for version 3 of the Samba 
2242         suite.</para>
2243 </refsect1>
2245 <refsect1>
2246         <title>AUTHOR</title>
2247         
2248         <para>The original Samba software and related utilities 
2249         were created by Andrew Tridgell. Samba is now developed
2250         by the Samba Team as an Open Source project similar 
2251         to the way the Linux kernel is developed.</para>
2253         <para>The net manpage was written by Jelmer Vernooij.</para>
2254         
2255 </refsect1>
2257 </refentry>