Fix type in SAM SET PWDMUSTCHANGENOW reported by Frederik Teichert of
[bbaumbach/samba-autobuild/.git] / docs / manpages-3 / net.8.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="net.8">
4
5 <refmeta>
6         <refentrytitle>net</refentrytitle>
7         <manvolnum>8</manvolnum>
8 </refmeta>
9
10
11 <refnamediv>
12         <refname>net</refname>
13         <refpurpose>Tool for administration of Samba and remote
14         CIFS servers.
15         </refpurpose>
16 </refnamediv>
17
18 <refsynopsisdiv>
19         <cmdsynopsis>
20                 <command>net</command>
21                 <arg choice="req">&lt;ads|rap|rpc&gt;</arg>
22                 <arg choice="opt">-h</arg>
23                 <arg choice="opt">-w workgroup</arg>
24                 <arg choice="opt">-W myworkgroup</arg>
25                 <arg choice="opt">-U user</arg>
26                 <arg choice="opt">-I ip-address</arg>
27                 <arg choice="opt">-p port</arg>
28                 <arg choice="opt">-n myname</arg>
29                 <arg choice="opt">-s conffile</arg>
30                 <arg choice="opt">-S server</arg>
31                 <arg choice="opt">-l</arg>
32                 <arg choice="opt">-P</arg>
33                 <arg choice="opt">-d debuglevel</arg>
34                 <arg choice="opt">-V</arg>
35         </cmdsynopsis>
36 </refsynopsisdiv>
37
38 <refsect1>
39         <title>DESCRIPTION</title>
40
41         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
42         <manvolnum>7</manvolnum></citerefentry> suite.</para>
43
44         <para>The Samba net utility is meant to work just like the net utility 
45         available for windows and DOS. The first argument should be used 
46         to specify the protocol to use when executing a certain command. 
47         ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3) 
48         clients and RPC can be used for NT4 and Windows 2000. If this 
49         argument is omitted, net will try to determine it automatically. 
50         Not all commands are available on all protocols.
51         </para>
52
53 </refsect1>
54
55 <refsect1>
56         <title>OPTIONS</title>
57
58         <variablelist>
59                 &stdarg.help;
60                 
61                 <varlistentry>
62                 <term>-w target-workgroup</term>
63                 <listitem><para>
64                 Sets target workgroup or domain. You have to specify 
65                 either this option or the IP address or the name of a server.
66                 </para></listitem>
67                 </varlistentry>
68
69                 <varlistentry>
70                 <term>-W workgroup</term>
71                 <listitem><para>
72                 Sets client workgroup or domain
73                 </para></listitem>
74                 </varlistentry>
75
76                 <varlistentry>
77                 <term>-U user</term>
78                 <listitem><para>
79                 User name to use
80                 </para></listitem>
81                 </varlistentry>
82
83                 <varlistentry>
84                 <term>-I ip-address</term>
85                 <listitem><para>
86                 IP address of target server to use. You have to
87                 specify either this option or a target workgroup or
88                 a target server.
89                 </para></listitem>
90                 </varlistentry>
91
92                 <varlistentry>
93                 <term>-p port</term>
94                 <listitem><para>
95                 Port on the target server to connect to (usually 139 or 445). 
96                 Defaults to trying 445 first, then 139.
97                 </para></listitem>
98                 </varlistentry>
99
100                 &stdarg.netbios.name;
101                 &stdarg.configfile;
102
103                 <varlistentry>
104                 <term>-S server</term>
105                 <listitem><para>
106                 Name of target server. You should specify either 
107                 this option or a target workgroup or a target IP address.
108                 </para></listitem>
109                 </varlistentry>
110
111                 <varlistentry>
112                 <term>-l</term>
113                 <listitem><para>
114                 When listing data, give more information on each item.
115                 </para></listitem>
116                 </varlistentry>
117
118                 <varlistentry>
119                 <term>-P</term>
120                 <listitem><para>
121                 Make queries to the external server using the machine account of the local server.
122                 </para></listitem>
123                 </varlistentry>
124
125                 &stdarg.debug;
126         </variablelist>
127 </refsect1>
128
129 <refsect1>
130 <title>COMMANDS</title>
131
132 <refsect2>
133 <title>CHANGESECRETPW</title>
134
135 <para>This command allows the Samba machine account password to be set from an external application
136 to a machine account password that has already been stored in Active Directory. DO NOT USE this command
137 unless you know exactly what you are doing. The use of this command requires that the force flag (-f)
138 be used also. There will be NO command prompt. Whatever information is piped into stdin, either by
139 typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use
140 this without care and attention as it will overwrite a legitimate machine password without warning.
141 YOU HAVE BEEN WARNED.
142 </para>
143
144 </refsect2>
145
146 <refsect2>
147         <title>TIME</title>
148
149         <para>The <command>NET TIME</command> command allows you to view the time on a remote server
150         or synchronise the time on the local server with the time on the remote server.</para>
151
152 <refsect3>
153 <title>TIME</title>
154
155 <para>Without any options, the <command>NET TIME</command> command 
156 displays the time on the remote server.
157 </para>
158
159 </refsect3>
160
161 <refsect3>
162 <title>TIME SYSTEM</title>
163
164 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command></para>
165
166 </refsect3>
167
168 <refsect3>
169 <title>TIME SET</title>
170 <para>Tries to set the date and time of the local server to that on 
171 the remote server using <command>/bin/date</command>. </para>
172
173 </refsect3>
174
175 <refsect3>
176 <title>TIME ZONE</title>
177
178 <para>Displays the timezone in hours from GMT on the remote computer.</para>
179
180 </refsect3>
181 </refsect2>
182
183 <refsect2>
184 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN] [createcomputer=OU] [options]</title>
185
186 <para>
187 Join a domain.  If the account already exists on the server, and 
188 [TYPE] is MEMBER, the machine will attempt to join automatically. 
189 (Assuming that the machine has been created in server manager)
190 Otherwise, a password will be prompted for, and a new account may
191 be created.</para>
192
193 <para>
194 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
195 joining the domain.
196 </para>
197
198 <para>
199 [UPN] (ADS only) set the principalname attribute during the join.  The default
200 format is host/netbiosname@REALM.
201 </para>
202
203 <para>
204 [OU] (ADS only) Precreate the computer account in a specific OU.  The
205 OU string reads from top to bottom without RDNs, and is delimited by
206 a '/'.  Please note that '\' is used for escape by both the shell
207 and ldap, so it may need to be doubled or quadrupled to pass through, 
208 and it is not used as a delimiter.
209 </para>
210 </refsect2>
211
212 <refsect2>
213 <title>[RPC] OLDJOIN [options]</title>
214
215 <para>Join a domain. Use the OLDJOIN option to join the domain 
216 using the old style of domain joining - you need to create a trust 
217 account in server manager first.</para>
218 </refsect2>
219
220 <refsect2>
221 <title>[RPC|ADS] USER</title>
222
223 <refsect3>
224 <title>[RPC|ADS] USER</title>
225
226 <para>List all users</para>
227
228 </refsect3>
229
230 <refsect3>
231 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
232
233 <para>Delete specified user</para>
234
235 </refsect3>
236
237 <refsect3>
238 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
239
240 <para>List the domain groups of the specified user.</para>
241
242 </refsect3>
243
244 <refsect3>
245 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
246
247 <para>Rename specified user.</para>
248
249 </refsect3>
250
251 <refsect3>
252 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
253
254 <para>Add specified user.</para>
255 </refsect3>
256 </refsect2>
257
258 <refsect2>
259 <title>[RPC|ADS] GROUP</title>
260
261 <refsect3>
262 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
263 <para>List user groups.</para>
264 </refsect3>
265
266 <refsect3>
267 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
268
269 <para>Delete specified group.</para>
270
271 </refsect3>
272
273 <refsect3>
274 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
275
276 <para>Create specified group.</para>
277
278 </refsect3>
279 </refsect2>
280
281 <refsect2>
282 <title>[RAP|RPC] SHARE</title>
283
284 <refsect3>
285 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
286
287 <para>Enumerates all exported resources (network shares) on target server.</para>
288
289 </refsect3>
290
291 <refsect3>
292 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
293
294 <para>Adds a share from a server (makes the export active). Maxusers 
295 specifies the number of users that can be connected to the 
296 share simultaneously.</para>
297
298 </refsect3>
299
300 <refsect3>
301 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
302
303 <para>Delete specified share.</para>
304 </refsect3>
305 </refsect2>
306
307 <refsect2>
308 <title>[RPC|RAP] FILE</title>
309
310 <refsect3>
311 <title>[RPC|RAP] FILE</title>
312
313 <para>List all open files on remote server.</para>
314
315 </refsect3>
316
317 <refsect3>
318 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
319
320 <para>Close file with specified <replaceable>fileid</replaceable> on 
321 remote server.</para>
322
323 </refsect3>
324
325 <refsect3>
326 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
327
328 <para>
329 Print information on specified <replaceable>fileid</replaceable>. 
330 Currently listed are: file-id, username, locks, path, permissions.
331 </para>
332
333 </refsect3>
334
335 <refsect3>
336 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
337
338 <para>
339 List files opened by specified <replaceable>user</replaceable>.
340 Please note that <command>net rap file user</command> does not work
341 against Samba servers. 
342 </para>
343
344 </refsect3>
345
346 </refsect2>
347
348 <refsect2>
349 <title>SESSION</title>
350
351 <refsect3>
352 <title>RAP SESSION</title>
353
354 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
355 sessions on the target server.</para>
356
357 </refsect3>
358
359 <refsect3>
360 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
361
362 <para>Close the specified sessions.</para>
363
364 </refsect3>
365
366 <refsect3>
367 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
368
369 <para>Give a list with all the open files in specified session.</para>
370
371 </refsect3>
372
373 </refsect2>
374
375 <refsect2>
376 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
377
378 <para>List all servers in specified domain or workgroup. Defaults
379 to local domain.</para>
380
381 </refsect2>
382
383 <refsect2>
384 <title>RAP DOMAIN</title>
385
386 <para>Lists all domains and workgroups visible on the 
387 current network.</para>
388
389 </refsect2>
390
391 <refsect2>
392 <title>RAP PRINTQ</title>
393
394 <refsect3>
395 <title>RAP PRINTQ LIST <replaceable>QUEUE_NAME</replaceable></title>
396
397 <para>Lists the specified print queue and print jobs on the server.
398 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all 
399 queues are listed.</para>
400
401 </refsect3>
402
403 <refsect3>
404 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
405
406 <para>Delete job with specified id.</para>
407
408 </refsect3>
409
410 </refsect2>
411
412 <refsect2>
413 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
414
415 <para>
416 Validate whether the specified user can log in to the 
417 remote server. If the password is not specified on the commandline, it 
418 will be prompted. 
419 </para>
420
421 &not.implemented;
422
423 </refsect2>
424
425 <refsect2>
426 <title>RAP GROUPMEMBER</title>
427
428 <refsect3>
429 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
430
431 <para>List all members of the specified group.</para>
432
433 </refsect3>
434
435 <refsect3>
436 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
437
438 <para>Delete member from group.</para>
439
440 </refsect3>
441
442 <refsect3>
443 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
444
445 <para>Add member to group.</para>
446
447 </refsect3>
448
449 </refsect2>
450
451 <refsect2>
452 <title>RAP ADMIN <replaceable>command</replaceable></title>
453
454 <para>Execute the specified <replaceable>command</replaceable> on 
455 the remote server. Only works with OS/2 servers.
456 </para>
457
458 &not.implemented;
459
460 </refsect2>
461
462 <refsect2>
463 <title>RAP SERVICE</title>
464
465 <refsect3>
466 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
467
468 <para>Start the specified service on the remote server. Not implemented yet.</para>
469
470 &not.implemented;
471
472 </refsect3>
473
474 <refsect3>
475 <title>RAP SERVICE STOP</title>
476
477 <para>Stop the specified service on the remote server.</para>
478
479 &not.implemented;
480
481 </refsect3>
482
483 </refsect2>
484
485 <refsect2>
486 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
487
488 <para>
489 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
490 </para>
491
492 </refsect2>
493
494 <refsect2>
495 <title>LOOKUP</title>
496
497 <refsect3>
498 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
499
500 <para>
501 Lookup the IP address of the given host with the specified type (netbios suffix). 
502 The type defaults to 0x20 (workstation).
503 </para>
504
505 </refsect3>
506
507 <refsect3>
508 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
509
510 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
511
512 </refsect3>
513
514 <refsect3>
515 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
516
517 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
518 Defaults to local realm.</para>
519
520 </refsect3>
521
522 <refsect3>
523 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
524
525 <para>Give IP's of Domain Controllers for specified <replaceable>
526 DOMAIN</replaceable>. Defaults to local domain.</para>
527
528 </refsect3>
529
530 <refsect3>
531 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
532
533 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
534 or workgroup. Defaults to local domain.</para>
535
536 </refsect3>
537
538 </refsect2>
539
540 <refsect2>
541 <title>CACHE</title>
542
543 <para>Samba uses a general caching interface called 'gencache'. It 
544 can be controlled using 'NET CACHE'.</para>
545
546 <para>All the timeout parameters support the suffixes:
547
548 <simplelist>
549 <member>s - Seconds</member>
550 <member>m - Minutes</member>
551 <member>h - Hours</member>
552 <member>d - Days</member>
553 <member>w - Weeks</member>
554 </simplelist>
555
556 </para>
557
558 <refsect3>
559 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
560
561 <para>Add specified key+data to the cache with the given timeout.</para>
562
563 </refsect3>
564
565 <refsect3>
566 <title>CACHE DEL <replaceable>key</replaceable></title>
567
568 <para>Delete key from the cache.</para>
569
570 </refsect3>
571
572 <refsect3>
573 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
574
575 <para>Update data of existing cache entry.</para>
576
577 </refsect3>
578
579 <refsect3>
580 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
581
582 <para>Search for the specified pattern in the cache data.</para>
583
584 </refsect3>
585
586 <refsect3>
587 <title>CACHE LIST</title>
588
589 <para>
590 List all current items in the cache.
591 </para>
592
593 </refsect3>
594
595 <refsect3>
596 <title>CACHE FLUSH</title>
597
598 <para>Remove all the current items from the cache.</para>
599
600 </refsect3>
601
602 </refsect2>
603
604 <refsect2>
605 <title>GETLOCALSID [DOMAIN]</title>
606
607 <para>Print the SID of the specified domain, or if the parameter is
608 omitted, the SID of the domain the local server is in.</para>
609
610 </refsect2>
611
612 <refsect2>
613 <title>SETLOCALSID S-1-5-21-x-y-z</title>
614
615 <para>Sets domain sid for the local server to the specified SID.</para>
616
617 </refsect2>
618
619 <refsect2>
620 <title>GROUPMAP</title>
621
622 <para>Manage the mappings between Windows group SIDs and UNIX groups.
623 Parameters take the for "parameter=value".  Common options include:</para>
624
625 <itemizedlist>
626 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
627 <listitem><para>ntgroup - Name of the Windows NT group (must be
628   resolvable to a SID</para></listitem>
629 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
630 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
631 <listitem><para>type - Type of the group; either 'domain', 'local',
632   or 'builtin'</para></listitem>
633 <listitem><para>comment - Freeform text description of the group</para></listitem>
634 </itemizedlist>
635
636 <refsect3>
637 <title>GROUPMAP ADD</title>
638
639 <para>
640 Add a new group mapping entry:
641 <programlisting>
642 net groupmap add {rid=int|sid=string} unixgroup=string \
643         [type={domain|local}] [ntgroup=string] [comment=string]
644 </programlisting>
645 </para>
646
647 </refsect3>
648
649 <refsect3>
650 <title>GROUPMAP DELETE</title>
651
652 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
653
654 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
655
656 </refsect3>
657
658 <refsect3>
659 <title>GROUPMAP MODIFY</title>
660
661 <para>Update en existing group entry</para>
662
663 <para>
664 <programlisting>
665 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
666        [comment=string] [type={domain|local}]
667 </programlisting>
668 </para>
669 </refsect3>
670
671 <refsect3>
672 <title>GROUPMAP LIST</title>
673
674 <para>List existing group mapping entries</para>
675
676 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
677
678 </refsect3>
679 </refsect2>
680
681
682
683 <refsect2>
684 <title>MAXRID</title>
685
686 <para>Prints out the highest RID currently in use on the local
687 server (by the active 'passdb backend').
688 </para>
689
690 </refsect2>
691
692 <refsect2>
693 <title>RPC INFO</title>
694
695 <para>Print information about the domain of the remote server,
696 such as domain name, domain sid and number of users and groups.
697 </para>
698
699 </refsect2>
700
701 <refsect2>
702 <title>[RPC|ADS] TESTJOIN</title>
703
704 <para>Check whether participation in a domain is still valid.</para>
705
706 </refsect2>
707
708 <refsect2>
709 <title>[RPC|ADS] CHANGETRUSTPW</title>
710
711 <para>Force change of domain trust password.</para>
712
713 </refsect2>
714
715 <refsect2>
716 <title>RPC TRUSTDOM</title>
717
718 <refsect3>
719 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
720
721 <para>Add a interdomain trust account for 
722 <replaceable>DOMAIN</replaceable> to the remote server. 
723 </para>
724
725 </refsect3>
726
727 <refsect3>
728 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
729
730 <para>Remove interdomain trust account for 
731 <replaceable>DOMAIN</replaceable> from the remote server. 
732 </para>
733
734 &not.implemented;
735
736 </refsect3>
737
738 <refsect3>
739 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
740
741 <para>
742 Establish a trust relationship to a trusting domain. 
743 Interdomain account must already be created on the remote PDC.
744 </para>
745
746 </refsect3>
747
748 <refsect3>
749 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
750 <para>Abandon relationship to trusted domain</para>
751
752 </refsect3>
753
754 <refsect3>
755 <title>RPC TRUSTDOM LIST</title>
756
757 <para>List all current interdomain trust relationships.</para>
758
759 </refsect3>
760
761 <refsect3>
762 <title>RPC RIGHTS</title>
763
764 <para>This subcommand is used to view and manage Samba's rights assignments (also 
765 referred to as privileges).  There are three options currently available: 
766 <parameter>list</parameter>, <parameter>grant</parameter>, and 
767 <parameter>revoke</parameter>.  More details on Samba's privilege model and its use
768 can be found in the Samba-HOWTO-Collection.</para>
769
770 </refsect3>
771
772
773 </refsect2>
774
775 <refsect2>
776 <title>RPC ABORTSHUTDOWN</title>
777
778 <para>Abort the shutdown of a remote server.</para>
779
780 </refsect2>
781
782 <refsect2>
783 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
784
785 <para>Shut down the remote server.</para>
786
787 <variablelist>
788 <varlistentry>
789 <term>-r</term>
790 <listitem><para>
791 Reboot after shutdown.
792 </para></listitem>
793 </varlistentry>
794
795 <varlistentry>
796 <term>-f</term>
797 <listitem><para>
798 Force shutting down all applications.
799 </para></listitem>
800 </varlistentry>
801
802 <varlistentry>
803 <term>-t timeout</term>
804 <listitem><para>
805 Timeout before system will be shut down. An interactive 
806 user of the system can use this time to cancel the shutdown.
807 </para></listitem>
808 </varlistentry>'>
809
810 <varlistentry>
811 <term>-C message</term>
812 <listitem><para>Display the specified message on the screen to 
813 announce the shutdown.</para></listitem>
814 </varlistentry>
815 </variablelist>
816
817 </refsect2>
818
819 <refsect2>
820 <title>RPC SAMDUMP</title>
821
822 <para>Print out sam database of remote server. You need
823 to run this against the PDC, from a Samba machine joined as a BDC. </para>
824 </refsect2>
825
826 <refsect2>
827 <title>RPC VAMPIRE</title>
828
829 <para>Export users, aliases and groups from remote server to 
830 local server.  You need to run this against the PDC, from a Samba machine joined as a BDC. 
831 </para>
832
833 </refsect2>
834
835 <refsect2>
836 <title>RPC GETSID</title>
837
838 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
839
840 </refsect2>
841
842 <refsect2>
843 <title>ADS LEAVE</title>
844
845 <para>Make the remote host leave the domain it is part of. </para>
846
847 </refsect2>
848
849 <refsect2>
850 <title>ADS STATUS</title>
851
852 <para>Print out status of machine account of the local machine in ADS.
853 Prints out quite some debug info. Aimed at developers, regular 
854 users should use <command>NET ADS TESTJOIN</command>.</para>
855
856 </refsect2>
857
858 <refsect2>
859 <title>ADS PRINTER</title>
860
861 <refsect3>
862 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
863
864 <para>
865 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the 
866 server name defaults to the local host.</para>
867
868 </refsect3>
869
870 <refsect3>
871 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
872
873 <para>Publish specified printer using ADS.</para>
874
875 </refsect3>
876
877 <refsect3>
878 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
879
880 <para>Remove specified printer from ADS directory.</para>
881
882 </refsect3>
883
884 </refsect2>
885
886 <refsect2>
887 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
888
889 <para>Perform a raw LDAP search on a ADS server and dump the results. The 
890 expression is a standard LDAP search expression, and the 
891 attributes are a list of LDAP fields to show in the results.</para>
892
893 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
894 </para>
895
896 </refsect2>
897
898 <refsect2>
899 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
900
901 <para>
902 Perform a raw LDAP search on a ADS server and dump the results. The 
903 DN standard LDAP DN, and the attributes are a list of LDAP fields 
904 to show in the result. 
905 </para>
906
907 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
908
909 </refsect2>
910
911 <refsect2>
912 <title>ADS WORKGROUP</title>
913
914 <para>Print out workgroup name for specified kerberos realm.</para>
915
916 </refsect2>
917
918 <refsect2>
919 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
920
921 <para>
922 (Re)Create a BUILTIN group.
923 Only a wellknown set of BUILTIN groups can be created with this command.
924 This is the list of currently recognized group names: Administrators,
925 Users, Guests, Power Users, Account Operators, Server Operators, Print
926 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
927 compatible Access.
928
929 This command requires a running Winbindd with idmap allocation properly
930 configured. The group gid will be allocated out of the winbindd range.
931 </para>
932
933 </refsect2>
934
935 <refsect2>
936 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
937
938 <para>
939 Create a LOCAL group (also known as Alias).
940
941 This command requires a running Winbindd with idmap allocation properly
942 configured. The group gid will be allocated out of the winbindd range.
943 </para>
944
945 </refsect2>
946
947 <refsect2>
948 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
949
950 <para>
951 Delete an existing LOCAL group (also known as Alias).
952
953 </para>
954
955 </refsect2>
956
957 <refsect2>
958 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
959
960 <para>
961 Map an existing Unix group and make it a Domain Group, the domain group
962 will have the same name.
963 </para>
964
965 </refsect2>
966
967 <refsect2>
968 <title>SAM UNMAPUNIXGROUP &lt;NAME&gt;</title>
969
970 <para>
971 Remove an existing group mapping entry.
972 </para>
973
974 </refsect2>
975
976 <refsect2>
977 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
978
979 <para>
980 Add a member to a Local group. The group can be specified only by name,
981 the member can be specified by name or SID.
982 </para>
983
984 </refsect2>
985
986 <refsect2>
987 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
988
989 <para>
990 Remove a member from a Local group. The group and the member must be
991 specified by name.
992 </para>
993
994 </refsect2>
995
996 <refsect2>
997 <title>SAM LISTMEM &lt;GROUP&gt;</title>
998
999 <para>
1000 List Local group members. The group must be specified by name.
1001 </para>
1002
1003 </refsect2>
1004
1005 <refsect2>
1006 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
1007
1008 <para>
1009 List the specified set of accounts by name. If verbose is specified,
1010 the rid and description is also provided for each account.
1011 </para>
1012
1013 </refsect2>
1014
1015 <refsect2>
1016 <title>SAM SHOW &lt;NAME&gt;</title>
1017
1018 <para>
1019 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1020 account.
1021 </para>
1022
1023 </refsect2>
1024
1025 <refsect2>
1026 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1027
1028 <para>
1029 Set the home directory for a user account.
1030 </para>
1031
1032 </refsect2>
1033
1034 <refsect2>
1035 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1036
1037 <para>
1038 Set the profile path for a user account.
1039 </para>
1040
1041 </refsect2>
1042
1043 <refsect2>
1044 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1045
1046 <para>
1047 Set the comment for a user or group account.
1048 </para>
1049
1050 </refsect2>
1051
1052 <refsect2>
1053 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1054
1055 <para>
1056 Set the full name for a user account.
1057 </para>
1058
1059 </refsect2>
1060
1061 <refsect2>
1062 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1063
1064 <para>
1065 Set the logon script for a user account.
1066 </para>
1067
1068 </refsect2>
1069
1070 <refsect2>
1071 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1072
1073 <para>
1074 Set the home drive for a user account.
1075 </para>
1076
1077 </refsect2>
1078
1079 <refsect2>
1080 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1081
1082 <para>
1083 Set the workstations a user account is allowed to log in from.
1084 </para>
1085
1086 </refsect2>
1087
1088 <refsect2>
1089 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1090
1091 <para>
1092 Set the "disabled" flag for a user account.
1093 </para>
1094
1095 </refsect2>
1096
1097 <refsect2>
1098 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1099
1100 <para>
1101 Set the "password not required" flag for a user account.
1102 </para>
1103
1104 </refsect2>
1105
1106 <refsect2>
1107 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1108
1109 <para>
1110 Set the "autolock" flag for a user account.
1111 </para>
1112
1113 </refsect2>
1114
1115 <refsect2>
1116 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1117
1118 <para>
1119 Set the "password do not expire" flag for a user account.
1120 </para>
1121
1122 </refsect2>
1123
1124 <refsect2>
1125 <title>SAM SET PWDMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1126
1127 <para>
1128 Set or unset the "password must change" flag for a user account.
1129 </para>
1130
1131 </refsect2>
1132
1133 <refsect2>
1134 <title>SAM POLICY LIST</title>
1135
1136 <para>
1137 List the avilable account policies.
1138 </para>
1139
1140 </refsect2>
1141
1142 <refsect2>
1143 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1144
1145 <para>
1146 Show the account policy value.
1147 </para>
1148
1149 </refsect2>
1150
1151 <refsect2>
1152 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1153
1154 <para>
1155 Set a value for the account policy.
1156 Valid values can be: "forever", "never", "off", or a number.
1157 </para>
1158
1159 </refsect2>
1160
1161 <refsect2>
1162 <title>SAM PROVISION</title>
1163
1164 <para>
1165 Only available if ldapsam:editposix is set and winbindd is running.
1166 Properly populates the ldap tree with the basic accounts (Administrator)
1167 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1168 </para>
1169
1170 </refsect2>
1171
1172 <refsect2>
1173 <title>IDMAP DUMP &lt;local tdb file name&gt;</title>
1174
1175 <para>
1176 Dumps the mappings contained in the local tdb file specified.
1177 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1178 </para>
1179
1180 </refsect2>
1181
1182 <refsect2>
1183 <title>IDMAP RESTORE [input file]</title>
1184
1185 <para>
1186 Restore the mappings from the specified file or stdin.
1187 </para>
1188
1189 </refsect2>
1190
1191 <refsect2>
1192 <title>IDMAP SECRET &lt;DOMAIN&gt;|ALLOC &lt;secret&gt;</title>
1193
1194 <para>
1195 Store a secret for the sepcified domain, used primarily for domains
1196 that use idmap_ldap as a backend. In this case the secret is used
1197 as the password for the user DN used to bind to the ldap server.
1198 </para>
1199
1200 </refsect2>
1201
1202 <refsect2>
1203 <title>USERSHARE</title>
1204
1205 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1206 non-root users to add user define shares to be exported using the "net usershare"
1207 commands.
1208 </para>
1209
1210 <para>
1211 To set this up, first set up your smb.conf by adding to the [global] section :
1212
1213 usershare path = /usr/local/samba/lib/usershares
1214
1215 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1216 set the group owner to the UNIX group who should have the ability to create usershares,
1217 for example a group called "serverops".
1218
1219 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1220
1221 (Owner and group all access, no access for others, plus the sticky bit,
1222 which means that a file in that directory can be renamed or deleted only
1223 by the owner of the file).
1224
1225 Finally, tell smbd how many usershares you will allow by adding to the [global]
1226 section of smb.conf a line such as :
1227
1228 usershare max shares = 100.
1229
1230 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1231 can create user defined shares on demand using the commands below.
1232 </para>
1233
1234 <para>The usershare commands are:
1235
1236 <simplelist>
1237 <member>net usershare add sharename path [comment] [acl] [guest_ok=[y|n]] - to add or change a user defined share.</member>
1238 <member>net usershare delete sharename - to delete a user defined share.</member>
1239 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1240 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1241 </simplelist>
1242
1243 </para>
1244
1245 <refsect3>
1246 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1247
1248 <para>
1249 Add or replace a new user defined share, with name "sharename".
1250 </para>
1251
1252 <para>
1253 "path" specifies the absolute pathname on the system to be exported.
1254 Restrictions may be put on this, see the global smb.conf parameters :
1255 "usershare owner only", "usershare prefix allow list", and
1256 "usershare prefix deny list".
1257 </para>
1258
1259 <para>
1260 The optional "comment" parameter is the comment that will appear
1261 on the share when browsed to by a client.
1262 </para>
1263
1264 <para>The optional "acl" field
1265 specifies which users have read and write access to the entire share.
1266 Note that guest connections are not allowed unless the smb.conf parameter
1267 "usershare allow guests" has been set. The definition of a user
1268 defined share acl is : "user:permission", where user is a valid
1269 username on the system and permission can be "F", "R", or "D".
1270 "F" stands for "full permissions", ie. read and write permissions.
1271 "D" stands for "deny" for a user, ie. prevent this user from accessing
1272 this share.
1273 "R" stands for "read only", ie. only allow read access to this
1274 share (no creation of new files or directories or writing to files).
1275 </para>
1276
1277 <para>
1278 The default if no "acl" is given is "Everyone:R", which means any 
1279 authenticated user has read-only access.
1280 </para>
1281
1282 <para>
1283 The optional "guest_ok" has the same effect as the parameter of the
1284 same name in smb.conf, in that it allows guest access to this user
1285 defined share. This parameter is only allowed if the global parameter
1286 "usershare allow guests" has been set to true in the smb.conf.
1287 </para>
1288
1289 There is no separate command to modify an existing user defined share,
1290 just use the "net usershare add [sharename]" command using the same
1291 sharename as the one you wish to modify and specify the new options
1292 you wish. The Samba smbd daemon notices user defined share modifications
1293 at connect time so will see the change immediately, there is no need
1294 to restart smbd on adding, deleting or changing a user defined share.
1295 </refsect3>
1296
1297 <refsect3>
1298 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1299
1300 <para>
1301 Deletes the user defined share by name. The Samba smbd daemon
1302 immediately notices this change, although it will not disconnect
1303 any users currently connected to the deleted share.
1304 </para>
1305
1306 </refsect3>
1307
1308 <refsect3>
1309 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1310
1311 <para>
1312 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1313 </para>
1314
1315 <para>
1316 net usershare info on its own dumps out info on the user defined shares that were
1317 created by the current user, or restricts them to share names that match the given
1318 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1319 If the '-l' or '--long' option is also given, it prints out info on user defined
1320 shares created by other users.
1321 </para>
1322
1323 <para>
1324 The information given about a share looks like :
1325
1326 [foobar]
1327 path=/home/jeremy
1328 comment=testme
1329 usershare_acl=Everyone:F
1330 guest_ok=n
1331
1332 And is a list of the current settings of the user defined share that can be
1333 modified by the "net usershare add" command.
1334 </para>
1335
1336 </refsect3>
1337
1338 <refsect3>
1339 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1340
1341 <para>
1342 List all the user defined shares owned by the current user matching the given pattern, or all users.
1343 </para>
1344
1345 <para>
1346 net usershare list on its own list out the names of the user defined shares that were
1347 created by the current user, or restricts the list to share names that match the given
1348 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1349 If the '-l' or '--long' option is also given, it includes the names of user defined
1350 shares created by other users.
1351 </para>
1352
1353 </refsect3>
1354
1355 </refsect2>
1356
1357 <refsect2>
1358 <title>CONF</title>
1359
1360 <para>Starting with version 3.2.0, a Samba server can be configured by data
1361 stored in registry. This configuration data can be edited with the new "net
1362 conf" commands.
1363 </para>
1364
1365 <para>
1366 The deployment of this configuration data can be activated in two levels from the
1367 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
1368 activated by setting <parameter>registry shares</parameter> to
1369 <quote>yes</quote> in the [global] section and global configuration options are
1370 activated by setting <smbconfoption name="include">registry</smbconfoption> in
1371 the [global] section.
1372 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
1373 <manvolnum>5</manvolnum></citerefentry> manpage for details.
1374 </para>
1375
1376 <para>The conf commands are:
1377 <simplelist>
1378 <member>net conf list - Dump the complete configuration in smb.conf like
1379 format.</member>
1380 <member>net conf import - Import configuration from file in smb.conf
1381 format.</member>
1382 <member>net conf listshares - List the registry shares.</member>
1383 <member>net conf drop - Delete the complete configuration from
1384 registry.</member>
1385 <member>net conf showshare - Show the definition of a registry share.</member>
1386 <member>net conf addshare - Create a new registry share.</member>
1387 <member>net conf delshare - Delete a registry share.</member>
1388 <member>net conf setparm - Store a parameter.</member>
1389 <member>net conf getparm - Retrieve the value of a parameter.</member>
1390 <member>net conf delparm - Delete a parameter.</member>
1391 </simplelist>
1392 </para>
1393
1394 <refsect3>
1395 <title>CONF LIST</title>
1396
1397 <para>
1398 Print the configuration data stored in the registry in a smb.conf-like format to
1399 standard output.
1400 </para>
1401 </refsect3>
1402
1403 <refsect3>
1404 <title>CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
1405
1406 <para>
1407 This command imports configuration from a file in smb.conf format.
1408 If a section encountered in the input file is present in registry,
1409 its contents is replaced. Sections of registry configuration that have
1410 no counterpart in the input file are not affected. If you want to delete these,
1411 you will have to use the "net conf drop" or "net conf delshare" commands.
1412 Optionally, a section may be specified to restrict the effect of the
1413 import command to that specific section. A test mode is enabled by specifying
1414 the parameter "-T" on the commandline. In test mode, no changes are made to the
1415 registry, and the resulting configuration is printed to standard output instead.
1416 </para>
1417 </refsect3>
1418
1419 <refsect3>
1420 <title>CONF LISTSHARES</title>
1421
1422 <para>
1423 List the names of the shares defined in registry.
1424 </para>
1425 </refsect3>
1426
1427 <refsect3>
1428 <title>CONF DROP</title>
1429
1430 <para>
1431 Delete the complete configuration data from registry.
1432 </para>
1433 </refsect3>
1434
1435 <refsect3>
1436 <title>CONF SHOWSHARE <replaceable>sharename</replaceable></title>
1437
1438 <para>
1439 Show the definition of the share or section specified. It is valid to specify
1440 "global" as sharename to retrieve the global configuration options from
1441 registry.
1442 </para>
1443 </refsect3>
1444
1445 <refsect3>
1446 <title>CONF ADDSHARE <replaceable>sharename</replaceable> <replaceable>path</replaceable> [<replaceable>writeable={y|N}</replaceable> [<replaceable>guest_ok={y|N}</replaceable> [<replaceable>comment</replaceable>]]] </title>
1447
1448 <para>Create a new share definition in registry.
1449 The sharename and path have to be given. The share name may
1450 <emphasis>not</emphasis> be "global". Optionally, values for the very
1451 common options "writeable", "guest ok" and a "comment" may be specified.
1452 The same result may be obtained by a sequence of "net conf setparm"
1453 commands.
1454 </para>
1455 </refsect3>
1456
1457 <refsect3>
1458 <title>CONF DELSHARE <replaceable>sharename</replaceable></title>
1459
1460 <para>
1461 Delete a share definition from registry.
1462 </para>
1463 </refsect3>
1464
1465 <refsect3>
1466 <title>CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
1467
1468 <para>
1469 Store a parameter in registry. The section may be global or a sharename.
1470 The section is created if it does not exist yet.
1471 </para>
1472 </refsect3>
1473
1474 <refsect3>
1475 <title>CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1476
1477 <para>
1478 Show a parameter stored in registry.
1479 </para>
1480 </refsect3>
1481
1482 <refsect3>
1483 <title>CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1484
1485 <para>
1486 Delete a parameter stored in registry.
1487 </para>
1488 </refsect3>
1489
1490 <refsect3>
1491 <title></title>
1492
1493 <para>
1494 </para>
1495 </refsect3>
1496
1497 </refsect2>
1498
1499 <refsect2>
1500 <title>HELP [COMMAND]</title>
1501
1502 <para>Gives usage information for the specified command.</para>
1503
1504 </refsect2>
1505
1506 </refsect1>
1507
1508 <refsect1>
1509         <title>VERSION</title>
1510
1511         <para>This man page is complete for version 3.0 of the Samba 
1512         suite.</para>
1513 </refsect1>
1514
1515 <refsect1>
1516         <title>AUTHOR</title>
1517         
1518         <para>The original Samba software and related utilities 
1519         were created by Andrew Tridgell. Samba is now developed
1520         by the Samba Team as an Open Source project similar 
1521         to the way the Linux kernel is developed.</para>
1522
1523         <para>The net manpage was written by Jelmer Vernooij.</para>
1524         
1525 </refsect1>
1526
1527 </refentry>