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