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