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