net: Add support for a credentials file
[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">&doc.version;</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|--help</arg>
26                 <arg choice="opt">-w|--workgroup workgroup</arg>
27                 <arg choice="opt">-W|--myworkgroup myworkgroup</arg>
28                 <arg choice="opt">-U|--user user</arg>
29                 <arg choice="opt">-A|--authentication-file authfile</arg>
30                 <arg choice="opt">-I|--ipaddress ip-address</arg>
31                 <arg choice="opt">-p|--port port</arg>
32                 <arg choice="opt">-n myname</arg>
33                 <arg choice="opt">-s conffile</arg>
34                 <arg choice="opt">-S|--server server</arg>
35                 <arg choice="opt">-l|--long</arg>
36                 <arg choice="opt">-v|--verbose</arg>
37                 <arg choice="opt">-f|--force</arg>
38                 <arg choice="opt">-P|--machine-pass</arg>
39                 <arg choice="opt">-d debuglevel</arg>
40                 <arg choice="opt">-V</arg>
41                 <arg choice="opt">--request-timeout seconds</arg>
42                 <arg choice="opt">-t|--timeout seconds</arg>
43                 <arg choice="opt">-i|--stdin</arg>
44                 <arg choice="opt">--tallocreport</arg>
45         </cmdsynopsis>
46 </refsynopsisdiv>
47
48 <refsect1>
49         <title>DESCRIPTION</title>
50
51         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
52         <manvolnum>7</manvolnum></citerefentry> suite.</para>
53
54         <para>The Samba net utility is meant to work just like the net utility 
55         available for windows and DOS. The first argument should be used 
56         to specify the protocol to use when executing a certain command. 
57         ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3) 
58         clients and RPC can be used for NT4 and Windows 2000. If this 
59         argument is omitted, net will try to determine it automatically. 
60         Not all commands are available on all protocols.
61         </para>
62
63 </refsect1>
64
65 <refsect1>
66         <title>OPTIONS</title>
67
68         <variablelist>
69                 &stdarg.help;
70                 &stdarg.kerberos;
71                 
72                 <varlistentry>
73                 <term>-w|--workgroup target-workgroup</term>
74                 <listitem><para>
75                 Sets target workgroup or domain. You have to specify 
76                 either this option or the IP address or the name of a server.
77                 </para></listitem>
78                 </varlistentry>
79
80                 <varlistentry>
81                 <term>-W|--myworkgroup workgroup</term>
82                 <listitem><para>
83                 Sets client workgroup or domain
84                 </para></listitem>
85                 </varlistentry>
86
87                 <varlistentry>
88                 <term>-U|--user user</term>
89                 <listitem><para>
90                 User name to use
91                 </para></listitem>
92                 </varlistentry>
93
94                 <varlistentry>
95                 <term>-I|--ipaddress ip-address</term>
96                 <listitem><para>
97                 IP address of target server to use. You have to
98                 specify either this option or a target workgroup or
99                 a target server.
100                 </para></listitem>
101                 </varlistentry>
102
103                 <varlistentry>
104                 <term>-p|--port port</term>
105                 <listitem><para>
106                 Port on the target server to connect to (usually 139 or 445). 
107                 Defaults to trying 445 first, then 139.
108                 </para></listitem>
109                 </varlistentry>
110
111                 &stdarg.netbios.name;
112
113                 <varlistentry>
114                 <term>-S|--server server</term>
115                 <listitem><para>
116                 Name of target server. You should specify either 
117                 this option or a target workgroup or a target IP address.
118                 </para></listitem>
119                 </varlistentry>
120
121                 <varlistentry>
122                 <term>-l|--long</term>
123                 <listitem><para>
124                 When listing data, give more information on each item.
125                 </para></listitem>
126                 </varlistentry>
127
128                 <varlistentry>
129                 <term>-v|--verbose</term>
130                 <listitem><para>
131                 When listing data, give more verbose information on each item.
132                 </para></listitem>
133                 </varlistentry>
134
135                 <varlistentry>
136                 <term>-f|--force</term>
137                 <listitem><para>
138                                 Enforcing a net command.
139                 </para></listitem>
140                 </varlistentry>
141
142                 <varlistentry>
143                 <term>-P|--machine-pass</term>
144                 <listitem><para>
145                 Make queries to the external server using the machine account of the local server.
146                 </para></listitem>
147                 </varlistentry>
148
149                 <varlistentry>
150                 <term>--request-timeout 30</term>
151                 <listitem><para>
152                 Let client requests timeout after 30 seconds the default is 10
153                 seconds.
154                 </para></listitem>
155                 </varlistentry>
156
157                 <varlistentry>
158                 <term>-t|--timeout 30</term>
159                 <listitem><para>
160                                 Set timeout for client operations to 30 seconds.
161                 </para></listitem>
162                 </varlistentry>
163
164                 <varlistentry>
165                 <term>--use-ccache</term>
166                 <listitem><para>
167                 Try to use the credentials cached by winbind.
168                 </para></listitem>
169                 </varlistentry>
170
171                 <varlistentry>
172                 <term>-i|--stdin</term>
173                 <listitem><para>
174                                 Take input for net commands from standard input.
175                 </para></listitem>
176                 </varlistentry>
177
178                 <varlistentry>
179                 <term>--tallocreport</term>
180                 <listitem><para>
181                                 Generate a talloc report while processing a net
182                                 command.
183                 </para></listitem>
184                 </varlistentry>
185
186                 <varlistentry>
187                 <term>-T|--test</term>
188                 <listitem><para>Only test command sequence, dry-run.
189                 </para></listitem>
190                 </varlistentry>
191
192                 <varlistentry>
193                 <term>-F|--flags FLAGS</term>
194                 <listitem><para>Pass down integer flags to a net subcommand.
195                 </para></listitem>
196                 </varlistentry>
197
198                 <varlistentry>
199                 <term>-C|--comment COMMENT</term>
200                 <listitem><para>Pass down a comment string to a net subcommand.
201                 </para></listitem>
202                 </varlistentry>
203
204                 <varlistentry>
205                 <term>-n|--myname MYNAME</term>
206                 <listitem><para>Use MYNAME as a requester name for a net subcommand.
207                 </para></listitem>
208                 </varlistentry>
209
210                 <varlistentry>
211                 <term>-c|--container CONTAINER</term>
212                 <listitem><para>Use a specific AD container for net ads operations.
213                 </para></listitem>
214                 </varlistentry>
215
216                 <varlistentry>
217                 <term>-M|--maxusers MAXUSERS</term>
218                 <listitem><para>Fill in the maxusers field in net rpc share operations.
219                 </para></listitem>
220                 </varlistentry>
221
222                 <varlistentry>
223                 <term>-r|--reboot</term>
224                 <listitem><para>Reboot a remote machine after a command has been successfully executed (e.g. in remote join operations).
225                 </para></listitem>
226                 </varlistentry>
227
228                 <!-- Options for net rpc vampire -->
229
230                 <varlistentry>
231                 <term>--force-full-repl</term>
232                 <listitem><para>
233                                 When calling "net rpc vampire keytab" this option
234                                 enforces a full re-creation of the generated keytab file.
235                 </para></listitem>
236                 </varlistentry>
237
238                 <varlistentry>
239                 <term>--single-obj-repl</term>
240                 <listitem><para>
241                                 When calling "net rpc vampire keytab" this option
242                                 allows one to replicate just a single object to the generated keytab file.
243                 </para></listitem>
244                 </varlistentry>
245
246                 <varlistentry>
247                 <term>--clean-old-entries</term>
248                 <listitem><para>
249                                 When calling "net rpc vampire keytab" this option
250                                 allows one to cleanup old entries from the generated keytab file.
251                 </para></listitem>
252                 </varlistentry>
253
254                 <!-- Options for net idmap -->
255
256                 <varlistentry>
257                 <term>--db</term>
258                 <listitem><para>Define dbfile for "net idmap" commands.
259                 </para></listitem>
260                 </varlistentry>
261
262                 <varlistentry>
263                 <term>--lock</term>
264                 <listitem><para>Activates locking of the dbfile for "net idmap check" command.
265                 </para></listitem>
266                 </varlistentry>
267
268                 <varlistentry>
269                 <term>-a|--auto</term>
270                 <listitem><para>Activates noninteractive mode in "net idmap check".
271                 </para></listitem>
272                 </varlistentry>
273
274                 <varlistentry>
275                 <term>--repair</term>
276                 <listitem><para>Activates repair mode in "net idmap check".
277                 </para></listitem>
278                 </varlistentry>
279
280                 <!-- Options for net rpc share migrate -->
281
282                 <varlistentry>
283                 <term>--acls</term>
284                 <listitem><para>Includes ACLs to be copied in "net rpc share migrate".
285                 </para></listitem>
286                 </varlistentry>
287
288                 <varlistentry>
289                 <term>--attrs</term>
290                 <listitem><para>Includes file attributes to be copied in "net rpc share migrate".
291                 </para></listitem>
292                 </varlistentry>
293
294                 <varlistentry>
295                 <term>--timestamps</term>
296                 <listitem><para>Includes timestamps to be copied in "net rpc share migrate".
297                 </para></listitem>
298                 </varlistentry>
299
300                 <varlistentry>
301                 <term>-X|--exclude DIRECTORY</term>
302                 <listitem><para>Allows one to exclude directories when copying with "net rpc share migrate".
303                 </para></listitem>
304                 </varlistentry>
305
306                 <varlistentry>
307                 <term>--destination SERVERNAME</term>
308                 <listitem><para>Defines the target servername of migration process (defaults to localhost).
309                 </para></listitem>
310                 </varlistentry>
311
312                 <!-- Options for net groupmap set -->
313
314                 <varlistentry>
315                 <term>-L|--local</term>
316                 <listitem><para>Sets the type of group mapping to local
317                                 (used in "net groupmap set").
318                 </para></listitem>
319                 </varlistentry>
320
321                 <varlistentry>
322                 <term>-D|--domain</term>
323                 <listitem><para>Sets the type of group mapping to domain
324                                 (used in "net groupmap set").
325                 </para></listitem>
326                 </varlistentry>
327
328                 <varlistentry>
329                 <term>-N|--ntname NTNAME</term>
330                 <listitem><para>Sets the ntname of a group mapping
331                                 (used in "net groupmap set").
332                 </para></listitem>
333                 </varlistentry>
334
335                 <varlistentry>
336                 <term>-R|--rid RID</term>
337                 <listitem><para>Sets the rid of a group mapping
338                                 (used in "net groupmap set").
339                 </para></listitem>
340                 </varlistentry>
341
342                 <!-- Options for net registry check -->
343
344                 <varlistentry>
345                 <term>--reg-version REG_VERSION</term>
346                 <listitem><para>Assume database version {n|1,2,3}
347                                 (used in "net registry check").
348                 </para></listitem>
349                 </varlistentry>
350
351                 <varlistentry>
352                 <term>-o|--output FILENAME</term>
353                 <listitem><para>Output database file
354                                 (used in "net registry check").
355                 </para></listitem>
356                 </varlistentry>
357
358                 <varlistentry>
359                 <term>--wipe</term>
360                 <listitem><para>Create a new database from scratch
361                                 (used in "net registry check").
362                 </para></listitem>
363                 </varlistentry>
364
365                 <!-- Options for net registry import -->
366
367                 <varlistentry>
368                 <term>--precheck PRECHECK_DB_FILENAME</term>
369                 <listitem><para>Defines filename for database prechecking
370                                 (used in "net registry import").
371                 </para></listitem>
372                 </varlistentry>
373
374                 <varlistentry>
375                 <term>--no-dns-updates</term>
376                 <listitem><para>Do not perform DNS updates as part of
377                 "net ads join".
378                 </para></listitem>
379                 </varlistentry>
380
381                 <varlistentry>
382                 <term>--keep-account</term>
383                 <listitem><para>Prevent the machine account removal as
384                 part of "net ads leave".
385                 </para></listitem>
386                 </varlistentry>
387
388                 &stdarg.encrypt;
389                 &popt.common.samba.client;
390
391         </variablelist>
392 </refsect1>
393
394 <refsect1>
395 <title>COMMANDS</title>
396
397 <refsect2>
398 <title>CHANGESECRETPW</title>
399
400 <para>This command allows the Samba machine account password to be set from an external application
401 to a machine account password that has already been stored in Active Directory. DO NOT USE this command
402 unless you know exactly what you are doing. The use of this command requires that the force flag (-f)
403 be used also. There will be NO command prompt. Whatever information is piped into stdin, either by
404 typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use
405 this without care and attention as it will overwrite a legitimate machine password without warning.
406 YOU HAVE BEEN WARNED.
407 </para>
408
409 </refsect2>
410
411 <refsect2>
412         <title>TIME</title>
413
414         <para>The <command>NET TIME</command> command allows you to view the time on a remote server
415         or synchronise the time on the local server with the time on the remote server.</para>
416
417 <refsect3>
418 <title>TIME</title>
419
420 <para>Without any options, the <command>NET TIME</command> command 
421 displays the time on the remote server. The remote server must be
422 specified with the -S option.
423 </para>
424
425 </refsect3>
426
427 <refsect3>
428 <title>TIME SYSTEM</title>
429
430 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.
431 The remote server must be specified with the -S option.
432 </para>
433
434 </refsect3>
435
436 <refsect3>
437 <title>TIME SET</title>
438 <para>Tries to set the date and time of the local server to that on 
439 the remote server using <command>/bin/date</command>.
440 The remote server must be specified with the -S option.
441 </para>
442
443 </refsect3>
444
445 <refsect3>
446 <title>TIME ZONE</title>
447
448 <para>Displays the timezone in hours from GMT on the remote server.
449 The remote server must be specified with the -S option.
450 </para>
451
452 </refsect3>
453 </refsect2>
454
455 <refsect2>
456 <title>[RPC|ADS] JOIN [TYPE] [--no-dns-updates] [-U username[%password]]
457 [createupn=UPN] [createcomputer=OU] [machinepass=PASS]
458 [osName=string osVer=string] [options]</title>
459
460 <para>
461 Join a domain.  If the account already exists on the server, and 
462 [TYPE] is MEMBER, the machine will attempt to join automatically. 
463 (Assuming that the machine has been created in server manager)
464 Otherwise, a password will be prompted for, and a new account may
465 be created.</para>
466
467 <para>
468 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
469 joining the domain.
470 </para>
471
472 <para>
473 [UPN] (ADS only) set the principalname attribute during the join.  The default
474 format is host/netbiosname@REALM.
475 </para>
476
477 <para>
478 [OU] (ADS only) Precreate the computer account in a specific OU.  The
479 OU string reads from top to bottom without RDNs, and is delimited by
480 a '/'.  Please note that '\' is used for escape by both the shell
481 and ldap, so it may need to be doubled or quadrupled to pass through, 
482 and it is not used as a delimiter.
483 </para>
484 <para>
485 [PASS] (ADS only) Set a specific password on the computer account
486 being created by the join.
487 </para>
488 <para>
489 [osName=string osVer=String] (ADS only) Set the operatingSystem and
490 operatingSystemVersion attribute during the join.  Both parameters
491 must be specified for either to take effect.
492 </para>
493 </refsect2>
494
495 <refsect2>
496 <title>[RPC] OLDJOIN [options]</title>
497
498 <para>Join a domain. Use the OLDJOIN option to join the domain 
499 using the old style of domain joining - you need to create a trust 
500 account in server manager first.</para>
501 </refsect2>
502
503 <refsect2>
504 <title>[RPC|ADS] USER</title>
505
506 <refsect3>
507 <title>[RPC|ADS] USER</title>
508
509 <para>List all users</para>
510
511 </refsect3>
512
513 <refsect3>
514 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
515
516 <para>Delete specified user</para>
517
518 </refsect3>
519
520 <refsect3>
521 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
522
523 <para>List the domain groups of the specified user.</para>
524
525 </refsect3>
526
527 <refsect3>
528 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
529
530 <para>Rename specified user.</para>
531
532 </refsect3>
533
534 <refsect3>
535 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
536
537 <para>Add specified user.</para>
538 </refsect3>
539 </refsect2>
540
541 <refsect2>
542 <title>[RPC|ADS] GROUP</title>
543
544 <refsect3>
545 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
546 <para>List user groups.</para>
547 </refsect3>
548
549 <refsect3>
550 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
551
552 <para>Delete specified group.</para>
553
554 </refsect3>
555
556 <refsect3>
557 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
558
559 <para>Create specified group.</para>
560
561 </refsect3>
562 <refsect3>
563 <title>[ADS] LOOKUP</title>
564
565 <para>Lookup the closest Domain Controller in our domain and retrieve server information about it.</para>
566
567 </refsect3>
568 </refsect2>
569
570 <refsect2>
571 <title>[RAP|RPC] SHARE</title>
572
573 <refsect3>
574 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
575
576 <para>Enumerates all exported resources (network shares) on target server.</para>
577
578 </refsect3>
579
580 <refsect3>
581 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
582
583 <para>Adds a share from a server (makes the export active). Maxusers 
584 specifies the number of users that can be connected to the 
585 share simultaneously.</para>
586
587 </refsect3>
588
589 <refsect3>
590 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
591
592 <para>Delete specified share.</para>
593 </refsect3>
594 </refsect2>
595
596 <refsect2>
597 <title>[RPC|RAP] FILE</title>
598
599 <refsect3>
600 <title>[RPC|RAP] FILE</title>
601
602 <para>List all open files on remote server.</para>
603
604 </refsect3>
605
606 <refsect3>
607 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
608
609 <para>Close file with specified <replaceable>fileid</replaceable> on 
610 remote server.</para>
611
612 </refsect3>
613
614 <refsect3>
615 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
616
617 <para>
618 Print information on specified <replaceable>fileid</replaceable>. 
619 Currently listed are: file-id, username, locks, path, permissions.
620 </para>
621
622 </refsect3>
623
624 <refsect3>
625 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
626
627 <para>
628 List files opened by specified <replaceable>user</replaceable>.
629 Please note that <command>net rap file user</command> does not work
630 against Samba servers. 
631 </para>
632
633 </refsect3>
634
635 </refsect2>
636
637 <refsect2>
638 <title>SESSION</title>
639
640 <refsect3>
641 <title>RAP SESSION</title>
642
643 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
644 sessions on the target server.</para>
645
646 </refsect3>
647
648 <refsect3>
649 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
650
651 <para>Close the specified sessions.</para>
652
653 </refsect3>
654
655 <refsect3>
656 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
657
658 <para>Give a list with all the open files in specified session.</para>
659
660 </refsect3>
661
662 </refsect2>
663
664 <refsect2>
665 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
666
667 <para>List all servers in specified domain or workgroup. Defaults
668 to local domain.</para>
669
670 </refsect2>
671
672 <refsect2>
673 <title>RAP DOMAIN</title>
674
675 <para>Lists all domains and workgroups visible on the 
676 current network.</para>
677
678 </refsect2>
679
680 <refsect2>
681 <title>RAP PRINTQ</title>
682
683 <refsect3>
684 <title>RAP PRINTQ INFO <replaceable>QUEUE_NAME</replaceable></title>
685
686 <para>Lists the specified print queue and print jobs on the server.
687 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all 
688 queues are listed.</para>
689
690 </refsect3>
691
692 <refsect3>
693 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
694
695 <para>Delete job with specified id.</para>
696
697 </refsect3>
698
699 </refsect2>
700
701 <refsect2>
702 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
703
704 <para>
705 Validate whether the specified user can log in to the 
706 remote server. If the password is not specified on the commandline, it 
707 will be prompted. 
708 </para>
709
710 &not.implemented;
711
712 </refsect2>
713
714 <refsect2>
715 <title>RAP GROUPMEMBER</title>
716
717 <refsect3>
718 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
719
720 <para>List all members of the specified group.</para>
721
722 </refsect3>
723
724 <refsect3>
725 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
726
727 <para>Delete member from group.</para>
728
729 </refsect3>
730
731 <refsect3>
732 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
733
734 <para>Add member to group.</para>
735
736 </refsect3>
737
738 </refsect2>
739
740 <refsect2>
741 <title>RAP ADMIN <replaceable>command</replaceable></title>
742
743 <para>Execute the specified <replaceable>command</replaceable> on 
744 the remote server. Only works with OS/2 servers.
745 </para>
746
747 &not.implemented;
748
749 </refsect2>
750
751 <refsect2>
752 <title>RAP SERVICE</title>
753
754 <refsect3>
755 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
756
757 <para>Start the specified service on the remote server. Not implemented yet.</para>
758
759 &not.implemented;
760
761 </refsect3>
762
763 <refsect3>
764 <title>RAP SERVICE STOP</title>
765
766 <para>Stop the specified service on the remote server.</para>
767
768 &not.implemented;
769
770 </refsect3>
771
772 </refsect2>
773
774 <refsect2>
775 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
776
777 <para>
778 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
779 </para>
780
781 </refsect2>
782
783 <refsect2>
784 <title>LOOKUP</title>
785
786 <refsect3>
787 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
788
789 <para>
790 Lookup the IP address of the given host with the specified type (netbios suffix). 
791 The type defaults to 0x20 (workstation).
792 </para>
793
794 </refsect3>
795
796 <refsect3>
797 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
798
799 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
800
801 </refsect3>
802
803 <refsect3>
804 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
805
806 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
807 Defaults to local realm.</para>
808
809 </refsect3>
810
811 <refsect3>
812 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
813
814 <para>Give IP's of Domain Controllers for specified <replaceable>
815 DOMAIN</replaceable>. Defaults to local domain.</para>
816
817 </refsect3>
818
819 <refsect3>
820 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
821
822 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
823 or workgroup. Defaults to local domain.</para>
824
825 </refsect3>
826
827 <refsect3>
828 <title>LOOKUP NAME [<replaceable>NAME</replaceable>]</title>
829
830 <para>Lookup username's sid and type for specified <replaceable>NAME</replaceable>
831 </para>
832
833 </refsect3>
834
835 <refsect3>
836 <title>LOOKUP SID [<replaceable>SID</replaceable>]</title>
837
838 <para>Give sid's name and type for specified <replaceable>SID</replaceable>
839 </para>
840
841 </refsect3>
842
843 <refsect3>
844 <title>LOOKUP DSGETDCNAME [<replaceable>NAME</replaceable>] [<replaceable>FLAGS</replaceable>] [<replaceable>SITENAME</replaceable>]</title>
845
846 <para>Give Domain Controller information for specified domain <replaceable>NAME</replaceable>
847 </para>
848
849 </refsect3>
850
851 </refsect2>
852
853 <refsect2>
854 <title>CACHE</title>
855
856 <para>Samba uses a general caching interface called 'gencache'. It 
857 can be controlled using 'NET CACHE'.</para>
858
859 <para>All the timeout parameters support the suffixes:
860
861 <simplelist>
862 <member>s - Seconds</member>
863 <member>m - Minutes</member>
864 <member>h - Hours</member>
865 <member>d - Days</member>
866 <member>w - Weeks</member>
867 </simplelist>
868
869 </para>
870
871 <refsect3>
872 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
873
874 <para>Add specified key+data to the cache with the given timeout.</para>
875
876 </refsect3>
877
878 <refsect3>
879 <title>CACHE DEL <replaceable>key</replaceable></title>
880
881 <para>Delete key from the cache.</para>
882
883 </refsect3>
884
885 <refsect3>
886 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
887
888 <para>Update data of existing cache entry.</para>
889
890 </refsect3>
891
892 <refsect3>
893 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
894
895 <para>Search for the specified pattern in the cache data.</para>
896
897 </refsect3>
898
899 <refsect3>
900 <title>CACHE LIST</title>
901
902 <para>
903 List all current items in the cache.
904 </para>
905
906 </refsect3>
907
908 <refsect3>
909 <title>CACHE FLUSH</title>
910
911 <para>Remove all the current items from the cache.</para>
912
913 </refsect3>
914
915 </refsect2>
916
917 <refsect2>
918 <title>GETLOCALSID [DOMAIN]</title>
919
920 <para>Prints the SID of the specified domain, or if the parameter is
921 omitted, the SID of the local server.</para>
922
923 </refsect2>
924
925 <refsect2>
926 <title>SETLOCALSID S-1-5-21-x-y-z</title>
927
928 <para>Sets SID for the local server to the specified SID.</para>
929
930 </refsect2>
931
932 <refsect2>
933 <title>GETDOMAINSID</title>
934
935 <para>Prints the local machine SID and the SID of the current 
936 domain.</para>
937
938 </refsect2>
939
940 <refsect2>
941 <title>SETDOMAINSID</title>
942
943 <para>Sets the SID of the current domain.</para>
944
945 </refsect2>
946
947 <refsect2>
948 <title>GROUPMAP</title>
949
950 <para>Manage the mappings between Windows group SIDs and UNIX groups.
951 Common options include:</para>
952
953 <itemizedlist>
954 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
955 <listitem><para>ntgroup - Name of the Windows NT group (must be
956   resolvable to a SID</para></listitem>
957 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
958 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
959 <listitem><para>type - Type of the group; either 'domain', 'local',
960   or 'builtin'</para></listitem>
961 <listitem><para>comment - Freeform text description of the group</para></listitem>
962 </itemizedlist>
963
964 <refsect3>
965 <title>GROUPMAP ADD</title>
966
967 <para>
968 Add a new group mapping entry:
969 <programlisting>
970 net groupmap add {rid=int|sid=string} unixgroup=string \
971         [type={domain|local}] [ntgroup=string] [comment=string]
972 </programlisting>
973 </para>
974
975 </refsect3>
976
977 <refsect3>
978 <title>GROUPMAP DELETE</title>
979
980 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
981
982 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
983
984 </refsect3>
985
986 <refsect3>
987 <title>GROUPMAP MODIFY</title>
988
989 <para>Update an existing group entry.</para>
990
991 <para>
992 <programlisting>
993 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
994        [comment=string] [type={domain|local}]
995 </programlisting>
996 </para>
997 </refsect3>
998
999 <refsect3>
1000 <title>GROUPMAP LIST</title>
1001
1002 <para>List existing group mapping entries.</para>
1003
1004 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
1005
1006 </refsect3>
1007 </refsect2>
1008
1009
1010
1011 <refsect2>
1012 <title>MAXRID</title>
1013
1014 <para>Prints out the highest RID currently in use on the local
1015 server (by the active 'passdb backend').
1016 </para>
1017
1018 </refsect2>
1019
1020 <refsect2>
1021 <title>RPC INFO</title>
1022
1023 <para>Print information about the domain of the remote server,
1024 such as domain name, domain sid and number of users and groups.
1025 </para>
1026
1027 </refsect2>
1028
1029 <refsect2>
1030 <title>[RPC|ADS] TESTJOIN</title>
1031
1032 <para>Check whether participation in a domain is still valid.</para>
1033
1034 </refsect2>
1035
1036 <refsect2>
1037 <title>[RPC|ADS] CHANGETRUSTPW</title>
1038
1039 <para>Force change of domain trust password.</para>
1040
1041 </refsect2>
1042
1043 <refsect2>
1044 <title>RPC TRUSTDOM</title>
1045
1046 <refsect3>
1047 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
1048
1049 <para>Add a interdomain trust account for <replaceable>DOMAIN</replaceable>. 
1050 This is in fact a Samba account named <replaceable>DOMAIN$</replaceable> 
1051 with the account flag <constant>'I'</constant> (interdomain trust account). 
1052 This is required for incoming trusts to work. It makes Samba be a
1053 trusted domain of the foreign (trusting) domain.
1054 Users of the Samba domain will be made available in the foreign domain.
1055 If the command is used against localhost it has the same effect as 
1056 <command>smbpasswd -a -i DOMAIN</command>. Please note that both commands
1057 expect a appropriate UNIX account. 
1058 </para>
1059
1060 </refsect3>
1061
1062 <refsect3>
1063 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
1064
1065 <para>Remove interdomain trust account for 
1066 <replaceable>DOMAIN</replaceable>. If it is used against localhost 
1067 it has the same effect as <command>smbpasswd -x DOMAIN$</command>. 
1068 </para>
1069
1070 </refsect3>
1071
1072 <refsect3>
1073 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
1074
1075 <para>
1076 Establish a trust relationship to a trusted domain. 
1077 Interdomain account must already be created on the remote PDC.
1078 This is required for outgoing trusts to work. It makes Samba be a
1079 trusting domain of a foreign (trusted) domain.
1080 Users of the foreign domain will be made available in our domain.
1081 You'll need winbind and a working idmap config to make them
1082 appear in your system.
1083 </para>
1084
1085 </refsect3>
1086
1087 <refsect3>
1088 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
1089 <para>Abandon relationship to trusted domain</para>
1090
1091 </refsect3>
1092
1093 <refsect3>
1094 <title>RPC TRUSTDOM LIST</title>
1095
1096 <para>List all interdomain trust relationships.</para>
1097
1098 </refsect3>
1099 </refsect2>
1100
1101 <refsect2>
1102 <title>RPC TRUST</title>
1103
1104 <refsect3>
1105 <title>RPC TRUST CREATE</title>
1106
1107 <para>Create a trust object by calling lsaCreateTrustedDomainEx2.
1108 The can be done on a single server or on two servers at once with the
1109 possibility to use a random trust password.</para>
1110
1111 <variablelist><title>Options:</title>
1112 <varlistentry>
1113 <term>otherserver</term>
1114 <listitem><para>Domain controller of the second domain</para></listitem>
1115 </varlistentry>
1116
1117 <varlistentry>
1118 <term>otheruser</term>
1119 <listitem><para>Admin user in the second domain</para></listitem>
1120 </varlistentry>
1121
1122 <varlistentry>
1123 <term>otherdomainsid</term>
1124 <listitem><para>SID of the second domain</para></listitem>
1125 </varlistentry>
1126
1127 <varlistentry>
1128 <term>other_netbios_domain</term>
1129 <listitem><para>NetBIOS (short) name of the second domain</para></listitem>
1130 </varlistentry>
1131
1132 <varlistentry>
1133 <term>otherdomain</term>
1134 <listitem><para>DNS (full) name of the second domain</para></listitem>
1135 </varlistentry>
1136
1137 <varlistentry>
1138 <term>trustpw</term>
1139 <listitem><para>Trust password</para></listitem>
1140 </varlistentry>
1141 </variablelist>
1142
1143 <variablelist><title>Examples:</title>
1144 <varlistentry>
1145 <term>Create a trust object on srv1.dom1.dom for the domain dom2</term>
1146 <listitem><literallayout>
1147 net rpc trust create \
1148     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
1149     other_netbios_domain=dom2 \
1150     otherdomain=dom2.dom \
1151     trustpw=12345678 \
1152     -S srv1.dom1.dom
1153 </literallayout></listitem>
1154 </varlistentry>
1155 <varlistentry>
1156 <term>Create a trust relationship between dom1 and dom2</term>
1157 <listitem><literallayout>
1158 net rpc trust create \
1159     otherserver=srv2.dom2.test \
1160     otheruser=dom2adm \
1161     -S srv1.dom1.dom
1162 </literallayout></listitem>
1163 </varlistentry>
1164 </variablelist>
1165 </refsect3>
1166
1167 <refsect3>
1168 <title>RPC TRUST DELETE</title>
1169
1170 <para>Delete a trust object by calling lsaDeleteTrustedDomain.
1171 The can be done on a single server or on two servers at once.</para>
1172
1173 <variablelist><title>Options:</title>
1174 <varlistentry>
1175 <term>otherserver</term>
1176 <listitem><para>Domain controller of the second domain</para></listitem>
1177 </varlistentry>
1178
1179 <varlistentry>
1180 <term>otheruser</term>
1181 <listitem><para>Admin user in the second domain</para></listitem>
1182 </varlistentry>
1183
1184 <varlistentry>
1185 <term>otherdomainsid</term>
1186 <listitem><para>SID of the second domain</para></listitem>
1187 </varlistentry>
1188 </variablelist>
1189
1190 <variablelist><title>Examples:</title>
1191 <varlistentry>
1192 <term>Delete a trust object on srv1.dom1.dom for the domain dom2</term>
1193 <listitem><literallayout>
1194 net rpc trust delete \
1195     otherdomainsid=S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxx \
1196     -S srv1.dom1.dom
1197 </literallayout></listitem>
1198 </varlistentry>
1199 <varlistentry>
1200 <term>Delete a trust relationship between dom1 and dom2</term>
1201 <listitem><literallayout>
1202 net rpc trust delete \
1203     otherserver=srv2.dom2.test \
1204     otheruser=dom2adm \
1205     -S srv1.dom1.dom
1206 </literallayout></listitem>
1207 </varlistentry>
1208 </variablelist>
1209 </refsect3>
1210
1211 </refsect2>
1212
1213 <refsect2>
1214 <refsect3>
1215 <title>RPC RIGHTS</title>
1216
1217 <para>This subcommand is used to view and manage Samba's rights assignments (also 
1218 referred to as privileges).  There are three options currently available: 
1219 <parameter>list</parameter>, <parameter>grant</parameter>, and 
1220 <parameter>revoke</parameter>.  More details on Samba's privilege model and its use
1221 can be found in the Samba-HOWTO-Collection.</para>
1222
1223 </refsect3>
1224
1225
1226 </refsect2>
1227
1228 <refsect2>
1229 <title>RPC ABORTSHUTDOWN</title>
1230
1231 <para>Abort the shutdown of a remote server.</para>
1232
1233 </refsect2>
1234
1235 <refsect2>
1236 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
1237
1238 <para>Shut down the remote server.</para>
1239
1240 <variablelist>
1241 <varlistentry>
1242 <term>-r</term>
1243 <listitem><para>
1244 Reboot after shutdown.
1245 </para></listitem>
1246 </varlistentry>
1247
1248 <varlistentry>
1249 <term>-f</term>
1250 <listitem><para>
1251 Force shutting down all applications.
1252 </para></listitem>
1253 </varlistentry>
1254
1255 <varlistentry>
1256 <term>-t timeout</term>
1257 <listitem><para>
1258 Timeout before system will be shut down. An interactive 
1259 user of the system can use this time to cancel the shutdown.
1260 </para></listitem>
1261 </varlistentry>
1262
1263 <varlistentry>
1264 <term>-C message</term>
1265 <listitem><para>Display the specified message on the screen to 
1266 announce the shutdown.</para></listitem>
1267 </varlistentry>
1268 </variablelist>
1269
1270 </refsect2>
1271
1272 <refsect2>
1273 <title>RPC SAMDUMP</title>
1274
1275 <para>Print out sam database of remote server. You need
1276 to run this against the PDC, from a Samba machine joined as a BDC. </para>
1277 </refsect2>
1278
1279 <refsect2>
1280 <title>RPC VAMPIRE</title>
1281
1282 <para>Export users, aliases and groups from remote server to 
1283 local server.  You need to run this against the PDC, from a Samba machine joined as a BDC. 
1284 This vampire command cannot be used against an Active Directory, only
1285 against an NT4 Domain Controller.
1286 </para>
1287 </refsect2>
1288
1289 <refsect2>
1290 <title>RPC VAMPIRE KEYTAB</title>
1291
1292 <para>Dump remote SAM database to local Kerberos keytab file.
1293 </para>
1294 </refsect2>
1295
1296 <refsect2>
1297 <title>RPC VAMPIRE LDIF</title>
1298
1299 <para>Dump remote SAM database to local LDIF file or standard output.
1300 </para>
1301 </refsect2>
1302
1303 <refsect2>
1304 <title>RPC GETSID</title>
1305
1306 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
1307
1308 </refsect2>
1309
1310 <refsect2>
1311 <title>ADS LEAVE [--keep-account]</title>
1312
1313 <para>Make the remote host leave the domain it is part of. </para>
1314
1315 </refsect2>
1316
1317 <refsect2>
1318 <title>ADS STATUS</title>
1319
1320 <para>Print out status of machine account of the local machine in ADS.
1321 Prints out quite some debug info. Aimed at developers, regular 
1322 users should use <command>NET ADS TESTJOIN</command>.</para>
1323
1324 </refsect2>
1325
1326 <refsect2>
1327 <title>ADS PRINTER</title>
1328
1329 <refsect3>
1330 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
1331
1332 <para>
1333 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the 
1334 server name defaults to the local host.</para>
1335
1336 </refsect3>
1337
1338 <refsect3>
1339 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
1340
1341 <para>Publish specified printer using ADS.</para>
1342
1343 </refsect3>
1344
1345 <refsect3>
1346 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
1347
1348 <para>Remove specified printer from ADS directory.</para>
1349
1350 </refsect3>
1351
1352 </refsect2>
1353
1354 <refsect2>
1355 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
1356
1357 <para>Perform a raw LDAP search on a ADS server and dump the results. The 
1358 expression is a standard LDAP search expression, and the 
1359 attributes are a list of LDAP fields to show in the results.</para>
1360
1361 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
1362 </para>
1363
1364 </refsect2>
1365
1366 <refsect2>
1367 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
1368
1369 <para>
1370 Perform a raw LDAP search on a ADS server and dump the results. The 
1371 DN standard LDAP DN, and the attributes are a list of LDAP fields 
1372 to show in the result. 
1373 </para>
1374
1375 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
1376
1377 </refsect2>
1378
1379 <refsect2>
1380 <title>ADS KEYTAB <replaceable>CREATE</replaceable></title>
1381
1382 <para>
1383 Creates a new keytab file if one doesn't exist with default entries. Default
1384 entries are kerberos principals created from the machinename of the
1385 client, the UPN (if it exists) and any Windows SPN(s) associated with the
1386 computer AD account for the client. If a keytab file already exists then only
1387 missing kerberos principals from the default entries are added. No changes
1388 are made to the computer AD account.
1389 </para>
1390 </refsect2>
1391
1392 <refsect2>
1393 <title>ADS KEYTAB <replaceable>ADD</replaceable> <replaceable>(principal | machine | serviceclass | windows SPN</replaceable></title>
1394
1395 <para>
1396 Adds a new keytab entry, the entry can be either;
1397   <variablelist>
1398     <varlistentry><term>kerberos principal</term>
1399     <listitem><para>
1400       A kerberos principal (identified by the presence of '@') is just
1401       added to the keytab file.
1402     </para></listitem>
1403     </varlistentry>
1404     <varlistentry><term>machinename</term>
1405     <listitem><para>
1406       A machinename (identified by the trailing '$') is used to create a
1407       a kerberos principal 'machinename@realm' which is added to the
1408       keytab file.
1409     </para></listitem>
1410     </varlistentry>
1411     <varlistentry><term>serviceclass</term>
1412     <listitem><para>
1413     A serviceclass (such as 'cifs', 'html' etc.) is used to create a pair
1414     of kerberos principals 'serviceclass/fully_qualified_dns_name@realm' &amp;
1415     'serviceclass/netbios_name@realm' which are added to the keytab file.
1416     </para></listitem>
1417     </varlistentry>
1418     <varlistentry><term>Windows SPN</term>
1419     <listitem><para>
1420     A Windows SPN is of the format 'serviceclass/host:port', it is used to
1421     create a kerberos principal 'serviceclass/host@realm' which will
1422     be written to the keytab file.
1423     </para></listitem>
1424     </varlistentry>
1425   </variablelist>
1426 </para>
1427 <para>
1428 Unlike old versions no computer AD objects are modified by this command. To
1429 preserve the bevhaviour of older clients 'net ads keytab ad_update_ads' is
1430 available.
1431 </para>
1432 </refsect2>
1433
1434 <refsect2>
1435 <title>ADS KEYTAB <replaceable>ADD_UPDATE_ADS</replaceable> <replaceable>(principal | machine | serviceclass | windows SPN</replaceable></title>
1436
1437 <para>
1438 Adds a new keytab entry (see section for net ads keytab add). In addition to
1439 adding entries to the keytab file corrosponding Windows SPNs are created
1440 from the entry passed to this command. These SPN(s) added to the AD computer
1441 account object associated with the client machine running this command for
1442 the following entry types;
1443   <variablelist>
1444     <varlistentry><term>serviceclass</term>
1445     <listitem><para>
1446     A serviceclass (such as 'cifs', 'html' etc.) is used to create a
1447     pair of Windows SPN(s) 'param/full_qualified_dns' &amp;
1448     'param/netbios_name' which are added to the AD computer account object
1449    for this client.
1450     </para></listitem>
1451     </varlistentry>
1452     <varlistentry><term>Windows SPN</term>
1453     <listitem><para>
1454     A Windows SPN is of the format 'serviceclass/host:port', it is
1455     added as passed to the AD computer account object for this client.
1456     </para></listitem>
1457     </varlistentry>
1458   </variablelist>
1459 </para>
1460 </refsect2>
1461
1462 <refsect2>
1463 <title>ADS setspn <replaceable>SETSPN LIST [machine]</replaceable></title>
1464
1465 <para>
1466    Lists the Windows SPNs stored in the 'machine' Windows AD Computer object.
1467    If 'machine' is not specified then computer account for this client is used
1468    instead.
1469 </para>
1470 </refsect2>
1471
1472 <refsect2>
1473 <title>ADS setspn <replaceable>SETSPN ADD SPN [machine]</replaceable></title>
1474
1475 <para>
1476    Adds the specified Windows SPN to the 'machine' Windows AD Computer object.
1477    If 'machine' is not specified then computer account for this client is used
1478    instead.
1479 </para>
1480 </refsect2>
1481
1482
1483 <refsect2>
1484 <title>ADS setspn <replaceable>SETSPN DELETE SPN [machine]</replaceable></title>
1485
1486 <para>
1487    DELETE the specified Window SPN from the 'machine' Windows AD Computer
1488    object. If 'machine' is not specified then computer account for this
1489    client is used
1490    instead.
1491 </para>
1492
1493 </refsect2>
1494
1495 <refsect2>
1496 <title>ADS WORKGROUP</title>
1497
1498 <para>Print out workgroup name for specified kerberos realm.</para>
1499
1500 </refsect2>
1501
1502 <refsect2>
1503         <title>ADS ENCTYPES</title>
1504
1505 <para>
1506         List, modify or delete the value of the "msDS-SupportedEncryptionTypes" attribute of an account in AD.
1507 </para>
1508
1509 <para>
1510         This attribute allows one to control which Kerberos encryption types are used for the generation of initial and service tickets. The value consists of an integer bitmask with the following values:
1511 </para>
1512
1513 <para>0x00000001 DES-CBC-CRC</para>
1514 <para>0x00000002 DES-CBC-MD5</para>
1515 <para>0x00000004 RC4-HMAC</para>
1516 <para>0x00000008 AES128-CTS-HMAC-SHA1-96</para>
1517 <para>0x00000010 AES256-CTS-HMAC-SHA1-96</para>
1518
1519 </refsect2>
1520
1521 <refsect2>
1522         <title>ADS ENCTYPES LIST <replaceable>&lt;ACCOUNTNAME&gt;</replaceable></title>
1523
1524 <para>
1525         List the value of the "msDS-SupportedEncryptionTypes" attribute of a given account.
1526 </para>
1527
1528 <para>Example: <userinput>net ads enctypes list Computername</userinput></para>
1529
1530 </refsect2>
1531
1532 <refsect2>
1533         <title>ADS ENCTYPES SET <replaceable>&lt;ACCOUNTNAME&gt;</replaceable> <replaceable>[enctypes]</replaceable></title>
1534
1535 <para>
1536         Set the value of the "msDS-SupportedEncryptionTypes" attribute of the LDAP object of ACCOUNTNAME to a given value. If the value is omitted, the value is set to 31 which enables all the currently supported encryption types.
1537 </para>
1538
1539 <para>Example: <userinput>net ads enctypes set Computername 24</userinput></para>
1540
1541 </refsect2>
1542
1543 <refsect2>
1544         <title>ADS ENCTYPES DELETE <replaceable>&lt;ACCOUNTNAME&gt;</replaceable></title>
1545
1546 <para>
1547         Deletes the "msDS-SupportedEncryptionTypes" attribute of the LDAP object of ACCOUNTNAME.
1548 </para>
1549
1550 <para>Example: <userinput>net ads enctypes set Computername 24</userinput></para>
1551
1552 </refsect2>
1553
1554
1555 <refsect2>
1556 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
1557
1558 <para>
1559 (Re)Create a BUILTIN group.
1560 Only a wellknown set of BUILTIN groups can be created with this command.
1561 This is the list of currently recognized group names: Administrators,
1562 Users, Guests, Power Users, Account Operators, Server Operators, Print
1563 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
1564 compatible Access.
1565
1566 This command requires a running Winbindd with idmap allocation properly
1567 configured. The group gid will be allocated out of the winbindd range.
1568 </para>
1569
1570 </refsect2>
1571
1572 <refsect2>
1573 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
1574
1575 <para>
1576 Create a LOCAL group (also known as Alias).
1577
1578 This command requires a running Winbindd with idmap allocation properly
1579 configured. The group gid will be allocated out of the winbindd range.
1580 </para>
1581
1582 </refsect2>
1583
1584 <refsect2>
1585 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
1586
1587 <para>
1588 Delete an existing LOCAL group (also known as Alias).
1589
1590 </para>
1591
1592 </refsect2>
1593
1594 <refsect2>
1595 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
1596
1597 <para>
1598 Map an existing Unix group and make it a Domain Group, the domain group
1599 will have the same name.
1600 </para>
1601
1602 </refsect2>
1603
1604 <refsect2>
1605 <title>SAM UNMAPUNIXGROUP &lt;NAME&gt;</title>
1606
1607 <para>
1608 Remove an existing group mapping entry.
1609 </para>
1610
1611 </refsect2>
1612
1613 <refsect2>
1614 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1615
1616 <para>
1617 Add a member to a Local group. The group can be specified only by name,
1618 the member can be specified by name or SID.
1619 </para>
1620
1621 </refsect2>
1622
1623 <refsect2>
1624 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1625
1626 <para>
1627 Remove a member from a Local group. The group and the member must be
1628 specified by name.
1629 </para>
1630
1631 </refsect2>
1632
1633 <refsect2>
1634 <title>SAM LISTMEM &lt;GROUP&gt;</title>
1635
1636 <para>
1637 List Local group members. The group must be specified by name.
1638 </para>
1639
1640 </refsect2>
1641
1642 <refsect2>
1643 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
1644
1645 <para>
1646 List the specified set of accounts by name. If verbose is specified,
1647 the rid and description is also provided for each account.
1648 </para>
1649
1650 </refsect2>
1651
1652 <refsect2>
1653 <title>SAM RIGHTS LIST</title>
1654
1655 <para>
1656 List all available privileges.
1657 </para>
1658
1659 </refsect2>
1660
1661 <refsect2>
1662 <title>SAM RIGHTS GRANT &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1663
1664 <para>
1665 Grant one or more privileges to a user.
1666 </para>
1667
1668 </refsect2>
1669
1670 <refsect2>
1671 <title>SAM RIGHTS REVOKE &lt;NAME&gt; &lt;PRIVILEGE&gt;</title>
1672
1673 <para>
1674 Revoke one or more privileges from a user.
1675 </para>
1676
1677 </refsect2>
1678
1679 <refsect2>
1680 <title>SAM SHOW &lt;NAME&gt;</title>
1681
1682 <para>
1683 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1684 account.
1685 </para>
1686
1687 </refsect2>
1688
1689 <refsect2>
1690 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1691
1692 <para>
1693 Set the home directory for a user account.
1694 </para>
1695
1696 </refsect2>
1697
1698 <refsect2>
1699 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1700
1701 <para>
1702 Set the profile path for a user account.
1703 </para>
1704
1705 </refsect2>
1706
1707 <refsect2>
1708 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1709
1710 <para>
1711 Set the comment for a user or group account.
1712 </para>
1713
1714 </refsect2>
1715
1716 <refsect2>
1717 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1718
1719 <para>
1720 Set the full name for a user account.
1721 </para>
1722
1723 </refsect2>
1724
1725 <refsect2>
1726 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1727
1728 <para>
1729 Set the logon script for a user account.
1730 </para>
1731
1732 </refsect2>
1733
1734 <refsect2>
1735 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1736
1737 <para>
1738 Set the home drive for a user account.
1739 </para>
1740
1741 </refsect2>
1742
1743 <refsect2>
1744 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1745
1746 <para>
1747 Set the workstations a user account is allowed to log in from.
1748 </para>
1749
1750 </refsect2>
1751
1752 <refsect2>
1753 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1754
1755 <para>
1756 Set the "disabled" flag for a user account.
1757 </para>
1758
1759 </refsect2>
1760
1761 <refsect2>
1762 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1763
1764 <para>
1765 Set the "password not required" flag for a user account.
1766 </para>
1767
1768 </refsect2>
1769
1770 <refsect2>
1771 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1772
1773 <para>
1774 Set the "autolock" flag for a user account.
1775 </para>
1776
1777 </refsect2>
1778
1779 <refsect2>
1780 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1781
1782 <para>
1783 Set the "password do not expire" flag for a user account.
1784 </para>
1785
1786 </refsect2>
1787
1788 <refsect2>
1789 <title>SAM SET PWDMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1790
1791 <para>
1792 Set or unset the "password must change" flag for a user account.
1793 </para>
1794
1795 </refsect2>
1796
1797 <refsect2>
1798 <title>SAM POLICY LIST</title>
1799
1800 <para>
1801 List the available account policies.
1802 </para>
1803
1804 </refsect2>
1805
1806 <refsect2>
1807 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1808
1809 <para>
1810 Show the account policy value.
1811 </para>
1812
1813 </refsect2>
1814
1815 <refsect2>
1816 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1817
1818 <para>
1819 Set a value for the account policy.
1820 Valid values can be: "forever", "never", "off", or a number.
1821 </para>
1822
1823 </refsect2>
1824
1825 <refsect2>
1826 <title>SAM PROVISION</title>
1827
1828 <para>
1829 Only available if ldapsam:editposix is set and winbindd is running.
1830 Properly populates the ldap tree with the basic accounts (Administrator)
1831 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1832 </para>
1833
1834 </refsect2>
1835
1836 <refsect2>
1837 <title>IDMAP DUMP &lt;local tdb file name&gt;</title>
1838
1839 <para>
1840 Dumps the mappings contained in the local tdb file specified.
1841 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1842 </para>
1843
1844 </refsect2>
1845
1846 <refsect2>
1847 <title>IDMAP RESTORE [input file]</title>
1848
1849 <para>
1850 Restore the mappings from the specified file or stdin.
1851 </para>
1852
1853 </refsect2>
1854
1855 <refsect2>
1856 <title>IDMAP SET SECRET &lt;DOMAIN&gt; &lt;secret&gt;</title>
1857
1858 <para>
1859 Store a secret for the specified domain, used primarily for domains
1860 that use idmap_ldap as a backend. In this case the secret is used
1861 as the password for the user DN used to bind to the ldap server.
1862 </para>
1863
1864 </refsect2>
1865
1866 <refsect2>
1867 <title>IDMAP SET RANGE &lt;RANGE&gt; &lt;SID&gt; [index] [--db=&lt;DB&gt;]</title>
1868
1869 <para>
1870 Store a domain-range mapping for a given domain (and index) in autorid database.
1871 </para>
1872
1873 </refsect2>
1874
1875 <refsect2>
1876 <title>IDMAP SET CONFIG &lt;config&gt; [--db=&lt;DB&gt;]</title>
1877
1878 <para>
1879 Update CONFIG entry in autorid database.
1880 </para>
1881
1882 </refsect2>
1883
1884 <refsect2>
1885 <title>IDMAP GET RANGE &lt;SID&gt; [index] [--db=&lt;DB&gt;]</title>
1886
1887 <para>
1888 Get the range for a given domain and index from autorid database.
1889 </para>
1890
1891 </refsect2>
1892
1893 <refsect2>
1894 <title>IDMAP GET RANGES [&lt;SID&gt;] [--db=&lt;DB&gt;]</title>
1895
1896 <para>
1897 Get ranges for all domains or for one identified by given SID.
1898 </para>
1899
1900 </refsect2>
1901
1902 <refsect2>
1903 <title>IDMAP GET CONFIG [--db=&lt;DB&gt;]</title>
1904
1905 <para>
1906 Get CONFIG entry from autorid database.
1907 </para>
1908
1909 </refsect2>
1910
1911 <refsect2>
1912
1913 <title>IDMAP DELETE MAPPING [-f] [--db=&lt;DB&gt;] &lt;ID&gt;</title>
1914
1915 <para>
1916 Delete a mapping sid &lt;-&gt; gid or sid &lt;-&gt; uid from the IDMAP database.
1917 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".
1918 Use -f to delete an invalid partial mapping &lt;ID&gt; -&gt; xx
1919 </para>
1920 <para>
1921   Use "smbcontrol all idmap ..." to notify running smbd instances.
1922   See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
1923   <manvolnum>1</manvolnum></citerefentry> manpage for details.
1924 </para>
1925 </refsect2>
1926
1927 <refsect2>
1928 <title>IDMAP DELETE RANGE [-f] [--db=&lt;TDB&gt;] &lt;RANGE&gt;|(&lt;SID&gt; [&lt;INDEX&gt;])</title>
1929
1930 <para>
1931 Delete a domain range mapping identified by 'RANGE' or "domain SID and INDEX" from autorid database.
1932 Use -f to delete invalid mappings.
1933 </para>
1934
1935 </refsect2>
1936
1937 <refsect2>
1938 <title>IDMAP DELETE RANGES [-f] [--db=&lt;TDB&gt;] &lt;SID&gt;</title>
1939
1940 <para>
1941 Delete all domain range mappings for a domain identified by SID.
1942 Use -f to delete invalid mappings.
1943 </para>
1944
1945 </refsect2>
1946
1947 <refsect2>
1948
1949 <title>IDMAP CHECK [-v] [-r] [-a] [-T] [-f] [-l] [--db=&lt;DB&gt;]</title>
1950
1951 <para>
1952   Check and repair the IDMAP database. If no option is given a read only check
1953   of the database is done. Among others an interactive or automatic repair mode
1954   may be chosen with one of the following options:
1955
1956   <variablelist>
1957     <varlistentry><term>-r|--repair</term>
1958     <listitem><para>
1959       Interactive repair mode, ask a lot of questions.
1960     </para></listitem>
1961     </varlistentry>
1962
1963     <varlistentry><term>-a|--auto</term>
1964     <listitem><para>
1965       Noninteractive repair mode, use default answers.
1966     </para></listitem>
1967     </varlistentry>
1968
1969     <varlistentry><term>-v|--verbose</term>
1970       <listitem><para>
1971         Produce more output.
1972       </para></listitem>
1973     </varlistentry>
1974
1975     <varlistentry><term>-f|--force</term>
1976       <listitem><para>
1977         Try to apply changes, even if they do not apply cleanly.
1978       </para></listitem>
1979     </varlistentry>
1980
1981     <varlistentry><term>-T|--test</term>
1982       <listitem><para>
1983         Dry run, show what changes would be made but don't touch anything.
1984       </para></listitem>
1985     </varlistentry>
1986
1987     <varlistentry><term>-l|--lock</term>
1988       <listitem><para>
1989         Lock the database while doing the check.
1990       </para></listitem>
1991     </varlistentry>
1992
1993     <varlistentry><term>--db &lt;DB&gt;</term>
1994       <listitem><para>
1995         Check the specified database.
1996       </para></listitem>
1997     </varlistentry>
1998     <varlistentry><term></term>
1999       <listitem><para>
2000       </para></listitem>
2001     </varlistentry>
2002   </variablelist>
2003
2004   It reports about the finding of the following errors:
2005
2006   <variablelist>
2007     <varlistentry><term>Missing reverse mapping:</term>
2008     <listitem><para>
2009       A record with mapping A-&gt;B where there is no B-&gt;A. Default action
2010       in repair mode is to "fix" this by adding the reverse mapping.
2011     </para></listitem>
2012     </varlistentry>
2013
2014     <varlistentry><term>Invalid mapping:</term>
2015     <listitem><para>
2016       A record with mapping A-&gt;B where B-&gt;C. Default action
2017       is to "delete" this record.
2018     </para></listitem>
2019   </varlistentry>
2020
2021   <varlistentry><term>Missing or invalid HWM:</term>
2022     <listitem><para>
2023       A high water mark is not at least equal to the largest ID in the
2024       database. Default action is to "fix" this by setting it to the
2025       largest ID found +1.
2026     </para></listitem>
2027   </varlistentry>
2028
2029   <varlistentry><term>Invalid record:</term>
2030     <listitem><para>
2031       Something we failed to parse. Default action is to "edit" it
2032       in interactive and "delete" it in automatic mode.
2033     </para></listitem>
2034   </varlistentry>
2035 </variablelist>
2036 </para>
2037 </refsect2>
2038
2039
2040 <refsect2>
2041 <title>USERSHARE</title>
2042
2043 <para>Starting with version 3.0.23, a Samba server now supports the ability for
2044 non-root users to add user defined shares to be exported using the "net usershare"
2045 commands.
2046 </para>
2047
2048 <para>
2049 To set this up, first set up your smb.conf by adding to the [global] section:
2050
2051 usershare path = /usr/local/samba/lib/usershares
2052
2053 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
2054 set the group owner to the UNIX group who should have the ability to create usershares,
2055 for example a group called "serverops".
2056
2057 Set the permissions on /usr/local/samba/lib/usershares to 01770.
2058
2059 (Owner and group all access, no access for others, plus the sticky bit,
2060 which means that a file in that directory can be renamed or deleted only
2061 by the owner of the file).
2062
2063 Finally, tell smbd how many usershares you will allow by adding to the [global]
2064 section of smb.conf a line such as :
2065
2066 usershare max shares = 100.
2067
2068 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
2069 can create user defined shares on demand using the commands below.
2070 </para>
2071
2072 <para>The usershare commands are:
2073
2074 <simplelist>
2075 <member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
2076 <member>net usershare delete sharename - to delete a user defined share.</member>
2077 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
2078 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
2079 </simplelist>
2080
2081 </para>
2082
2083 <refsect3>
2084 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
2085
2086 <para>
2087 Add or replace a new user defined share, with name "sharename".
2088 </para>
2089
2090 <para>
2091 "path" specifies the absolute pathname on the system to be exported.
2092 Restrictions may be put on this, see the global smb.conf parameters:
2093 "usershare owner only", "usershare prefix allow list", and
2094 "usershare prefix deny list".
2095 </para>
2096
2097 <para>
2098 The optional "comment" parameter is the comment that will appear
2099 on the share when browsed to by a client.
2100 </para>
2101
2102 <para>The optional "acl" field
2103 specifies which users have read and write access to the entire share.
2104 Note that guest connections are not allowed unless the smb.conf parameter
2105 "usershare allow guests" has been set. The definition of a user
2106 defined share acl is: "user:permission", where user is a valid
2107 username on the system and permission can be "F", "R", or "D".
2108 "F" stands for "full permissions", ie. read and write permissions.
2109 "D" stands for "deny" for a user, ie. prevent this user from accessing
2110 this share.
2111 "R" stands for "read only", ie. only allow read access to this
2112 share (no creation of new files or directories or writing to files).
2113 </para>
2114
2115 <para>
2116 The default if no "acl" is given is "Everyone:R", which means any 
2117 authenticated user has read-only access.
2118 </para>
2119
2120 <para>
2121 The optional "guest_ok" has the same effect as the parameter of the
2122 same name in smb.conf, in that it allows guest access to this user
2123 defined share. This parameter is only allowed if the global parameter
2124 "usershare allow guests" has been set to true in the smb.conf.
2125 </para>
2126
2127 There is no separate command to modify an existing user defined share,
2128 just use the "net usershare add [sharename]" command using the same
2129 sharename as the one you wish to modify and specify the new options
2130 you wish. The Samba smbd daemon notices user defined share modifications
2131 at connect time so will see the change immediately, there is no need
2132 to restart smbd on adding, deleting or changing a user defined share.
2133 </refsect3>
2134
2135 <refsect3>
2136 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
2137
2138 <para>
2139 Deletes the user defined share by name. The Samba smbd daemon
2140 immediately notices this change, although it will not disconnect
2141 any users currently connected to the deleted share.
2142 </para>
2143
2144 </refsect3>
2145
2146 <refsect3>
2147 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
2148
2149 <para>
2150 Get info on user defined shares owned by the current user matching the given pattern, or all users.
2151 </para>
2152
2153 <para>
2154 net usershare info on its own dumps out info on the user defined shares that were
2155 created by the current user, or restricts them to share names that match the given
2156 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
2157 If the '-l' or '--long' option is also given, it prints out info on user defined
2158 shares created by other users.
2159 </para>
2160
2161 <para>
2162 The information given about a share looks like:
2163
2164 [foobar]
2165 path=/home/jeremy
2166 comment=testme
2167 usershare_acl=Everyone:F
2168 guest_ok=n
2169
2170 And is a list of the current settings of the user defined share that can be
2171 modified by the "net usershare add" command.
2172 </para>
2173
2174 </refsect3>
2175
2176 <refsect3>
2177 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
2178
2179 <para>
2180 List all the user defined shares owned by the current user matching the given pattern, or all users.
2181 </para>
2182
2183 <para>
2184 net usershare list on its own list out the names of the user defined shares that were
2185 created by the current user, or restricts the list to share names that match the given
2186 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
2187 If the '-l' or '--long' option is also given, it includes the names of user defined
2188 shares created by other users.
2189 </para>
2190
2191 </refsect3>
2192
2193 </refsect2>
2194
2195 <refsect2>
2196 <title>[RPC] CONF</title>
2197
2198 <para>Starting with version 3.2.0, a Samba server can be configured by data
2199 stored in registry. This configuration data can be edited with the new "net
2200 conf" commands. There is also the possibility to configure a remote Samba server
2201 by enabling the RPC conf mode and specifying the address of the remote server.
2202 </para>
2203
2204 <para>
2205 The deployment of this configuration data can be activated in two levels from the
2206 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
2207 activated by setting <parameter>registry shares</parameter> to
2208 <quote>yes</quote> in the [global] section and global configuration options are
2209 activated by setting <smbconfoption name="include">registry</smbconfoption> in
2210 the [global] section for a mixed configuration or by setting
2211 <smbconfoption name="config backend">registry</smbconfoption> in the [global]
2212 section for a registry-only configuration.
2213 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
2214 <manvolnum>5</manvolnum></citerefentry> manpage for details.
2215 </para>
2216
2217 <para>The conf commands are:
2218 <simplelist>
2219 <member>net [rpc] conf list - Dump the complete configuration in smb.conf like
2220 format.</member>
2221 <member>net [rpc] conf import - Import configuration from file in smb.conf
2222 format.</member>
2223 <member>net [rpc] conf listshares - List the registry shares.</member>
2224 <member>net [rpc] conf drop - Delete the complete configuration from
2225 registry.</member>
2226 <member>net [rpc] conf showshare - Show the definition of a registry share.</member>
2227 <member>net [rpc] conf addshare - Create a new registry share.</member>
2228 <member>net [rpc] conf delshare - Delete a registry share.</member>
2229 <member>net [rpc] conf setparm - Store a parameter.</member>
2230 <member>net [rpc] conf getparm - Retrieve the value of a parameter.</member>
2231 <member>net [rpc] conf delparm - Delete a parameter.</member>
2232 <member>net [rpc] conf getincludes - Show the includes of a share definition.</member>
2233 <member>net [rpc] conf setincludes - Set includes for a share.</member>
2234 <member>net [rpc] conf delincludes - Delete includes from a share definition.</member>
2235 </simplelist>
2236 </para>
2237
2238 <refsect3>
2239 <title>[RPC] CONF LIST</title>
2240
2241 <para>
2242 Print the configuration data stored in the registry in a smb.conf-like format to
2243 standard output.
2244 </para>
2245 </refsect3>
2246
2247 <refsect3>
2248 <title>[RPC] CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
2249
2250 <para>
2251 This command imports configuration from a file in smb.conf format.
2252 If a section encountered in the input file is present in registry,
2253 its contents is replaced. Sections of registry configuration that have
2254 no counterpart in the input file are not affected. If you want to delete these,
2255 you will have to use the "net conf drop" or "net conf delshare" commands.
2256 Optionally, a section may be specified to restrict the effect of the
2257 import command to that specific section. A test mode is enabled by specifying
2258 the parameter "-T" on the commandline. In test mode, no changes are made to the
2259 registry, and the resulting configuration is printed to standard output instead.
2260 </para>
2261 </refsect3>
2262
2263 <refsect3>
2264 <title>[RPC] CONF LISTSHARES</title>
2265
2266 <para>
2267 List the names of the shares defined in registry.
2268 </para>
2269 </refsect3>
2270
2271 <refsect3>
2272 <title>[RPC] CONF DROP</title>
2273
2274 <para>
2275 Delete the complete configuration data from registry.
2276 </para>
2277 </refsect3>
2278
2279 <refsect3>
2280 <title>[RPC] CONF SHOWSHARE <replaceable>sharename</replaceable></title>
2281
2282 <para>
2283 Show the definition of the share or section specified. It is valid to specify
2284 "global" as sharename to retrieve the global configuration options from
2285 registry.
2286 </para>
2287 </refsect3>
2288
2289 <refsect3>
2290 <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>
2291
2292 <para>Create a new share definition in registry.
2293 The sharename and path have to be given. The share name may
2294 <emphasis>not</emphasis> be "global". Optionally, values for the very
2295 common options "writeable", "guest ok" and a "comment" may be specified.
2296 The same result may be obtained by a sequence of "net conf setparm"
2297 commands.
2298 </para>
2299 </refsect3>
2300
2301 <refsect3>
2302 <title>[RPC] CONF DELSHARE <replaceable>sharename</replaceable></title>
2303
2304 <para>
2305 Delete a share definition from registry.
2306 </para>
2307 </refsect3>
2308
2309 <refsect3>
2310 <title>[RPC] CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
2311
2312 <para>
2313 Store a parameter in registry. The section may be global or a sharename.
2314 The section is created if it does not exist yet.
2315 </para>
2316 </refsect3>
2317
2318 <refsect3>
2319 <title>[RPC] CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2320
2321 <para>
2322 Show a parameter stored in registry.
2323 </para>
2324 </refsect3>
2325
2326 <refsect3>
2327 <title>[RPC] CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
2328
2329 <para>
2330 Delete a parameter stored in registry.
2331 </para>
2332 </refsect3>
2333
2334 <refsect3>
2335 <title>[RPC] CONF GETINCLUDES <replaceable>section</replaceable></title>
2336
2337 <para>
2338 Get the list of includes for the provided section (global or share).
2339 </para>
2340
2341 <para>
2342 Note that due to the nature of the registry database and the nature of include directives,
2343 the includes need special treatment: Parameters are stored in registry by the parameter
2344 name as valuename, so there is only ever one instance of a parameter per share.
2345 Also, a specific order like in a text file is not guaranteed. For all real
2346 parameters, this is perfectly ok, but the include directive is rather a meta
2347 parameter, for which, in the smb.conf text file, the place where it is specified
2348 between the other parameters is very important. This can not be achieved by the
2349 simple registry smbconf data model, so there is one ordered list of includes
2350 per share, and this list is evaluated after all the parameters of the share.
2351 </para>
2352
2353 <para>
2354 Further note that currently, only files can be included from registry
2355 configuration. In the future, there will be the ability to include configuration
2356 data from other registry keys.
2357 </para>
2358 </refsect3>
2359
2360 <refsect3>
2361 <title>[RPC] CONF SETINCLUDES <replaceable>section</replaceable> [<replaceable>filename</replaceable>]+</title>
2362
2363 <para>
2364 Set the list of includes for the provided section (global or share) to the given
2365 list of one or more filenames. The filenames may contain the usual smb.conf
2366 macros like %I.
2367 </para>
2368 </refsect3>
2369
2370 <refsect3>
2371 <title>[RPC] CONF DELINCLUDES <replaceable>section</replaceable></title>
2372
2373 <para>
2374 Delete the list of includes from the provided section (global or share).
2375 </para>
2376 </refsect3>
2377
2378 </refsect2>
2379
2380 <refsect2>
2381 <title>REGISTRY</title>
2382 <para>
2383 Manipulate Samba's registry.
2384 </para>
2385
2386 <para>The registry commands are:
2387 <simplelist>
2388 <member>net registry enumerate   - Enumerate registry keys and values.</member>
2389 <member>net registry enumerate_recursive - Enumerate registry key and its subkeys.</member>
2390 <member>net registry createkey   - Create a new registry key.</member>
2391 <member>net registry deletekey   - Delete a registry key.</member>
2392 <member>net registry deletekey_recursive - Delete a registry key with subkeys.</member>
2393 <member>net registry getvalue    - Print a registry value.</member>
2394 <member>net registry getvalueraw - Print a registry value (raw format).</member>
2395 <member>net registry setvalue    - Set a new registry value.</member>
2396 <member>net registry increment   - Increment a DWORD registry value under a lock.
2397 </member>
2398 <member>net registry deletevalue - Delete a registry value.</member>
2399 <member>net registry getsd       - Get security descriptor.</member>
2400 <member>net registry getsd_sdd1  - Get security descriptor in sddl format.
2401 </member>
2402 <member>net registry setsd_sdd1  - Set security descriptor from sddl format
2403 string.</member>
2404 <member>net registry import      - Import a registration entries (.reg) file.
2405 </member>
2406 <member>net registry export      - Export a registration entries (.reg) file.
2407 </member>
2408 <member>net registry convert     - Convert a registration entries (.reg) file.
2409 </member>
2410 <member>net registry check       - Check and repair a registry database.
2411 </member>
2412 </simplelist>
2413 </para>
2414
2415 <refsect3>
2416   <title>REGISTRY ENUMERATE <replaceable>key</replaceable> </title>
2417   <para>Enumerate subkeys and values of <emphasis>key</emphasis>.
2418   </para>
2419 </refsect3>
2420
2421 <refsect3>
2422   <title>REGISTRY ENUMERATE_RECURSIVE <replaceable>key</replaceable> </title>
2423   <para>Enumerate values of <emphasis>key</emphasis> and its subkeys.
2424   </para>
2425 </refsect3>
2426
2427 <refsect3>
2428   <title>REGISTRY CREATEKEY <replaceable>key</replaceable> </title>
2429   <para>Create a new <emphasis>key</emphasis> if not yet existing.
2430   </para>
2431 </refsect3>
2432
2433 <refsect3>
2434   <title>REGISTRY DELETEKEY <replaceable>key</replaceable> </title>
2435   <para>Delete the given <emphasis>key</emphasis> and its
2436   values from the registry, if it has no subkeys.
2437   </para>
2438 </refsect3>
2439
2440 <refsect3>
2441   <title>REGISTRY DELETEKEY_RECURSIVE <replaceable>key</replaceable> </title>
2442   <para>Delete the given <emphasis>key</emphasis> and all of its
2443   subkeys and values from the registry.
2444   </para>
2445 </refsect3>
2446
2447 <refsect3>
2448   <title>REGISTRY GETVALUE <replaceable>key</replaceable> <!--
2449   --><replaceable>name</replaceable></title>
2450
2451   <para>Output type and actual value of the value <emphasis>name</emphasis>
2452   of the given <emphasis>key</emphasis>.
2453   </para>
2454 </refsect3>
2455
2456 <refsect3>
2457   <title>REGISTRY GETVALUERAW <replaceable>key</replaceable> <!--
2458   --><replaceable>name</replaceable></title>
2459   <para>Output the actual value of the value <emphasis>name</emphasis>
2460   of the given <emphasis>key</emphasis>.
2461   </para>
2462 </refsect3>
2463
2464 <refsect3>
2465   <title>REGISTRY SETVALUE <replaceable>key</replaceable> <!--
2466   --><replaceable>name</replaceable> <replaceable>type</replaceable> <!--
2467   --><replaceable>value</replaceable> ...<!--
2468   --></title>
2469
2470   <para>Set the value <emphasis>name</emphasis>
2471   of an existing <emphasis>key</emphasis>.
2472   <emphasis>type</emphasis> may be one of
2473   <emphasis>sz</emphasis>, <emphasis>multi_sz</emphasis> or
2474   <emphasis>dword</emphasis>.
2475   In case of <emphasis>multi_sz</emphasis> <replaceable>value</replaceable> may
2476   be given multiple times.
2477   </para>
2478 </refsect3>
2479
2480 <refsect3>
2481   <title>REGISTRY INCREMENT <replaceable>key</replaceable> <!--
2482   --><replaceable>name</replaceable> <replaceable>[inc]</replaceable><!--
2483   --></title>
2484
2485   <para>Increment the DWORD value <emphasis>name</emphasis>
2486   of <emphasis>key</emphasis> by <replaceable>inc</replaceable>
2487   while holding a g_lock.
2488   <emphasis>inc</emphasis> defaults to 1.
2489   </para>
2490 </refsect3>
2491
2492 <refsect3>
2493   <title>REGISTRY DELETEVALUE <replaceable>key</replaceable> <!--
2494   --><replaceable>name</replaceable></title>
2495
2496   <para>Delete the value <emphasis>name</emphasis>
2497   of the given <emphasis>key</emphasis>.
2498   </para>
2499 </refsect3>
2500
2501 <refsect3>
2502   <title>REGISTRY GETSD <replaceable>key</replaceable></title>
2503
2504   <para>Get the security descriptor of the given <emphasis>key</emphasis>.
2505   </para>
2506 </refsect3>
2507
2508 <refsect3>
2509   <title>REGISTRY GETSD_SDDL <replaceable>key</replaceable></title>
2510
2511   <para>Get the security descriptor of the given <emphasis>key</emphasis> as a
2512   Security Descriptor Definition Language (SDDL) string.
2513   </para>
2514 </refsect3>
2515
2516 <refsect3>
2517   <title>REGISTRY SETSD_SDDL <replaceable>key</replaceable><!--
2518   --><replaceable>sd</replaceable></title>
2519
2520   <para>Set the security descriptor of the given <emphasis>key</emphasis> from a
2521   Security Descriptor Definition Language (SDDL) string <emphasis>sd</emphasis>.
2522   </para>
2523 </refsect3>
2524
2525 <refsect3>
2526   <title>REGISTRY IMPORT <replaceable>file</replaceable><!--
2527   --><replaceable> [--precheck &lt;check-file&gt;] [opt]</replaceable></title>
2528   <para>Import a registration entries (.reg) <emphasis>file</emphasis>.</para>
2529   <para>The following options are available:</para>
2530   <variablelist>
2531     <varlistentry><term>--precheck <replaceable>check-file</replaceable></term>
2532     <listitem><para>
2533       This is a mechanism to check the existence or non-existence of
2534       certain keys or values specified in a precheck file before applying
2535       the import file.
2536       The import file will only be applied if the precheck succeeds.
2537     </para>
2538     <para>
2539       The check-file follows the normal registry file syntax with the
2540       following semantics:
2541     </para>
2542       <itemizedlist>
2543         <listitem><para>&lt;value name&gt;=&lt;value&gt; checks whether the
2544           value exists and has the given value.</para></listitem>
2545         <listitem><para>&lt;value name&gt;=- checks whether the value does
2546           not exist.</para></listitem>
2547         <listitem><para>[key] checks whether the key exists.</para>
2548         </listitem>
2549         <listitem><para>[-key] checks whether the key does not exist.</para>
2550         </listitem>
2551       </itemizedlist>
2552     </listitem>
2553     </varlistentry>
2554   </variablelist>
2555 </refsect3>
2556
2557 <refsect3>
2558   <title>REGISTRY EXPORT <replaceable>key</replaceable><!--
2559   --><replaceable>file</replaceable><!--
2560   --><replaceable>[opt]</replaceable></title>
2561
2562   <para>Export a <emphasis>key</emphasis> to a registration entries (.reg)
2563   <emphasis>file</emphasis>.
2564   </para>
2565 </refsect3>
2566
2567 <refsect3>
2568   <title>REGISTRY CONVERT <replaceable>in</replaceable> <!--
2569   --><replaceable>out</replaceable> <!--
2570   --><replaceable>[[inopt] outopt]</replaceable></title>
2571
2572   <para>Convert a registration entries (.reg) file <emphasis>in</emphasis>.
2573   </para>
2574 </refsect3>
2575
2576 <refsect3>
2577   <title>REGISTRY CHECK [-ravTl] [-o &lt;ODB&gt;] [--wipe] [&lt;DB&gt;]</title>
2578   <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
2579
2580   <variablelist>
2581     <varlistentry><term>-r|--repair</term>
2582     <listitem><para>
2583       Interactive repair mode, ask a lot of questions.
2584     </para></listitem>
2585     </varlistentry>
2586
2587     <varlistentry><term>-a|--auto</term>
2588     <listitem><para>
2589       Noninteractive repair mode, use default answers.
2590     </para></listitem>
2591     </varlistentry>
2592
2593     <varlistentry><term>-v|--verbose</term>
2594       <listitem><para>
2595         Produce more output.
2596       </para></listitem>
2597     </varlistentry>
2598
2599     <varlistentry><term>-T|--test</term>
2600       <listitem><para>
2601         Dry run, show what changes would be made but don't touch anything.
2602       </para></listitem>
2603     </varlistentry>
2604
2605     <varlistentry><term>-l|--lock</term>
2606       <listitem><para>
2607         Lock the database while doing the check.
2608       </para></listitem>
2609     </varlistentry>
2610
2611    <varlistentry><term>--reg-version={1,2,3}</term>
2612       <listitem><para>
2613         Specify the format of the registry database. If not given it defaults to
2614         the value of the binary or, if an registry.tdb is explizitly stated at
2615         the commandline, to the value found in the INFO/version record.
2616       </para></listitem>
2617     </varlistentry>
2618
2619     <varlistentry><term>[--db] &lt;DB&gt;</term>
2620       <listitem><para>
2621         Check the specified database.
2622       </para></listitem>
2623     </varlistentry>
2624
2625     <varlistentry><term>-o|--output &lt;ODB&gt;</term>
2626       <listitem><para>
2627         Create a new registry database &lt;ODB&gt; instead of modifying the
2628         input. If &lt;ODB&gt; is already existing --wipe may be used to
2629         overwrite it.
2630       </para></listitem>
2631     </varlistentry>
2632
2633    <varlistentry><term>--wipe</term>
2634       <listitem><para>
2635         Replace the registry database instead of modifying the input or
2636         overwrite an existing output database.
2637       </para></listitem>
2638     </varlistentry>
2639
2640     <varlistentry><term></term>
2641       <listitem><para>
2642       </para></listitem>
2643     </varlistentry>
2644   </variablelist>
2645   </para>
2646 </refsect3>
2647
2648 </refsect2>
2649
2650 <refsect2>
2651 <title>EVENTLOG</title>
2652
2653 <para>Starting with version 3.4.0 net can read, dump, import and export native
2654 win32 eventlog files (usually *.evt). evt files are used by the native Windows eventviewer tools.
2655 </para>
2656
2657 <para>
2658 The import and export of evt files can only succeed when <parameter>eventlog list</parameter> is used in
2659 <emphasis>smb.conf</emphasis> file.
2660 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2661 </para>
2662
2663 <para>The eventlog commands are:
2664 <simplelist>
2665 <member>net eventlog dump - Dump a eventlog *.evt file on the screen.</member>
2666 <member>net eventlog import - Import a eventlog *.evt into the samba internal
2667 tdb based representation of eventlogs.</member>
2668 <member>net eventlog export - Export the samba internal tdb based representation
2669 of eventlogs into an eventlog *.evt file.</member>
2670 </simplelist>
2671 </para>
2672
2673 <refsect3>
2674 <title>EVENTLOG DUMP <replaceable>filename</replaceable></title>
2675
2676 <para>
2677 Prints a eventlog *.evt file to standard output.
2678 </para>
2679 </refsect3>
2680
2681 <refsect3>
2682 <title>EVENTLOG IMPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2683
2684 <para>
2685 Imports a eventlog *.evt file defined by <replaceable>filename</replaceable> into the
2686 samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>.
2687 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2688 defined in smb.conf.
2689 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2690 </para>
2691
2692 </refsect3>
2693
2694 <refsect3>
2695 <title>EVENTLOG EXPORT <replaceable>filename</replaceable> <replaceable>eventlog</replaceable></title>
2696
2697 <para>
2698 Exports the samba internal tdb representation of eventlog defined by <replaceable>eventlog</replaceable>
2699 to a eventlog *.evt file defined by <replaceable>filename</replaceable>.
2700 <replaceable>eventlog</replaceable> needs to part of the <parameter>eventlog list</parameter>
2701 defined in smb.conf.
2702 See the <citerefentry><refentrytitle>smb.conf</refentrytitle> <manvolnum>5</manvolnum></citerefentry> manpage for details.
2703 </para>
2704
2705 </refsect3>
2706
2707 </refsect2>
2708
2709 <refsect2>
2710 <title>DOM</title>
2711
2712 <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.
2713 </para>
2714 <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.
2715 </para>
2716
2717 <para>The client side support for remote join is implemented in the net dom commands which are:
2718 <simplelist>
2719 <member>net dom join - Join a remote computer into a domain.</member>
2720 <member>net dom unjoin - Unjoin a remote computer from a domain.</member>
2721 <member>net dom renamecomputer - Renames a remote computer joined to a domain.</member>
2722 </simplelist>
2723 </para>
2724
2725 <refsect3>
2726 <title>DOM JOIN <replaceable>domain=DOMAIN</replaceable> <replaceable>ou=OU</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2727
2728 <para>
2729 Joins a computer into a domain. This command supports the following additional parameters:
2730 </para>
2731
2732 <itemizedlist>
2733
2734 <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>
2735
2736 <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>
2737
2738 <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>
2739
2740 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2741
2742 <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>
2743
2744 </itemizedlist>
2745
2746 <para>
2747 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.
2748 </para>
2749 <para>
2750         Example:
2751         net dom join -S xp -U XP\\administrator%secret domain=MYDOM account=MYDOM\\administrator password=topsecret reboot.
2752 </para>
2753 <para>
2754 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.
2755 </para>
2756
2757 </refsect3>
2758
2759 <refsect3>
2760 <title>DOM UNJOIN <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2761
2762 <para>
2763 Unjoins a computer from a domain. This command supports the following additional parameters:
2764 </para>
2765
2766 <itemizedlist>
2767
2768 <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>
2769
2770 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2771
2772 <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>
2773
2774 </itemizedlist>
2775
2776 <para>
2777 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.
2778 </para>
2779 <para>
2780         Example:
2781         net dom unjoin -S xp -U XP\\administrator%secret account=MYDOM\\administrator password=topsecret reboot.
2782 </para>
2783 <para>
2784 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.
2785 </para>
2786
2787 </refsect3>
2788
2789 <refsect3>
2790 <title>DOM RENAMECOMPUTER <replaceable>newname=NEWNAME</replaceable> <replaceable>account=ACCOUNT</replaceable> <replaceable>password=PASSWORD</replaceable> <replaceable>reboot</replaceable></title>
2791
2792 <para>
2793 Renames a computer that is joined to a domain. This command supports the following additional parameters:
2794 </para>
2795
2796 <itemizedlist>
2797
2798 <listitem><para><replaceable>NEWNAME</replaceable> defines the new name of the machine in the domain.</para></listitem>
2799
2800 <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>
2801
2802 <listitem><para><replaceable>PASSWORD</replaceable> defines the password for the domain account defined with <replaceable>ACCOUNT</replaceable>.</para></listitem>
2803
2804 <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>
2805
2806 </itemizedlist>
2807
2808 <para>
2809 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.
2810 </para>
2811 <para>
2812         Example:
2813         net dom renamecomputer -S xp -U XP\\administrator%secret newname=XPNEW account=MYDOM\\administrator password=topsecret reboot.
2814 </para>
2815 <para>
2816 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.
2817 </para>
2818
2819 </refsect3>
2820
2821 </refsect2>
2822
2823 <refsect2>
2824 <title>G_LOCK</title>
2825
2826 <para>Manage global locks.</para>
2827
2828 <refsect3>
2829 <title>G_LOCK DO <replaceable>lockname</replaceable> <replaceable>timeout</replaceable> <replaceable>command</replaceable></title>
2830
2831 <para>
2832 Execute a shell command under a global lock. This might be useful to define the
2833 order in which several shell commands will be executed. The locking information
2834 is stored in a file called <filename>g_lock.tdb</filename>. In setups with CTDB
2835 running, the locking information will be available on all cluster nodes.
2836 </para>
2837
2838 <itemizedlist>
2839 <listitem><para><replaceable>LOCKNAME</replaceable> defines the name of the global lock.</para></listitem>
2840 <listitem><para><replaceable>TIMEOUT</replaceable> defines the timeout.</para></listitem>
2841 <listitem><para><replaceable>COMMAND</replaceable> defines the shell command to execute.</para></listitem>
2842 </itemizedlist>
2843 </refsect3>
2844
2845 <refsect3>
2846 <title>G_LOCK LOCKS</title>
2847
2848 <para>
2849 Print a list of all currently existing locknames.
2850 </para>
2851 </refsect3>
2852
2853 <refsect3>
2854 <title>G_LOCK DUMP <replaceable>lockname</replaceable></title>
2855
2856 <para>
2857 Dump the locking table of a certain global lock.
2858 </para>
2859 </refsect3>
2860
2861 </refsect2>
2862
2863 <refsect2>
2864         <title>TDB</title>
2865
2866         <para>Print information from tdb records.</para>
2867
2868         <refsect3>
2869                 <title>TDB LOCKING <replaceable>key</replaceable> [DUMP]</title>
2870
2871                 <para>List sharename, filename and number of share modes
2872                 for a record from locking.tdb. With the optional DUMP options,
2873                 dump the complete record.</para>
2874
2875                 <itemizedlist>
2876                         <listitem>
2877                                 <para><replaceable>KEY</replaceable>
2878                                 Key of the tdb record as hex string.</para>
2879                         </listitem>
2880                 </itemizedlist>
2881
2882         </refsect3>
2883 </refsect2>
2884
2885 <refsect2>
2886 <title>HELP [COMMAND]</title>
2887
2888 <para>Gives usage information for the specified command.</para>
2889
2890 </refsect2>
2891
2892 </refsect1>
2893
2894 <refsect1>
2895         <title>VERSION</title>
2896
2897         <para>This man page is complete for version 3 of the Samba 
2898         suite.</para>
2899 </refsect1>
2900
2901 <refsect1>
2902         <title>AUTHOR</title>
2903         
2904         <para>The original Samba software and related utilities 
2905         were created by Andrew Tridgell. Samba is now developed
2906         by the Samba Team as an Open Source project similar 
2907         to the way the Linux kernel is developed.</para>
2908
2909         <para>The net manpage was written by Jelmer Vernooij.</para>
2910         
2911 </refsect1>
2912
2913 </refentry>