Fix type in SAM SET PWDMUSTCHANGENOW reported by Frederik Teichert of
[Samba/gbeck.git] / docs / manpages-3 / net.8.xml
blobb740e33dae9af37feb74e03e1023ec38bab96724
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">
5 <refmeta>
6         <refentrytitle>net</refentrytitle>
7         <manvolnum>8</manvolnum>
8 </refmeta>
11 <refnamediv>
12         <refname>net</refname>
13         <refpurpose>Tool for administration of Samba and remote
14         CIFS servers.
15         </refpurpose>
16 </refnamediv>
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>
38 <refsect1>
39         <title>DESCRIPTION</title>
41         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
42         <manvolnum>7</manvolnum></citerefentry> suite.</para>
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>
53 </refsect1>
55 <refsect1>
56         <title>OPTIONS</title>
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>
69                 <varlistentry>
70                 <term>-W workgroup</term>
71                 <listitem><para>
72                 Sets client workgroup or domain
73                 </para></listitem>
74                 </varlistentry>
76                 <varlistentry>
77                 <term>-U user</term>
78                 <listitem><para>
79                 User name to use
80                 </para></listitem>
81                 </varlistentry>
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>
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>
100                 &stdarg.netbios.name;
101                 &stdarg.configfile;
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>
111                 <varlistentry>
112                 <term>-l</term>
113                 <listitem><para>
114                 When listing data, give more information on each item.
115                 </para></listitem>
116                 </varlistentry>
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>
125                 &stdarg.debug;
126         </variablelist>
127 </refsect1>
129 <refsect1>
130 <title>COMMANDS</title>
132 <refsect2>
133 <title>CHANGESECRETPW</title>
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>
144 </refsect2>
146 <refsect2>
147         <title>TIME</title>
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>
152 <refsect3>
153 <title>TIME</title>
155 <para>Without any options, the <command>NET TIME</command> command 
156 displays the time on the remote server.
157 </para>
159 </refsect3>
161 <refsect3>
162 <title>TIME SYSTEM</title>
164 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command></para>
166 </refsect3>
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>
173 </refsect3>
175 <refsect3>
176 <title>TIME ZONE</title>
178 <para>Displays the timezone in hours from GMT on the remote computer.</para>
180 </refsect3>
181 </refsect2>
183 <refsect2>
184 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN] [createcomputer=OU] [options]</title>
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>
193 <para>
194 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
195 joining the domain.
196 </para>
198 <para>
199 [UPN] (ADS only) set the principalname attribute during the join.  The default
200 format is host/netbiosname@REALM.
201 </para>
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>
212 <refsect2>
213 <title>[RPC] OLDJOIN [options]</title>
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>
220 <refsect2>
221 <title>[RPC|ADS] USER</title>
223 <refsect3>
224 <title>[RPC|ADS] USER</title>
226 <para>List all users</para>
228 </refsect3>
230 <refsect3>
231 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
233 <para>Delete specified user</para>
235 </refsect3>
237 <refsect3>
238 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
240 <para>List the domain groups of the specified user.</para>
242 </refsect3>
244 <refsect3>
245 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
247 <para>Rename specified user.</para>
249 </refsect3>
251 <refsect3>
252 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
254 <para>Add specified user.</para>
255 </refsect3>
256 </refsect2>
258 <refsect2>
259 <title>[RPC|ADS] GROUP</title>
261 <refsect3>
262 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
263 <para>List user groups.</para>
264 </refsect3>
266 <refsect3>
267 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
269 <para>Delete specified group.</para>
271 </refsect3>
273 <refsect3>
274 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
276 <para>Create specified group.</para>
278 </refsect3>
279 </refsect2>
281 <refsect2>
282 <title>[RAP|RPC] SHARE</title>
284 <refsect3>
285 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
287 <para>Enumerates all exported resources (network shares) on target server.</para>
289 </refsect3>
291 <refsect3>
292 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
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>
298 </refsect3>
300 <refsect3>
301 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
303 <para>Delete specified share.</para>
304 </refsect3>
305 </refsect2>
307 <refsect2>
308 <title>[RPC|RAP] FILE</title>
310 <refsect3>
311 <title>[RPC|RAP] FILE</title>
313 <para>List all open files on remote server.</para>
315 </refsect3>
317 <refsect3>
318 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
320 <para>Close file with specified <replaceable>fileid</replaceable> on 
321 remote server.</para>
323 </refsect3>
325 <refsect3>
326 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
328 <para>
329 Print information on specified <replaceable>fileid</replaceable>. 
330 Currently listed are: file-id, username, locks, path, permissions.
331 </para>
333 </refsect3>
335 <refsect3>
336 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
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>
344 </refsect3>
346 </refsect2>
348 <refsect2>
349 <title>SESSION</title>
351 <refsect3>
352 <title>RAP SESSION</title>
354 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
355 sessions on the target server.</para>
357 </refsect3>
359 <refsect3>
360 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
362 <para>Close the specified sessions.</para>
364 </refsect3>
366 <refsect3>
367 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
369 <para>Give a list with all the open files in specified session.</para>
371 </refsect3>
373 </refsect2>
375 <refsect2>
376 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
378 <para>List all servers in specified domain or workgroup. Defaults
379 to local domain.</para>
381 </refsect2>
383 <refsect2>
384 <title>RAP DOMAIN</title>
386 <para>Lists all domains and workgroups visible on the 
387 current network.</para>
389 </refsect2>
391 <refsect2>
392 <title>RAP PRINTQ</title>
394 <refsect3>
395 <title>RAP PRINTQ LIST <replaceable>QUEUE_NAME</replaceable></title>
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>
401 </refsect3>
403 <refsect3>
404 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
406 <para>Delete job with specified id.</para>
408 </refsect3>
410 </refsect2>
412 <refsect2>
413 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
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>
421 &not.implemented;
423 </refsect2>
425 <refsect2>
426 <title>RAP GROUPMEMBER</title>
428 <refsect3>
429 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
431 <para>List all members of the specified group.</para>
433 </refsect3>
435 <refsect3>
436 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
438 <para>Delete member from group.</para>
440 </refsect3>
442 <refsect3>
443 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
445 <para>Add member to group.</para>
447 </refsect3>
449 </refsect2>
451 <refsect2>
452 <title>RAP ADMIN <replaceable>command</replaceable></title>
454 <para>Execute the specified <replaceable>command</replaceable> on 
455 the remote server. Only works with OS/2 servers.
456 </para>
458 &not.implemented;
460 </refsect2>
462 <refsect2>
463 <title>RAP SERVICE</title>
465 <refsect3>
466 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
468 <para>Start the specified service on the remote server. Not implemented yet.</para>
470 &not.implemented;
472 </refsect3>
474 <refsect3>
475 <title>RAP SERVICE STOP</title>
477 <para>Stop the specified service on the remote server.</para>
479 &not.implemented;
481 </refsect3>
483 </refsect2>
485 <refsect2>
486 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
488 <para>
489 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
490 </para>
492 </refsect2>
494 <refsect2>
495 <title>LOOKUP</title>
497 <refsect3>
498 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
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>
505 </refsect3>
507 <refsect3>
508 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
510 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
512 </refsect3>
514 <refsect3>
515 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
517 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
518 Defaults to local realm.</para>
520 </refsect3>
522 <refsect3>
523 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
525 <para>Give IP's of Domain Controllers for specified <replaceable>
526 DOMAIN</replaceable>. Defaults to local domain.</para>
528 </refsect3>
530 <refsect3>
531 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
533 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
534 or workgroup. Defaults to local domain.</para>
536 </refsect3>
538 </refsect2>
540 <refsect2>
541 <title>CACHE</title>
543 <para>Samba uses a general caching interface called 'gencache'. It 
544 can be controlled using 'NET CACHE'.</para>
546 <para>All the timeout parameters support the suffixes:
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>
556 </para>
558 <refsect3>
559 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
561 <para>Add specified key+data to the cache with the given timeout.</para>
563 </refsect3>
565 <refsect3>
566 <title>CACHE DEL <replaceable>key</replaceable></title>
568 <para>Delete key from the cache.</para>
570 </refsect3>
572 <refsect3>
573 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
575 <para>Update data of existing cache entry.</para>
577 </refsect3>
579 <refsect3>
580 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
582 <para>Search for the specified pattern in the cache data.</para>
584 </refsect3>
586 <refsect3>
587 <title>CACHE LIST</title>
589 <para>
590 List all current items in the cache.
591 </para>
593 </refsect3>
595 <refsect3>
596 <title>CACHE FLUSH</title>
598 <para>Remove all the current items from the cache.</para>
600 </refsect3>
602 </refsect2>
604 <refsect2>
605 <title>GETLOCALSID [DOMAIN]</title>
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>
610 </refsect2>
612 <refsect2>
613 <title>SETLOCALSID S-1-5-21-x-y-z</title>
615 <para>Sets domain sid for the local server to the specified SID.</para>
617 </refsect2>
619 <refsect2>
620 <title>GROUPMAP</title>
622 <para>Manage the mappings between Windows group SIDs and UNIX groups.
623 Parameters take the for "parameter=value".  Common options include:</para>
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>
636 <refsect3>
637 <title>GROUPMAP ADD</title>
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>
647 </refsect3>
649 <refsect3>
650 <title>GROUPMAP DELETE</title>
652 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
654 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
656 </refsect3>
658 <refsect3>
659 <title>GROUPMAP MODIFY</title>
661 <para>Update en existing group entry</para>
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>
671 <refsect3>
672 <title>GROUPMAP LIST</title>
674 <para>List existing group mapping entries</para>
676 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
678 </refsect3>
679 </refsect2>
683 <refsect2>
684 <title>MAXRID</title>
686 <para>Prints out the highest RID currently in use on the local
687 server (by the active 'passdb backend').
688 </para>
690 </refsect2>
692 <refsect2>
693 <title>RPC INFO</title>
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>
699 </refsect2>
701 <refsect2>
702 <title>[RPC|ADS] TESTJOIN</title>
704 <para>Check whether participation in a domain is still valid.</para>
706 </refsect2>
708 <refsect2>
709 <title>[RPC|ADS] CHANGETRUSTPW</title>
711 <para>Force change of domain trust password.</para>
713 </refsect2>
715 <refsect2>
716 <title>RPC TRUSTDOM</title>
718 <refsect3>
719 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
721 <para>Add a interdomain trust account for 
722 <replaceable>DOMAIN</replaceable> to the remote server. 
723 </para>
725 </refsect3>
727 <refsect3>
728 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
730 <para>Remove interdomain trust account for 
731 <replaceable>DOMAIN</replaceable> from the remote server. 
732 </para>
734 &not.implemented;
736 </refsect3>
738 <refsect3>
739 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
741 <para>
742 Establish a trust relationship to a trusting domain. 
743 Interdomain account must already be created on the remote PDC.
744 </para>
746 </refsect3>
748 <refsect3>
749 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
750 <para>Abandon relationship to trusted domain</para>
752 </refsect3>
754 <refsect3>
755 <title>RPC TRUSTDOM LIST</title>
757 <para>List all current interdomain trust relationships.</para>
759 </refsect3>
761 <refsect3>
762 <title>RPC RIGHTS</title>
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>
770 </refsect3>
773 </refsect2>
775 <refsect2>
776 <title>RPC ABORTSHUTDOWN</title>
778 <para>Abort the shutdown of a remote server.</para>
780 </refsect2>
782 <refsect2>
783 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
785 <para>Shut down the remote server.</para>
787 <variablelist>
788 <varlistentry>
789 <term>-r</term>
790 <listitem><para>
791 Reboot after shutdown.
792 </para></listitem>
793 </varlistentry>
795 <varlistentry>
796 <term>-f</term>
797 <listitem><para>
798 Force shutting down all applications.
799 </para></listitem>
800 </varlistentry>
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>'>
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>
817 </refsect2>
819 <refsect2>
820 <title>RPC SAMDUMP</title>
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>
826 <refsect2>
827 <title>RPC VAMPIRE</title>
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>
833 </refsect2>
835 <refsect2>
836 <title>RPC GETSID</title>
838 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
840 </refsect2>
842 <refsect2>
843 <title>ADS LEAVE</title>
845 <para>Make the remote host leave the domain it is part of. </para>
847 </refsect2>
849 <refsect2>
850 <title>ADS STATUS</title>
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>
856 </refsect2>
858 <refsect2>
859 <title>ADS PRINTER</title>
861 <refsect3>
862 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
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>
868 </refsect3>
870 <refsect3>
871 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
873 <para>Publish specified printer using ADS.</para>
875 </refsect3>
877 <refsect3>
878 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
880 <para>Remove specified printer from ADS directory.</para>
882 </refsect3>
884 </refsect2>
886 <refsect2>
887 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
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>
893 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
894 </para>
896 </refsect2>
898 <refsect2>
899 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
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>
907 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
909 </refsect2>
911 <refsect2>
912 <title>ADS WORKGROUP</title>
914 <para>Print out workgroup name for specified kerberos realm.</para>
916 </refsect2>
918 <refsect2>
919 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
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.
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>
933 </refsect2>
935 <refsect2>
936 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
938 <para>
939 Create a LOCAL group (also known as Alias).
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>
945 </refsect2>
947 <refsect2>
948 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
950 <para>
951 Delete an existing LOCAL group (also known as Alias).
953 </para>
955 </refsect2>
957 <refsect2>
958 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
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>
965 </refsect2>
967 <refsect2>
968 <title>SAM UNMAPUNIXGROUP &lt;NAME&gt;</title>
970 <para>
971 Remove an existing group mapping entry.
972 </para>
974 </refsect2>
976 <refsect2>
977 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
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>
984 </refsect2>
986 <refsect2>
987 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
989 <para>
990 Remove a member from a Local group. The group and the member must be
991 specified by name.
992 </para>
994 </refsect2>
996 <refsect2>
997 <title>SAM LISTMEM &lt;GROUP&gt;</title>
999 <para>
1000 List Local group members. The group must be specified by name.
1001 </para>
1003 </refsect2>
1005 <refsect2>
1006 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
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>
1013 </refsect2>
1015 <refsect2>
1016 <title>SAM SHOW &lt;NAME&gt;</title>
1018 <para>
1019 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1020 account.
1021 </para>
1023 </refsect2>
1025 <refsect2>
1026 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1028 <para>
1029 Set the home directory for a user account.
1030 </para>
1032 </refsect2>
1034 <refsect2>
1035 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1037 <para>
1038 Set the profile path for a user account.
1039 </para>
1041 </refsect2>
1043 <refsect2>
1044 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1046 <para>
1047 Set the comment for a user or group account.
1048 </para>
1050 </refsect2>
1052 <refsect2>
1053 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1055 <para>
1056 Set the full name for a user account.
1057 </para>
1059 </refsect2>
1061 <refsect2>
1062 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1064 <para>
1065 Set the logon script for a user account.
1066 </para>
1068 </refsect2>
1070 <refsect2>
1071 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1073 <para>
1074 Set the home drive for a user account.
1075 </para>
1077 </refsect2>
1079 <refsect2>
1080 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1082 <para>
1083 Set the workstations a user account is allowed to log in from.
1084 </para>
1086 </refsect2>
1088 <refsect2>
1089 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1091 <para>
1092 Set the "disabled" flag for a user account.
1093 </para>
1095 </refsect2>
1097 <refsect2>
1098 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1100 <para>
1101 Set the "password not required" flag for a user account.
1102 </para>
1104 </refsect2>
1106 <refsect2>
1107 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1109 <para>
1110 Set the "autolock" flag for a user account.
1111 </para>
1113 </refsect2>
1115 <refsect2>
1116 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1118 <para>
1119 Set the "password do not expire" flag for a user account.
1120 </para>
1122 </refsect2>
1124 <refsect2>
1125 <title>SAM SET PWDMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1127 <para>
1128 Set or unset the "password must change" flag for a user account.
1129 </para>
1131 </refsect2>
1133 <refsect2>
1134 <title>SAM POLICY LIST</title>
1136 <para>
1137 List the avilable account policies.
1138 </para>
1140 </refsect2>
1142 <refsect2>
1143 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1145 <para>
1146 Show the account policy value.
1147 </para>
1149 </refsect2>
1151 <refsect2>
1152 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1154 <para>
1155 Set a value for the account policy.
1156 Valid values can be: "forever", "never", "off", or a number.
1157 </para>
1159 </refsect2>
1161 <refsect2>
1162 <title>SAM PROVISION</title>
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>
1170 </refsect2>
1172 <refsect2>
1173 <title>IDMAP DUMP &lt;local tdb file name&gt;</title>
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>
1180 </refsect2>
1182 <refsect2>
1183 <title>IDMAP RESTORE [input file]</title>
1185 <para>
1186 Restore the mappings from the specified file or stdin.
1187 </para>
1189 </refsect2>
1191 <refsect2>
1192 <title>IDMAP SECRET &lt;DOMAIN&gt;|ALLOC &lt;secret&gt;</title>
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>
1200 </refsect2>
1202 <refsect2>
1203 <title>USERSHARE</title>
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>
1210 <para>
1211 To set this up, first set up your smb.conf by adding to the [global] section :
1213 usershare path = /usr/local/samba/lib/usershares
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".
1219 Set the permissions on /usr/local/samba/lib/usershares to 01770.
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).
1225 Finally, tell smbd how many usershares you will allow by adding to the [global]
1226 section of smb.conf a line such as :
1228 usershare max shares = 100.
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>
1234 <para>The usershare commands are:
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>
1243 </para>
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>
1248 <para>
1249 Add or replace a new user defined share, with name "sharename".
1250 </para>
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>
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>
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>
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>
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>
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>
1297 <refsect3>
1298 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
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>
1306 </refsect3>
1308 <refsect3>
1309 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1311 <para>
1312 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1313 </para>
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>
1323 <para>
1324 The information given about a share looks like :
1326 [foobar]
1327 path=/home/jeremy
1328 comment=testme
1329 usershare_acl=Everyone:F
1330 guest_ok=n
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>
1336 </refsect3>
1338 <refsect3>
1339 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1341 <para>
1342 List all the user defined shares owned by the current user matching the given pattern, or all users.
1343 </para>
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>
1353 </refsect3>
1355 </refsect2>
1357 <refsect2>
1358 <title>CONF</title>
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>
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>
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>
1394 <refsect3>
1395 <title>CONF LIST</title>
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>
1403 <refsect3>
1404 <title>CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
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>
1419 <refsect3>
1420 <title>CONF LISTSHARES</title>
1422 <para>
1423 List the names of the shares defined in registry.
1424 </para>
1425 </refsect3>
1427 <refsect3>
1428 <title>CONF DROP</title>
1430 <para>
1431 Delete the complete configuration data from registry.
1432 </para>
1433 </refsect3>
1435 <refsect3>
1436 <title>CONF SHOWSHARE <replaceable>sharename</replaceable></title>
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>
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>
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>
1457 <refsect3>
1458 <title>CONF DELSHARE <replaceable>sharename</replaceable></title>
1460 <para>
1461 Delete a share definition from registry.
1462 </para>
1463 </refsect3>
1465 <refsect3>
1466 <title>CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
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>
1474 <refsect3>
1475 <title>CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1477 <para>
1478 Show a parameter stored in registry.
1479 </para>
1480 </refsect3>
1482 <refsect3>
1483 <title>CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1485 <para>
1486 Delete a parameter stored in registry.
1487 </para>
1488 </refsect3>
1490 <refsect3>
1491 <title></title>
1493 <para>
1494 </para>
1495 </refsect3>
1497 </refsect2>
1499 <refsect2>
1500 <title>HELP [COMMAND]</title>
1502 <para>Gives usage information for the specified command.</para>
1504 </refsect2>
1506 </refsect1>
1508 <refsect1>
1509         <title>VERSION</title>
1511         <para>This man page is complete for version 3.0 of the Samba 
1512         suite.</para>
1513 </refsect1>
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>
1523         <para>The net manpage was written by Jelmer Vernooij.</para>
1524         
1525 </refsect1>
1527 </refentry>