Remove superflous 'a'.
[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>sharenam</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</title>
337
338 &not.implemented;
339
340 </refsect3>
341
342 </refsect2>
343
344 <refsect2>
345 <title>SESSION</title>
346
347 <refsect3>
348 <title>RAP SESSION</title>
349
350 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
351 sessions on the target server.</para>
352
353 </refsect3>
354
355 <refsect3>
356 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
357
358 <para>Close the specified sessions.</para>
359
360 </refsect3>
361
362 <refsect3>
363 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
364
365 <para>Give a list with all the open files in specified session.</para>
366
367 </refsect3>
368
369 </refsect2>
370
371 <refsect2>
372 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
373
374 <para>List all servers in specified domain or workgroup. Defaults
375 to local domain.</para>
376
377 </refsect2>
378
379 <refsect2>
380 <title>RAP DOMAIN</title>
381
382 <para>Lists all domains and workgroups visible on the 
383 current network.</para>
384
385 </refsect2>
386
387 <refsect2>
388 <title>RAP PRINTQ</title>
389
390 <refsect3>
391 <title>RAP PRINTQ LIST <replaceable>QUEUE_NAME</replaceable></title>
392
393 <para>Lists the specified print queue and print jobs on the server.
394 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all 
395 queues are listed.</para>
396
397 </refsect3>
398
399 <refsect3>
400 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
401
402 <para>Delete job with specified id.</para>
403
404 </refsect3>
405
406 </refsect2>
407
408 <refsect2>
409 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
410
411 <para>
412 Validate whether the specified user can log in to the 
413 remote server. If the password is not specified on the commandline, it 
414 will be prompted. 
415 </para>
416
417 &not.implemented;
418
419 </refsect2>
420
421 <refsect2>
422 <title>RAP GROUPMEMBER</title>
423
424 <refsect3>
425 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
426
427 <para>List all members of the specified group.</para>
428
429 </refsect3>
430
431 <refsect3>
432 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
433
434 <para>Delete member from group.</para>
435
436 </refsect3>
437
438 <refsect3>
439 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
440
441 <para>Add member to group.</para>
442
443 </refsect3>
444
445 </refsect2>
446
447 <refsect2>
448 <title>RAP ADMIN <replaceable>command</replaceable></title>
449
450 <para>Execute the specified <replaceable>command</replaceable> on 
451 the remote server. Only works with OS/2 servers.
452 </para>
453
454 &not.implemented;
455
456 </refsect2>
457
458 <refsect2>
459 <title>RAP SERVICE</title>
460
461 <refsect3>
462 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
463
464 <para>Start the specified service on the remote server. Not implemented yet.</para>
465
466 &not.implemented;
467
468 </refsect3>
469
470 <refsect3>
471 <title>RAP SERVICE STOP</title>
472
473 <para>Stop the specified service on the remote server.</para>
474
475 &not.implemented;
476
477 </refsect3>
478
479 </refsect2>
480
481 <refsect2>
482 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
483
484 <para>
485 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
486 </para>
487
488 </refsect2>
489
490 <refsect2>
491 <title>LOOKUP</title>
492
493 <refsect3>
494 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
495
496 <para>
497 Lookup the IP address of the given host with the specified type (netbios suffix). 
498 The type defaults to 0x20 (workstation).
499 </para>
500
501 </refsect3>
502
503 <refsect3>
504 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable></title>
505
506 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
507
508 </refsect3>
509
510 <refsect3>
511 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
512
513 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
514 Defaults to local realm.</para>
515
516 </refsect3>
517
518 <refsect3>
519 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
520
521 <para>Give IP's of Domain Controllers for specified <replaceable>
522 DOMAIN</replaceable>. Defaults to local domain.</para>
523
524 </refsect3>
525
526 <refsect3>
527 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
528
529 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
530 or workgroup. Defaults to local domain.</para>
531
532 </refsect3>
533
534 </refsect2>
535
536 <refsect2>
537 <title>CACHE</title>
538
539 <para>Samba uses a general caching interface called 'gencache'. It 
540 can be controlled using 'NET CACHE'.</para>
541
542 <para>All the timeout parameters support the suffixes:
543
544 <simplelist>
545 <member>s - Seconds</member>
546 <member>m - Minutes</member>
547 <member>h - Hours</member>
548 <member>d - Days</member>
549 <member>w - Weeks</member>
550 </simplelist>
551
552 </para>
553
554 <refsect3>
555 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
556
557 <para>Add specified key+data to the cache with the given timeout.</para>
558
559 </refsect3>
560
561 <refsect3>
562 <title>CACHE DEL <replaceable>key</replaceable></title>
563
564 <para>Delete key from the cache.</para>
565
566 </refsect3>
567
568 <refsect3>
569 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
570
571 <para>Update data of existing cache entry.</para>
572
573 </refsect3>
574
575 <refsect3>
576 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
577
578 <para>Search for the specified pattern in the cache data.</para>
579
580 </refsect3>
581
582 <refsect3>
583 <title>CACHE LIST</title>
584
585 <para>
586 List all current items in the cache.
587 </para>
588
589 </refsect3>
590
591 <refsect3>
592 <title>CACHE FLUSH</title>
593
594 <para>Remove all the current items from the cache.</para>
595
596 </refsect3>
597
598 </refsect2>
599
600 <refsect2>
601 <title>GETLOCALSID [DOMAIN]</title>
602
603 <para>Print the SID of the specified domain, or if the parameter is
604 omitted, the SID of the domain the local server is in.</para>
605
606 </refsect2>
607
608 <refsect2>
609 <title>SETLOCALSID S-1-5-21-x-y-z</title>
610
611 <para>Sets domain sid for the local server to the specified SID.</para>
612
613 </refsect2>
614
615 <refsect2>
616 <title>GROUPMAP</title>
617
618 <para>Manage the mappings between Windows group SIDs and UNIX groups.
619 Parameters take the for "parameter=value".  Common options include:</para>
620
621 <itemizedlist>
622 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
623 <listitem><para>ntgroup - Name of the Windows NT group (must be
624   resolvable to a SID</para></listitem>
625 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
626 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
627 <listitem><para>type - Type of the group; either 'domain', 'local',
628   or 'builtin'</para></listitem>
629 <listitem><para>comment - Freeform text description of the group</para></listitem>
630 </itemizedlist>
631
632 <refsect3>
633 <title>GROUPMAP ADD</title>
634
635 <para>
636 Add a new group mapping entry:
637 <programlisting>
638 net groupmap add {rid=int|sid=string} unixgroup=string \
639       [type={domain|local}] [ntgroup=string] [comment=string]
640 </programlisting>
641 </para>
642
643 </refsect3>
644
645 <refsect3>
646 <title>GROUPMAP DELETE</title>
647
648 <para>Delete a group mapping entry. If more then one group name matches, the first entry found is deleted.</para>
649
650 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
651
652 </refsect3>
653
654 <refsect3>
655 <title>GROUPMAP MODIFY</title>
656
657 <para>Update en existing group entry</para>
658
659 <para>
660 <programlisting>
661 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
662        [comment=string] [type={domain|local}]
663 </programlisting>
664 </para>
665 </refsect3>
666
667 <refsect3>
668 <title>GROUPMAP LIST</title>
669
670 <para>List existing group mapping entries</para>
671
672 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
673
674 </refsect3>
675 </refsect2>
676
677
678
679 <refsect2>
680 <title>MAXRID</title>
681
682 <para>Prints out the highest RID currently in use on the local
683 server (by the active 'passdb backend').
684 </para>
685
686 </refsect2>
687
688 <refsect2>
689 <title>RPC INFO</title>
690
691 <para>Print information about the domain of the remote server,
692 such as domain name, domain sid and number of users and groups.
693 </para>
694
695 </refsect2>
696
697 <refsect2>
698 <title>[RPC|ADS] TESTJOIN</title>
699
700 <para>Check whether participation in a domain is still valid.</para>
701
702 </refsect2>
703
704 <refsect2>
705 <title>[RPC|ADS] CHANGETRUSTPW</title>
706
707 <para>Force change of domain trust password.</para>
708
709 </refsect2>
710
711 <refsect2>
712 <title>RPC TRUSTDOM</title>
713
714 <refsect3>
715 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
716
717 <para>Add a interdomain trust account for 
718 <replaceable>DOMAIN</replaceable> to the remote server. 
719 </para>
720
721 </refsect3>
722
723 <refsect3>
724 <title>RPC TRUSTDOM DEL <replaceable>DOMAIM</replaceable></title>
725
726 <para>Remove interdomain trust account for 
727 <replaceable>DOMAIN</replaceable> from the remote server. 
728 </para>
729
730 &not.implemented;
731
732 </refsect3>
733
734 <refsect3>
735 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
736
737 <para>
738 Establish a trust relationship to a trusting domain. 
739 Interdomain account must already be created on the remote PDC.
740 </para>
741
742 </refsect3>
743
744 <refsect3>
745 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
746 <para>Abandon relationship to trusted domain</para>
747
748 </refsect3>
749
750 <refsect3>
751 <title>RPC TRUSTDOM LIST</title>
752
753 <para>List all current interdomain trust relationships.</para>
754
755 </refsect3>
756
757 <refsect3>
758 <title>RPC RIGHTS</title>
759
760 <para>This subcommand is used to view and manage Samba's rights assignments (also 
761 referred to as privileges).  There are three options current available: 
762 <parameter>list</parameter>, <parameter>grant</parameter>, and 
763 <parameter>revoke</parameter>.  More details on Samba's privilege model and its use
764 can be found in the Samba-HOWTO-Collection.</para>
765
766 </refsect3>
767
768
769 </refsect2>
770
771 <refsect2>
772 <title>RPC ABORTSHUTDOWN</title>
773
774 <para>Abort the shutdown of a remote server.</para>
775
776 </refsect2>
777
778 <refsect2>
779 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
780
781 <para>Shut down the remote server.</para>
782
783 <variablelist>
784 <varlistentry>
785 <term>-r</term>
786 <listitem><para>
787 Reboot after shutdown.
788 </para></listitem>
789 </varlistentry>
790
791 <varlistentry>
792 <term>-f</term>
793 <listitem><para>
794 Force shutting down all applications.
795 </para></listitem>
796 </varlistentry>
797
798 <varlistentry>
799 <term>-t timeout</term>
800 <listitem><para>
801 Timeout before system will be shut down. An interactive 
802 user of the system can use this time to cancel the shutdown.
803 </para></listitem>
804 </varlistentry>'>
805
806 <varlistentry>
807 <term>-C message</term>
808 <listitem><para>Display the specified message on the screen to 
809 announce the shutdown.</para></listitem>
810 </varlistentry>
811 </variablelist>
812
813 </refsect2>
814
815 <refsect2>
816 <title>RPC SAMDUMP</title>
817
818 <para>Print out sam database of remote server. You need
819 to run this against the PDC, from a Samba machine joined as a BDC. </para>
820 </refsect2>
821
822 <refsect2>
823 <title>RPC VAMPIRE</title>
824
825 <para>Export users, aliases and groups from remote server to 
826 local server.  You need to run this against the PDC, from a Samba machine joined as a BDC. 
827 </para>
828
829 </refsect2>
830
831 <refsect2>
832 <title>RPC GETSID</title>
833
834 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
835
836 </refsect2>
837
838 <refsect2>
839 <title>ADS LEAVE</title>
840
841 <para>Make the remote host leave the domain it is part of. </para>
842
843 </refsect2>
844
845 <refsect2>
846 <title>ADS STATUS</title>
847
848 <para>Print out status of machine account of the local machine in ADS.
849 Prints out quite some debug info. Aimed at developers, regular 
850 users should use <command>NET ADS TESTJOIN</command>.</para>
851
852 </refsect2>
853
854 <refsect2>
855 <title>ADS PRINTER</title>
856
857 <refsect3>
858 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
859
860 <para>
861 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the 
862 server name defaults to the local host.</para>
863
864 </refsect3>
865
866 <refsect3>
867 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
868
869 <para>Publish specified printer using ADS.</para>
870
871 </refsect3>
872
873 <refsect3>
874 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
875
876 <para>Remove specified printer from ADS directory.</para>
877
878 </refsect3>
879
880 </refsect2>
881
882 <refsect2>
883 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
884
885 <para>Perform a raw LDAP search on a ADS server and dump the results. The 
886 expression is a standard LDAP search expression, and the 
887 attributes are a list of LDAP fields to show in the results.</para>
888
889 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
890 </para>
891
892 </refsect2>
893
894 <refsect2>
895 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
896
897 <para>
898 Perform a raw LDAP search on a ADS server and dump the results. The 
899 DN standard LDAP DN, and the attributes are a list of LDAP fields 
900 to show in the result. 
901 </para>
902
903 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
904
905 </refsect2>
906
907 <refsect2>
908 <title>ADS WORKGROUP</title>
909
910 <para>Print out workgroup name for specified kerberos realm.</para>
911
912 </refsect2>
913
914 <refsect2>
915 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
916
917 <para>
918 (Re)Create a BUILTIN group.
919 Only a wellknown set of BUILTIN groups can be created with this command.
920 This is the list of currently recognized group names: Administrators,
921 Users, Guests, Power Users, Account Operators, Server Operators, Print
922 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
923 ompatible Access.
924
925 This command requires a running Winbindd with idmap allocation properly
926 configured. The group gid will be allocated out of the winbindd range.
927 </para>
928
929 </refsect2>
930
931 <refsect2>
932 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
933
934 <para>
935 Create a LOCAL group (also known as Alias).
936
937 This command requires a running Winbindd with idmap allocation properly
938 configured. The group gid will be allocated out of the winbindd range.
939 </para>
940
941 </refsect2>
942
943 <refsect2>
944 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
945
946 <para>
947 Delete an existing LOCAL group (also known as Alias).
948
949 </para>
950
951 </refsect2>
952
953 <refsect2>
954 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
955
956 <para>
957 Map an existing Unix group and make it a Domain Group, the domain group
958 will have the same name.
959 </para>
960
961 </refsect2>
962
963 <refsect2>
964 <title>SAM UNMAPUNIXGROUP &lt;NAME&gt;</title>
965
966 <para>
967 Remove an existing group mapping entry.
968 </para>
969
970 </refsect2>
971
972 <refsect2>
973 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
974
975 <para>
976 Add a member to a Local group. The group can be specified only by name,
977 the member can be specified by name or SID.
978 </para>
979
980 </refsect2>
981
982 <refsect2>
983 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
984
985 <para>
986 Remove a member from a Local group. The group and the member must be
987 specified by name.
988 </para>
989
990 </refsect2>
991
992 <refsect2>
993 <title>SAM LISTMEM &lt;GROUP&gt;</title>
994
995 <para>
996 List Local group members. The group must be specified by name.
997 </para>
998
999 </refsect2>
1000
1001 <refsect2>
1002 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
1003
1004 <para>
1005 List the specified set of accounts by name. If verbose is specified,
1006 the rid and description is also provided for each account.
1007 </para>
1008
1009 </refsect2>
1010
1011 <refsect2>
1012 <title>SAM SHOW &lt;NAME&gt;</title>
1013
1014 <para>
1015 Show the full DOMAIN\\NAME the SID and the type for the corrisponding
1016 account.
1017 </para>
1018
1019 </refsect2>
1020
1021 <refsect2>
1022 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1023
1024 <para>
1025 Set the home directory for a user account.
1026 </para>
1027
1028 </refsect2>
1029
1030 <refsect2>
1031 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1032
1033 <para>
1034 Set the profile path for a user account.
1035 </para>
1036
1037 </refsect2>
1038
1039 <refsect2>
1040 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1041
1042 <para>
1043 Set the comment for a user or group account.
1044 </para>
1045
1046 </refsect2>
1047
1048 <refsect2>
1049 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1050
1051 <para>
1052 Set the full name for a user account.
1053 </para>
1054
1055 </refsect2>
1056
1057 <refsect2>
1058 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1059
1060 <para>
1061 Set the logon script for a user account.
1062 </para>
1063
1064 </refsect2>
1065
1066 <refsect2>
1067 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1068
1069 <para>
1070 Set the home drive for a user account.
1071 </para>
1072
1073 </refsect2>
1074
1075 <refsect2>
1076 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1077
1078 <para>
1079 Set the workstations a user account is allowed to log in from.
1080 </para>
1081
1082 </refsect2>
1083
1084 <refsect2>
1085 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1086
1087 <para>
1088 Set the "disabled" flag for a user account.
1089 </para>
1090
1091 </refsect2>
1092
1093 <refsect2>
1094 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1095
1096 <para>
1097 Set the "password not required" flag for a user account.
1098 </para>
1099
1100 </refsect2>
1101
1102 <refsect2>
1103 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1104
1105 <para>
1106 Set the "autolock" flag for a user account.
1107 </para>
1108
1109 </refsect2>
1110
1111 <refsect2>
1112 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1113
1114 <para>
1115 Set the "password do not expire" flag for a user account.
1116 </para>
1117
1118 </refsect2>
1119
1120 <refsect2>
1121 <title>SAM SET PWMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1122
1123 <para>
1124 Set or unset the "password must change" flag fro a user account.
1125 </para>
1126
1127 </refsect2>
1128
1129 <refsect2>
1130 <title>SAM POLICY LIST</title>
1131
1132 <para>
1133 List the avilable account policies.
1134 </para>
1135
1136 </refsect2>
1137
1138 <refsect2>
1139 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1140
1141 <para>
1142 Show the account policy value.
1143 </para>
1144
1145 </refsect2>
1146
1147 <refsect2>
1148 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1149
1150 <para>
1151 Set a value for the account policy.
1152 Valid values can be: "forever", "never", "off", or a number.
1153 </para>
1154
1155 </refsect2>
1156
1157 <refsect2>
1158 <title>SAM PROVISION</title>
1159
1160 <para>
1161 Only available if ldapsam:editposix is set and winbindd is running.
1162 Properly populates the ldap tree with the basic accounts (Administrator)
1163 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1164 </para>
1165
1166 </refsect2>
1167
1168 <refsect2>
1169 <title>IDMAP DUMP &lt;local tdb file name&gt;</title>
1170
1171 <para>
1172 Dumps the mappings contained in the local tdb file specified.
1173 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1174 </para>
1175
1176 </refsect2>
1177
1178 <refsect2>
1179 <title>IDMAP RESTORE [input file]</title>
1180
1181 <para>
1182 Restore the mappings from the specified file or stdin.
1183 </para>
1184
1185 </refsect2>
1186
1187 <refsect2>
1188 <title>IDMAP SECRET &lt;DOMAIN&gt;|ALLOC &lt;secret&gt;</title>
1189
1190 <para>
1191 Store a secret for the sepcified domain, used primarily for domains
1192 that use idmap_ldap as a backend. In this case the secret is used
1193 as the password for the user DN used to bind to the ldap server.
1194 </para>
1195
1196 </refsect2>
1197
1198 <refsect2>
1199 <title>USERSHARE</title>
1200
1201 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1202 non-root users to add user define shares to be exported using the "net usershare"
1203 commands.
1204 </para>
1205
1206 <para>
1207 To set this up, first set up your smb.conf by adding to the [global] section :
1208
1209 usershare path = /usr/local/samba/lib/usershares
1210
1211 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1212 set the group owner to the UNIX group who should have the ability to create usershares,
1213 for example a group called "serverops".
1214
1215 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1216
1217 (Owner and group all access, no access for others, plus the sticky bit,
1218 which means that a file in that directory can be renamed or deleted only
1219 by the owner of the file).
1220
1221 Finally, tell smbd how many usershares you will allow by adding to the [global]
1222 section of smb.conf a line such as :
1223
1224 usershare max shares = 100.
1225
1226 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1227 can create user defined shares on demand using the commands below.
1228 </para>
1229
1230 <para>The usershare commands are:
1231
1232 <simplelist>
1233 <member>net usershare add sharename path [comment] [acl] [guest_ok=[y|n]] - to add or change a user defined share.</member>
1234 <member>net usershare delete sharename - to delete a user defined share.</member>
1235 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1236 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1237 </simplelist>
1238
1239 </para>
1240
1241 <refsect3>
1242 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1243
1244 <para>
1245 Add or replace a new user defined share, with name "sharename".
1246 </para>
1247
1248 <para>
1249 "path" specifies the absolute pathname on the system to be exported.
1250 Restrictions may be put on this, see the global smb.conf parameters :
1251 "usershare owner only", "usershare prefix allow list", and
1252 "usershare prefix deny list".
1253 </para>
1254
1255 <para>
1256 The optional "comment" parameter is the comment that will appear
1257 on the share when browsed to by a client.
1258 </para>
1259
1260 <para>The optional "acl" field
1261 specifies which users have read and write access to the entire share.
1262 Note that guest connections are not allowed unless the smb.conf parameter
1263 "usershare allow guests" has been set. The definition of a user
1264 defined share acl is : "user:permission", where user is a valid
1265 username on the system and permission can be "F", "R", or "D".
1266 "F" stands for "full permissions", ie. read and write permissions.
1267 "D" stands for "deny" for a user, ie. prevent this user from accessing
1268 this share.
1269 "R" stands for "read only", ie. only allow read access to this
1270 share (no creation of new files or directories or writing to files).
1271 </para>
1272
1273 <para>
1274 The default if no "acl" is given is "Everyone:R", which means any 
1275 authenticated user has read-only access.
1276 </para>
1277
1278 <para>
1279 The optional "guest_ok" has the same effect as the parameter of the
1280 same name in smb.conf, in that it allows guest access to this user
1281 defined share. This parameter is only allowed if the global parameter
1282 "usershare allow guests" has been set to true in the smb.conf.
1283 </para>
1284
1285 There is no separate command to modify an existing user defined share,
1286 just use the "net usershare add [sharename]" command using the same
1287 sharename as the one you wish to modify and specify the new options
1288 you wish. The Samba smbd daemon notices user defined share modifications
1289 at connect time so will see the change immediately, there is no need
1290 to restart smbd on adding, deleting or changing a user defined share.
1291 </refsect3>
1292
1293 <refsect3>
1294 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1295
1296 <para>
1297 Deletes the user defined share by name. The Samba smbd daemon
1298 immediately notices this change, although it will not disconnect
1299 any users currently connected to the deleted share.
1300 </para>
1301
1302 </refsect3>
1303
1304 <refsect3>
1305 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1306
1307 <para>
1308 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1309 </para>
1310
1311 <para>
1312 net usershare info on its own dumps out info on the user defined shares that were
1313 created by the current user, or restricts them to share names that match the given
1314 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1315 If the '-l' or '--long' option is also given, it prints out info on user defined
1316 shares created by other users.
1317 </para>
1318
1319 <para>
1320 The information given about a share looks like :
1321
1322 [foobar]
1323 path=/home/jeremy
1324 comment=testme
1325 usershare_acl=Everyone:F
1326 guest_ok=n
1327
1328 And is a list of the current settings of the user defined share that can be
1329 modified by the "net usershare add" command.
1330 </para>
1331
1332 </refsect3>
1333
1334 <refsect3>
1335 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1336
1337 <para>
1338 List all the user defined shares owned by the current user matching the given pattern, or all users.
1339 </para>
1340
1341 <para>
1342 net usershare list on its own list out the names of the user defined shares that were
1343 created by the current user, or restricts the list to share names that match the given
1344 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1345 If the '-l' or '--long' option is also given, it includes the names of user defined
1346 shares created by other users.
1347 </para>
1348
1349 </refsect3>
1350
1351 </refsect2>
1352
1353 <refsect2>
1354 <title>HELP [COMMAND]</title>
1355
1356 <para>Gives usage information for the specified command.</para>
1357
1358 </refsect2>
1359
1360 </refsect1>
1361
1362 <refsect1>
1363         <title>VERSION</title>
1364
1365         <para>This man page is complete for version 3.0 of the Samba 
1366         suite.</para>
1367 </refsect1>
1368
1369 <refsect1>
1370         <title>AUTHOR</title>
1371         
1372         <para>The original Samba software and related utilities 
1373         were created by Andrew Tridgell. Samba is now developed
1374         by the Samba Team as an Open Source project similar 
1375         to the way the Linux kernel is developed.</para>
1376
1377         <para>The net manpage was written by Jelmer Vernooij.</para>
1378         
1379 </refsect1>
1380
1381 </refentry>