docs: Rename manpages-3 -> manpages.
[bbaumbach/samba-autobuild/.git] / docs-xml / manpages / net.8.xml
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">
4
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>
12
13
14 <refnamediv>
15         <refname>net</refname>
16         <refpurpose>Tool for administration of Samba and remote
17         CIFS servers.
18         </refpurpose>
19 </refnamediv>
20
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>
41
42 <refsect1>
43         <title>DESCRIPTION</title>
44
45         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
46         <manvolnum>7</manvolnum></citerefentry> suite.</para>
47
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>
56
57 </refsect1>
58
59 <refsect1>
60         <title>OPTIONS</title>
61
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>
73
74                 <varlistentry>
75                 <term>-W workgroup</term>
76                 <listitem><para>
77                 Sets client workgroup or domain
78                 </para></listitem>
79                 </varlistentry>
80
81                 <varlistentry>
82                 <term>-U user</term>
83                 <listitem><para>
84                 User name to use
85                 </para></listitem>
86                 </varlistentry>
87
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>
96
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>
104
105                 &stdarg.netbios.name;
106                 &stdarg.configfile;
107
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>
115
116                 <varlistentry>
117                 <term>-l</term>
118                 <listitem><para>
119                 When listing data, give more information on each item.
120                 </para></listitem>
121                 </varlistentry>
122
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>
129
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>
137
138                 &stdarg.server.debug;
139         </variablelist>
140 </refsect1>
141
142 <refsect1>
143 <title>COMMANDS</title>
144
145 <refsect2>
146 <title>CHANGESECRETPW</title>
147
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>
156
157 </refsect2>
158
159 <refsect2>
160         <title>TIME</title>
161
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>
164
165 <refsect3>
166 <title>TIME</title>
167
168 <para>Without any options, the <command>NET TIME</command> command 
169 displays the time on the remote server.
170 </para>
171
172 </refsect3>
173
174 <refsect3>
175 <title>TIME SYSTEM</title>
176
177 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.</para>
178
179 </refsect3>
180
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>
185
186 </refsect3>
187
188 <refsect3>
189 <title>TIME ZONE</title>
190
191 <para>Displays the timezone in hours from GMT on the remote computer.</para>
192
193 </refsect3>
194 </refsect2>
195
196 <refsect2>
197 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN] [createcomputer=OU] [options]</title>
198
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>
205
206 <para>
207 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
208 joining the domain.
209 </para>
210
211 <para>
212 [UPN] (ADS only) set the principalname attribute during the join.  The default
213 format is host/netbiosname@REALM.
214 </para>
215
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>
224
225 <refsect2>
226 <title>[RPC] OLDJOIN [options]</title>
227
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>
232
233 <refsect2>
234 <title>[RPC|ADS] USER</title>
235
236 <refsect3>
237 <title>[RPC|ADS] USER</title>
238
239 <para>List all users</para>
240
241 </refsect3>
242
243 <refsect3>
244 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
245
246 <para>Delete specified user</para>
247
248 </refsect3>
249
250 <refsect3>
251 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
252
253 <para>List the domain groups of the specified user.</para>
254
255 </refsect3>
256
257 <refsect3>
258 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
259
260 <para>Rename specified user.</para>
261
262 </refsect3>
263
264 <refsect3>
265 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
266
267 <para>Add specified user.</para>
268 </refsect3>
269 </refsect2>
270
271 <refsect2>
272 <title>[RPC|ADS] GROUP</title>
273
274 <refsect3>
275 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
276 <para>List user groups.</para>
277 </refsect3>
278
279 <refsect3>
280 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
281
282 <para>Delete specified group.</para>
283
284 </refsect3>
285
286 <refsect3>
287 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
288
289 <para>Create specified group.</para>
290
291 </refsect3>
292 </refsect2>
293
294 <refsect2>
295 <title>[RAP|RPC] SHARE</title>
296
297 <refsect3>
298 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
299
300 <para>Enumerates all exported resources (network shares) on target server.</para>
301
302 </refsect3>
303
304 <refsect3>
305 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
306
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>
310
311 </refsect3>
312
313 <refsect3>
314 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
315
316 <para>Delete specified share.</para>
317 </refsect3>
318 </refsect2>
319
320 <refsect2>
321 <title>[RPC|RAP] FILE</title>
322
323 <refsect3>
324 <title>[RPC|RAP] FILE</title>
325
326 <para>List all open files on remote server.</para>
327
328 </refsect3>
329
330 <refsect3>
331 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
332
333 <para>Close file with specified <replaceable>fileid</replaceable> on 
334 remote server.</para>
335
336 </refsect3>
337
338 <refsect3>
339 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
340
341 <para>
342 Print information on specified <replaceable>fileid</replaceable>. 
343 Currently listed are: file-id, username, locks, path, permissions.
344 </para>
345
346 </refsect3>
347
348 <refsect3>
349 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
350
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>
356
357 </refsect3>
358
359 </refsect2>
360
361 <refsect2>
362 <title>SESSION</title>
363
364 <refsect3>
365 <title>RAP SESSION</title>
366
367 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
368 sessions on the target server.</para>
369
370 </refsect3>
371
372 <refsect3>
373 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
374
375 <para>Close the specified sessions.</para>
376
377 </refsect3>
378
379 <refsect3>
380 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
381
382 <para>Give a list with all the open files in specified session.</para>
383
384 </refsect3>
385
386 </refsect2>
387
388 <refsect2>
389 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
390
391 <para>List all servers in specified domain or workgroup. Defaults
392 to local domain.</para>
393
394 </refsect2>
395
396 <refsect2>
397 <title>RAP DOMAIN</title>
398
399 <para>Lists all domains and workgroups visible on the 
400 current network.</para>
401
402 </refsect2>
403
404 <refsect2>
405 <title>RAP PRINTQ</title>
406
407 <refsect3>
408 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
409
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>
413
414 </refsect3>
415
416 <refsect3>
417 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
418
419 <para>Delete job with specified id.</para>
420
421 </refsect3>
422
423 </refsect2>
424
425 <refsect2>
426 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
427
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>
433
434 &not.implemented;
435
436 </refsect2>
437
438 <refsect2>
439 <title>RAP GROUPMEMBER</title>
440
441 <refsect3>
442 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
443
444 <para>List all members of the specified group.</para>
445
446 </refsect3>
447
448 <refsect3>
449 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
450
451 <para>Delete member from group.</para>
452
453 </refsect3>
454
455 <refsect3>
456 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
457
458 <para>Add member to group.</para>
459
460 </refsect3>
461
462 </refsect2>
463
464 <refsect2>
465 <title>RAP ADMIN <replaceable>command</replaceable></title>
466
467 <para>Execute the specified <replaceable>command</replaceable> on 
468 the remote server. Only works with OS/2 servers.
469 </para>
470
471 &not.implemented;
472
473 </refsect2>
474
475 <refsect2>
476 <title>RAP SERVICE</title>
477
478 <refsect3>
479 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
480
481 <para>Start the specified service on the remote server. Not implemented yet.</para>
482
483 &not.implemented;
484
485 </refsect3>
486
487 <refsect3>
488 <title>RAP SERVICE STOP</title>
489
490 <para>Stop the specified service on the remote server.</para>
491
492 &not.implemented;
493
494 </refsect3>
495
496 </refsect2>
497
498 <refsect2>
499 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
500
501 <para>
502 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
503 </para>
504
505 </refsect2>
506
507 <refsect2>
508 <title>LOOKUP</title>
509
510 <refsect3>
511 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
512
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>
517
518 </refsect3>
519
520 <refsect3>
521 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
522
523 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
524
525 </refsect3>
526
527 <refsect3>
528 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
529
530 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
531 Defaults to local realm.</para>
532
533 </refsect3>
534
535 <refsect3>
536 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
537
538 <para>Give IP's of Domain Controllers for specified <replaceable>
539 DOMAIN</replaceable>. Defaults to local domain.</para>
540
541 </refsect3>
542
543 <refsect3>
544 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
545
546 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
547 or workgroup. Defaults to local domain.</para>
548
549 </refsect3>
550
551 </refsect2>
552
553 <refsect2>
554 <title>CACHE</title>
555
556 <para>Samba uses a general caching interface called 'gencache'. It 
557 can be controlled using 'NET CACHE'.</para>
558
559 <para>All the timeout parameters support the suffixes:
560
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>
568
569 </para>
570
571 <refsect3>
572 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
573
574 <para>Add specified key+data to the cache with the given timeout.</para>
575
576 </refsect3>
577
578 <refsect3>
579 <title>CACHE DEL <replaceable>key</replaceable></title>
580
581 <para>Delete key from the cache.</para>
582
583 </refsect3>
584
585 <refsect3>
586 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
587
588 <para>Update data of existing cache entry.</para>
589
590 </refsect3>
591
592 <refsect3>
593 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
594
595 <para>Search for the specified pattern in the cache data.</para>
596
597 </refsect3>
598
599 <refsect3>
600 <title>CACHE LIST</title>
601
602 <para>
603 List all current items in the cache.
604 </para>
605
606 </refsect3>
607
608 <refsect3>
609 <title>CACHE FLUSH</title>
610
611 <para>Remove all the current items from the cache.</para>
612
613 </refsect3>
614
615 </refsect2>
616
617 <refsect2>
618 <title>GETLOCALSID [DOMAIN]</title>
619
620 <para>Prints the SID of the specified domain, or if the parameter is
621 omitted, the SID of the local server.</para>
622
623 </refsect2>
624
625 <refsect2>
626 <title>SETLOCALSID S-1-5-21-x-y-z</title>
627
628 <para>Sets SID for the local server to the specified SID.</para>
629
630 </refsect2>
631
632 <refsect2>
633 <title>GETDOMAINSID</title>
634
635 <para>Prints the local machine SID and the SID of the current 
636 domain.</para>
637
638 </refsect2>
639
640 <refsect2>
641 <title>SETDOMAINSID</title>
642
643 <para>Sets the SID of the current domain.</para>
644
645 </refsect2>
646
647 <refsect2>
648 <title>GROUPMAP</title>
649
650 <para>Manage the mappings between Windows group SIDs and UNIX groups.
651 Common options include:</para>
652
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>
663
664 <refsect3>
665 <title>GROUPMAP ADD</title>
666
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>
674
675 </refsect3>
676
677 <refsect3>
678 <title>GROUPMAP DELETE</title>
679
680 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
681
682 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
683
684 </refsect3>
685
686 <refsect3>
687 <title>GROUPMAP MODIFY</title>
688
689 <para>Update an existing group entry.</para>
690
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>
698
699 <refsect3>
700 <title>GROUPMAP LIST</title>
701
702 <para>List existing group mapping entries.</para>
703
704 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
705
706 </refsect3>
707 </refsect2>
708
709
710
711 <refsect2>
712 <title>MAXRID</title>
713
714 <para>Prints out the highest RID currently in use on the local
715 server (by the active 'passdb backend').
716 </para>
717
718 </refsect2>
719
720 <refsect2>
721 <title>RPC INFO</title>
722
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>
726
727 </refsect2>
728
729 <refsect2>
730 <title>[RPC|ADS] TESTJOIN</title>
731
732 <para>Check whether participation in a domain is still valid.</para>
733
734 </refsect2>
735
736 <refsect2>
737 <title>[RPC|ADS] CHANGETRUSTPW</title>
738
739 <para>Force change of domain trust password.</para>
740
741 </refsect2>
742
743 <refsect2>
744 <title>RPC TRUSTDOM</title>
745
746 <refsect3>
747 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
748
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>
759
760 </refsect3>
761
762 <refsect3>
763 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
764
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>
769
770 </refsect3>
771
772 <refsect3>
773 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
774
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>
784
785 </refsect3>
786
787 <refsect3>
788 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
789 <para>Abandon relationship to trusted domain</para>
790
791 </refsect3>
792
793 <refsect3>
794 <title>RPC TRUSTDOM LIST</title>
795
796 <para>List all interdomain trust relationships.</para>
797
798 </refsect3>
799 </refsect2>
800
801 <refsect2>
802 <title>RPC TRUST</title>
803
804 <refsect3>
805 <title>RPC TRUST CREATE</title>
806
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>
810
811 <variablelist><title>Options:</title>
812 <varlistentry>
813 <term>otherserver</term>
814 <listitem><para>Domain controller of the second domain</para></listitem>
815 </varlistentry>
816
817 <varlistentry>
818 <term>otheruser</term>
819 <listitem><para>Admin user in the second domain</para></listitem>
820 </varlistentry>
821
822 <varlistentry>
823 <term>otherdomainsid</term>
824 <listitem><para>SID of the second domain</para></listitem>
825 </varlistentry>
826
827 <varlistentry>
828 <term>other_netbios_domain</term>
829 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
830 </varlistentry>
831
832 <varlistentry>
833 <term>otherdomain</term>
834 <listitem><para>DNS (full) name of the second domain</para></listitem>
835 </varlistentry>
836
837 <varlistentry>
838 <term>trustpw</term>
839 <listitem><para>Trust password</para></listitem>
840 </varlistentry>
841 </variablelist>
842
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>
866
867 <refsect3>
868 <title>RPC TRUST DELETE</title>
869
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>
872
873 <variablelist><title>Options:</title>
874 <varlistentry>
875 <term>otherserver</term>
876 <listitem><para>Domain controller of the second domain</para></listitem>
877 </varlistentry>
878
879 <varlistentry>
880 <term>otheruser</term>
881 <listitem><para>Admin user in the second domain</para></listitem>
882 </varlistentry>
883
884 <varlistentry>
885 <term>otherdomainsid</term>
886 <listitem><para>SID of the second domain</para></listitem>
887 </varlistentry>
888 </variablelist>
889
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>
910
911 </refsect2>
912
913 <refsect2>
914 <refsect3>
915 <title>RPC RIGHTS</title>
916
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>
922
923 </refsect3>
924
925
926 </refsect2>
927
928 <refsect2>
929 <title>RPC ABORTSHUTDOWN</title>
930
931 <para>Abort the shutdown of a remote server.</para>
932
933 </refsect2>
934
935 <refsect2>
936 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
937
938 <para>Shut down the remote server.</para>
939
940 <variablelist>
941 <varlistentry>
942 <term>-r</term>
943 <listitem><para>
944 Reboot after shutdown.
945 </para></listitem>
946 </varlistentry>
947
948 <varlistentry>
949 <term>-f</term>
950 <listitem><para>
951 Force shutting down all applications.
952 </para></listitem>
953 </varlistentry>
954
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>
962
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>
969
970 </refsect2>
971
972 <refsect2>
973 <title>RPC SAMDUMP</title>
974
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>
978
979 <refsect2>
980 <title>RPC VAMPIRE</title>
981
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>
986
987 <refsect2>
988 <title>RPC VAMPIRE KEYTAB</title>
989
990 <para>Dump remote SAM database to local Kerberos keytab file.
991 </para>
992 </refsect2>
993
994 <refsect2>
995 <title>RPC VAMPIRE LDIF</title>
996
997 <para>Dump remote SAM database to local LDIF file or standard output.
998 </para>
999 </refsect2>
1000
1001 <refsect2>
1002 <title>RPC GETSID</title>
1003
1004 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
1005
1006 </refsect2>
1007
1008 <refsect2>
1009 <title>ADS LEAVE</title>
1010
1011 <para>Make the remote host leave the domain it is part of. </para>
1012
1013 </refsect2>
1014
1015 <refsect2>
1016 <title>ADS STATUS</title>
1017
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>
1021
1022 </refsect2>
1023
1024 <refsect2>
1025 <title>ADS PRINTER</title>
1026
1027 <refsect3>
1028 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1029
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>
1033
1034 </refsect3>
1035
1036 <refsect3>
1037 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1038
1039 <para>Publish specified printer using ADS.</para>
1040
1041 </refsect3>
1042
1043 <refsect3>
1044 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1045
1046 <para>Remove specified printer from ADS directory.</para>
1047
1048 </refsect3>
1049
1050 </refsect2>
1051
1052 <refsect2>
1053 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1054
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>
1058
1059 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1060 </para>
1061
1062 </refsect2>
1063
1064 <refsect2>
1065 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1066
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>
1072
1073 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1074
1075 </refsect2>
1076
1077 <refsect2>
1078 <title>ADS WORKGROUP</title>
1079
1080 <para>Print out workgroup name for specified kerberos realm.</para>
1081
1082 </refsect2>
1083
1084 <refsect2>
1085 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
1086
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.
1094
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>
1098
1099 </refsect2>
1100
1101 <refsect2>
1102 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
1103
1104 <para>
1105 Create a LOCAL group (also known as Alias).
1106
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>
1110
1111 </refsect2>
1112
1113 <refsect2>
1114 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
1115
1116 <para>
1117 Delete an existing LOCAL group (also known as Alias).
1118
1119 </para>
1120
1121 </refsect2>
1122
1123 <refsect2>
1124 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
1125
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>
1130
1131 </refsect2>
1132
1133 <refsect2>
1134 <title>SAM UNMAPUNIXGROUP &lt;NAME&gt;</title>
1135
1136 <para>
1137 Remove an existing group mapping entry.
1138 </para>
1139
1140 </refsect2>
1141
1142 <refsect2>
1143 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1144
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>
1149
1150 </refsect2>
1151
1152 <refsect2>
1153 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1154
1155 <para>
1156 Remove a member from a Local group. The group and the member must be
1157 specified by name.
1158 </para>
1159
1160 </refsect2>
1161
1162 <refsect2>
1163 <title>SAM LISTMEM &lt;GROUP&gt;</title>
1164
1165 <para>
1166 List Local group members. The group must be specified by name.
1167 </para>
1168
1169 </refsect2>
1170
1171 <refsect2>
1172 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
1173
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>
1178
1179 </refsect2>
1180
1181 <refsect2>
1182 <title>SAM RIGHTS LIST</title>
1183
1184 <para>
1185 List all available privileges.
1186 </para>
1187
1188 </refsect2>
1189
1190 <refsect2>
1191 <title>SAM RIGHTS GRANT &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1192
1193 <para>
1194 Grant one or more privileges to a user.
1195 </para>
1196
1197 </refsect2>
1198
1199 <refsect2>
1200 <title>SAM RIGHTS REVOKE &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1201
1202 <para>
1203 Revoke one or more privileges from a user.
1204 </para>
1205
1206 </refsect2>
1207
1208 <refsect2>
1209 <title>SAM SHOW &lt;NAME&gt;</title>
1210
1211 <para>
1212 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1213 account.
1214 </para>
1215
1216 </refsect2>
1217
1218 <refsect2>
1219 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1220
1221 <para>
1222 Set the home directory for a user account.
1223 </para>
1224
1225 </refsect2>
1226
1227 <refsect2>
1228 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1229
1230 <para>
1231 Set the profile path for a user account.
1232 </para>
1233
1234 </refsect2>
1235
1236 <refsect2>
1237 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1238
1239 <para>
1240 Set the comment for a user or group account.
1241 </para>
1242
1243 </refsect2>
1244
1245 <refsect2>
1246 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1247
1248 <para>
1249 Set the full name for a user account.
1250 </para>
1251
1252 </refsect2>
1253
1254 <refsect2>
1255 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1256
1257 <para>
1258 Set the logon script for a user account.
1259 </para>
1260
1261 </refsect2>
1262
1263 <refsect2>
1264 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1265
1266 <para>
1267 Set the home drive for a user account.
1268 </para>
1269
1270 </refsect2>
1271
1272 <refsect2>
1273 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1274
1275 <para>
1276 Set the workstations a user account is allowed to log in from.
1277 </para>
1278
1279 </refsect2>
1280
1281 <refsect2>
1282 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1283
1284 <para>
1285 Set the "disabled" flag for a user account.
1286 </para>
1287
1288 </refsect2>
1289
1290 <refsect2>
1291 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1292
1293 <para>
1294 Set the "password not required" flag for a user account.
1295 </para>
1296
1297 </refsect2>
1298
1299 <refsect2>
1300 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1301
1302 <para>
1303 Set the "autolock" flag for a user account.
1304 </para>
1305
1306 </refsect2>
1307
1308 <refsect2>
1309 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1310
1311 <para>
1312 Set the "password do not expire" flag for a user account.
1313 </para>
1314
1315 </refsect2>
1316
1317 <refsect2>
1318 <title>SAM SET PWDMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1319
1320 <para>
1321 Set or unset the "password must change" flag for a user account.
1322 </para>
1323
1324 </refsect2>
1325
1326 <refsect2>
1327 <title>SAM POLICY LIST</title>
1328
1329 <para>
1330 List the available account policies.
1331 </para>
1332
1333 </refsect2>
1334
1335 <refsect2>
1336 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1337
1338 <para>
1339 Show the account policy value.
1340 </para>
1341
1342 </refsect2>
1343
1344 <refsect2>
1345 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1346
1347 <para>
1348 Set a value for the account policy.
1349 Valid values can be: "forever", "never", "off", or a number.
1350 </para>
1351
1352 </refsect2>
1353
1354 <refsect2>
1355 <title>SAM PROVISION</title>
1356
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>
1362
1363 </refsect2>
1364
1365 <refsect2>
1366 <title>IDMAP DUMP &lt;local tdb file name&gt;</title>
1367
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>
1372
1373 </refsect2>
1374
1375 <refsect2>
1376 <title>IDMAP RESTORE [input file]</title>
1377
1378 <para>
1379 Restore the mappings from the specified file or stdin.
1380 </para>
1381
1382 </refsect2>
1383
1384 <refsect2>
1385 <title>IDMAP SECRET &lt;DOMAIN&gt; &lt;secret&gt;</title>
1386
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>
1392
1393 </refsect2>
1394
1395 <refsect2>
1396
1397 <title>IDMAP DELETE [-f] [--db=&lt;DB&gt;] &lt;ID&gt;</title>
1398
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>
1410
1411 <refsect2>
1412
1413 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=&lt;DB&gt;]</title>
1414
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:
1419
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>
1426
1427     <varlistentry><term>-a|--auto</term>
1428     <listitem><para>
1429       Noninteractive repair mode, use default answers.
1430     </para></listitem>
1431     </varlistentry>
1432
1433     <varlistentry><term>-v|--verbose</term>
1434       <listitem><para>
1435         Produce more output.
1436       </para></listitem>
1437     </varlistentry>
1438
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>
1444
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>
1450
1451     <varlistentry><term>-l|--lock</term>
1452       <listitem><para>
1453         Lock the database while doing the check.
1454       </para></listitem>
1455     </varlistentry>
1456
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>
1467
1468   It reports about the finding of the following errors:
1469
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>
1477
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>
1484
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>
1492
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>
1502
1503
1504 <refsect2>
1505 <title>USERSHARE</title>
1506
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>
1511
1512 <para>
1513 To set this up, first set up your smb.conf by adding to the [global] section:
1514
1515 usershare path = /usr/local/samba/lib/usershares
1516
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".
1520
1521 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1522
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).
1526
1527 Finally, tell smbd how many usershares you will allow by adding to the [global]
1528 section of smb.conf a line such as :
1529
1530 usershare max shares = 100.
1531
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>
1535
1536 <para>The usershare commands are:
1537
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>
1544
1545 </para>
1546
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>
1549
1550 <para>
1551 Add or replace a new user defined share, with name "sharename".
1552 </para>
1553
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>
1560
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>
1565
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>
1578
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>
1583
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>
1590
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>
1598
1599 <refsect3>
1600 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1601
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>
1607
1608 </refsect3>
1609
1610 <refsect3>
1611 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1612
1613 <para>
1614 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1615 </para>
1616
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>
1624
1625 <para>
1626 The information given about a share looks like:
1627
1628 [foobar]
1629 path=/home/jeremy
1630 comment=testme
1631 usershare_acl=Everyone:F
1632 guest_ok=n
1633
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>
1637
1638 </refsect3>
1639
1640 <refsect3>
1641 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1642
1643 <para>
1644 List all the user defined shares owned by the current user matching the given pattern, or all users.
1645 </para>
1646
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>
1654
1655 </refsect3>
1656
1657 </refsect2>
1658
1659 <refsect2>
1660 <title>[RPC] CONF</title>
1661
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>
1667
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>
1680
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>
1701
1702 <refsect3>
1703 <title>[RPC] CONF LIST</title>
1704
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>
1710
1711 <refsect3>
1712 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
1713
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>
1726
1727 <refsect3>
1728 <title>[RPC] CONF LISTSHARES</title>
1729
1730 <para>
1731 List the names of the shares defined in registry.
1732 </para>
1733 </refsect3>
1734
1735 <refsect3>
1736 <title>[RPC] CONF DROP</title>
1737
1738 <para>
1739 Delete the complete configuration data from registry.
1740 </para>
1741 </refsect3>
1742
1743 <refsect3>
1744 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
1745
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>
1752
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>
1755
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>
1764
1765 <refsect3>
1766 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
1767
1768 <para>
1769 Delete a share definition from registry.
1770 </para>
1771 </refsect3>
1772
1773 <refsect3>
1774 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
1775
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>
1781
1782 <refsect3>
1783 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1784
1785 <para>
1786 Show a parameter stored in registry.
1787 </para>
1788 </refsect3>
1789
1790 <refsect3>
1791 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1792
1793 <para>
1794 Delete a parameter stored in registry.
1795 </para>
1796 </refsect3>
1797
1798 <refsect3>
1799 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
1800
1801 <para>
1802 Get the list of includes for the provided section (global or share).
1803 </para>
1804
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>
1816
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>
1823
1824 <refsect3>
1825 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
1826
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>
1833
1834 <refsect3>
1835 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
1836
1837 <para>
1838 Delete the list of includes from the provided section (global or share).
1839 </para>
1840 </refsect3>
1841
1842 </refsect2>
1843
1844 <refsect2>
1845 <title>REGISTRY</title>
1846 <para>
1847 Manipulate Samba's registry.
1848 </para>
1849
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>
1878
1879 <refsect3>
1880   <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
1881   <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
1882   </para>
1883 </refsect3>
1884
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>
1890
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>
1896
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>
1903
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>
1910
1911 <refsect3>
1912   <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
1913   --><replaceable>name</replaceable></title>
1914
1915   <para>Output type and actual value of the value <emphasis>name</emphasis>
1916   of the given <emphasis>key</emphasis>.
1917   </para>
1918 </refsect3>
1919
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>
1927
1928 <refsect3>
1929   <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
1930   --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
1931   --><replaceable>value</replaceable> ...<!--
1932   --></title>
1933
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>
1943
1944 <refsect3>
1945   <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
1946   --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
1947   --></title>
1948
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>
1955
1956 <refsect3>
1957   <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
1958   --><replaceable>name</replaceable></title>
1959
1960   <para>Delete the value <emphasis>name</emphasis>
1961   of the given <emphasis>key</emphasis>.
1962   </para>
1963 </refsect3>
1964
1965 <refsect3>
1966   <title>REGISTRY GETSD <replaceable>key</replaceable></title>
1967
1968   <para>Get the security descriptor of the given <emphasis>key</emphasis>.
1969   </para>
1970 </refsect3>
1971
1972 <refsect3>
1973   <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
1974
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>
1979
1980 <refsect3>
1981   <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
1982   --><replaceable>sd</replaceable></title>
1983
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>
1988
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>
2020
2021 <refsect3>
2022   <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2023   --><replaceable>file</replaceable><!--
2024   --><replaceable>[opt]</replaceable></title>
2025
2026   <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2027   <emphasis>file</emphasis>.
2028   </para>
2029 </refsect3>
2030
2031 <refsect3>
2032   <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2033   --><replaceable>out</replaceable> <!--
2034   --><replaceable>[[inopt] outopt]</replaceable></title>
2035
2036   <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2037   </para>
2038 </refsect3>
2039
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
2043
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>
2050
2051     <varlistentry><term>-a|--auto</term>
2052     <listitem><para>
2053       Noninteractive repair mode, use default answers.
2054     </para></listitem>
2055     </varlistentry>
2056
2057     <varlistentry><term>-v|--verbose</term>
2058       <listitem><para>
2059         Produce more output.
2060       </para></listitem>
2061     </varlistentry>
2062
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>
2068
2069     <varlistentry><term>-l|--lock</term>
2070       <listitem><para>
2071         Lock the database while doing the check.
2072       </para></listitem>
2073     </varlistentry>
2074
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>
2082
2083     <varlistentry><term>[--db] &lt;DB&gt;</term>
2084       <listitem><para>
2085         Check the specified database.
2086       </para></listitem>
2087     </varlistentry>
2088
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>
2096
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>
2103
2104     <varlistentry><term></term>
2105       <listitem><para>
2106       </para></listitem>
2107     </varlistentry>
2108   </variablelist>
2109   </para>
2110 </refsect3>
2111
2112 </refsect2>
2113
2114 <refsect2>
2115 <title>CONNECTIONS</title>
2116 <para>
2117 Manipulate Samba's connections database.
2118 </para>
2119
2120 <para>The registry commands are:
2121 <simplelist>
2122 <member>net connections cleanup - Remove orphaned entries from the connections database.</member>
2123 </simplelist>
2124 </para>
2125
2126 <refsect3>
2127   <title>CONNECTIONS CLEANUP [-avT]</title>
2128   <para> Remove orphaned entries from the connections database. This may be necessary if restarting smbd isn't an option.
2129   <variablelist>
2130     <varlistentry><term>-a|--auto</term>
2131     <listitem><para>
2132       Noninteractive mode, don't ask.
2133     </para></listitem>
2134     </varlistentry>
2135
2136     <varlistentry><term>-v|--verbose</term>
2137       <listitem><para>
2138         Produce more output.
2139       </para></listitem>
2140     </varlistentry>
2141
2142     <varlistentry><term>-T|--test</term>
2143       <listitem><para>
2144         Dry run, show what changes would be made but don't touch anything.
2145       </para></listitem>
2146     </varlistentry>
2147   </variablelist>
2148   </para>
2149 </refsect3>
2150
2151 </refsect2>
2152
2153 <refsect2>
2154 <title>EVENTLOG</title>
2155
2156 <para>Starting with version 3.4.0 net can read, dump, import and export native
2157 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2158 </para>
2159
2160 <para>
2161 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2162 <emphasis>smb.conf</emphasis> file.
2163 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2164 </para>
2165
2166 <para>The eventlog commands are:
2167 <simplelist>
2168 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2169 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2170 tdb based representation of eventlogs.</member>
2171 <member>net eventlog export - Export the samba internal tdb based representation
2172 of eventlogs into an eventlog *.evt file.</member>
2173 </simplelist>
2174 </para>
2175
2176 <refsect3>
2177 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2178
2179 <para>
2180 Prints a eventlog *.evt file to standard output.
2181 </para>
2182 </refsect3>
2183
2184 <refsect3>
2185 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2186
2187 <para>
2188 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2189 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2190 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2191 defined in smb.conf.
2192 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2193 </para>
2194
2195 </refsect3>
2196
2197 <refsect3>
2198 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2199
2200 <para>
2201 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2202 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2203 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2204 defined in smb.conf.
2205 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2206 </para>
2207
2208 </refsect3>
2209
2210 </refsect2>
2211
2212 <refsect2>
2213 <title>DOM</title>
2214
2215 <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.
2216 </para>
2217 <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.
2218 </para>
2219
2220 <para>The client side support for remote join is implemented in the net dom commands which are:
2221 <simplelist>
2222 <member>net dom join - Join a remote computer into a domain.</member>
2223 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2224 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2225 </simplelist>
2226 </para>
2227
2228 <refsect3>
2229 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2230
2231 <para>
2232 Joins a computer into a domain. This command supports the following additional parameters:
2233 </para>
2234
2235 <itemizedlist>
2236
2237 <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>
2238
2239 <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>
2240
2241 <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>
2242
2243 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2244
2245 <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>
2246
2247 </itemizedlist>
2248
2249 <para>
2250 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.
2251 </para>
2252 <para>
2253         Example:
2254         net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2255 </para>
2256 <para>
2257 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.
2258 </para>
2259
2260 </refsect3>
2261
2262 <refsect3>
2263 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2264
2265 <para>
2266 Unjoins a computer from a domain. This command supports the following additional parameters:
2267 </para>
2268
2269 <itemizedlist>
2270
2271 <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>
2272
2273 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2274
2275 <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>
2276
2277 </itemizedlist>
2278
2279 <para>
2280 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.
2281 </para>
2282 <para>
2283         Example:
2284         net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2285 </para>
2286 <para>
2287 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.
2288 </para>
2289
2290 </refsect3>
2291
2292 <refsect3>
2293 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2294
2295 <para>
2296 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2297 </para>
2298
2299 <itemizedlist>
2300
2301 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2302
2303 <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>
2304
2305 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2306
2307 <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>
2308
2309 </itemizedlist>
2310
2311 <para>
2312 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.
2313 </para>
2314 <para>
2315         Example:
2316         net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2317 </para>
2318 <para>
2319 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.
2320 </para>
2321
2322 </refsect3>
2323
2324 </refsect2>
2325
2326 <refsect2>
2327 <title>G_LOCK</title>
2328
2329 <para>Manage global locks.</para>
2330
2331 <refsect3>
2332 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2333
2334 <para>
2335 Execute a shell command under a global lock. This might be useful to define the
2336 order in which several shell commands will be executed. The locking information
2337 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2338 running, the locking information will be available on all cluster nodes.
2339 </para>
2340
2341 <itemizedlist>
2342 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2343 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2344 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2345 </itemizedlist>
2346 </refsect3>
2347
2348 <refsect3>
2349 <title>G_LOCK LOCKS</title>
2350
2351 <para>
2352 Print a list of all currently existing locknames.
2353 </para>
2354 </refsect3>
2355
2356 <refsect3>
2357 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2358
2359 <para>
2360 Dump the locking table of a certain global lock.
2361 </para>
2362 </refsect3>
2363
2364 </refsect2>
2365
2366 <refsect2>
2367 <title>HELP [COMMAND]</title>
2368
2369 <para>Gives usage information for the specified command.</para>
2370
2371 </refsect2>
2372
2373 </refsect1>
2374
2375 <refsect1>
2376         <title>VERSION</title>
2377
2378         <para>This man page is complete for version 3 of the Samba 
2379         suite.</para>
2380 </refsect1>
2381
2382 <refsect1>
2383         <title>AUTHOR</title>
2384         
2385         <para>The original Samba software and related utilities 
2386         were created by Andrew Tridgell. Samba is now developed
2387         by the Samba Team as an Open Source project similar 
2388         to the way the Linux kernel is developed.</para>
2389
2390         <para>The net manpage was written by Jelmer Vernooij.</para>
2391         
2392 </refsect1>
2393
2394 </refentry>