Moving docs tree to docs-xml to make room for generated docs in the release tarball.
[Samba.git] / docs-xml / manpages-3 / net.8.xml
blob9e2558eb322777e93d076a8c7bbc5a5db257d1b7
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         <refmiscinfo class="source">Samba</refmiscinfo>
9         <refmiscinfo class="manual">System Administration tools</refmiscinfo>
10         <refmiscinfo class="version">3.2</refmiscinfo>
11 </refmeta>
14 <refnamediv>
15         <refname>net</refname>
16         <refpurpose>Tool for administration of Samba and remote
17         CIFS servers.
18         </refpurpose>
19 </refnamediv>
21 <refsynopsisdiv>
22         <cmdsynopsis>
23                 <command>net</command>
24                 <arg choice="req">&lt;ads|rap|rpc&gt;</arg>
25                 <arg choice="opt">-h</arg>
26                 <arg choice="opt">-w workgroup</arg>
27                 <arg choice="opt">-W myworkgroup</arg>
28                 <arg choice="opt">-U user</arg>
29                 <arg choice="opt">-I ip-address</arg>
30                 <arg choice="opt">-p port</arg>
31                 <arg choice="opt">-n myname</arg>
32                 <arg choice="opt">-s conffile</arg>
33                 <arg choice="opt">-S server</arg>
34                 <arg choice="opt">-l</arg>
35                 <arg choice="opt">-P</arg>
36                 <arg choice="opt">-d debuglevel</arg>
37                 <arg choice="opt">-V</arg>
38         </cmdsynopsis>
39 </refsynopsisdiv>
41 <refsect1>
42         <title>DESCRIPTION</title>
44         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
45         <manvolnum>7</manvolnum></citerefentry> suite.</para>
47         <para>The Samba net utility is meant to work just like the net utility 
48         available for windows and DOS. The first argument should be used 
49         to specify the protocol to use when executing a certain command. 
50         ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3) 
51         clients and RPC can be used for NT4 and Windows 2000. If this 
52         argument is omitted, net will try to determine it automatically. 
53         Not all commands are available on all protocols.
54         </para>
56 </refsect1>
58 <refsect1>
59         <title>OPTIONS</title>
61         <variablelist>
62                 &stdarg.help;
63                 
64                 <varlistentry>
65                 <term>-w target-workgroup</term>
66                 <listitem><para>
67                 Sets target workgroup or domain. You have to specify 
68                 either this option or the IP address or the name of a server.
69                 </para></listitem>
70                 </varlistentry>
72                 <varlistentry>
73                 <term>-W workgroup</term>
74                 <listitem><para>
75                 Sets client workgroup or domain
76                 </para></listitem>
77                 </varlistentry>
79                 <varlistentry>
80                 <term>-U user</term>
81                 <listitem><para>
82                 User name to use
83                 </para></listitem>
84                 </varlistentry>
86                 <varlistentry>
87                 <term>-I ip-address</term>
88                 <listitem><para>
89                 IP address of target server to use. You have to
90                 specify either this option or a target workgroup or
91                 a target server.
92                 </para></listitem>
93                 </varlistentry>
95                 <varlistentry>
96                 <term>-p port</term>
97                 <listitem><para>
98                 Port on the target server to connect to (usually 139 or 445). 
99                 Defaults to trying 445 first, then 139.
100                 </para></listitem>
101                 </varlistentry>
103                 &stdarg.netbios.name;
104                 &stdarg.configfile;
106                 <varlistentry>
107                 <term>-S server</term>
108                 <listitem><para>
109                 Name of target server. You should specify either 
110                 this option or a target workgroup or a target IP address.
111                 </para></listitem>
112                 </varlistentry>
114                 <varlistentry>
115                 <term>-l</term>
116                 <listitem><para>
117                 When listing data, give more information on each item.
118                 </para></listitem>
119                 </varlistentry>
121                 <varlistentry>
122                 <term>-P</term>
123                 <listitem><para>
124                 Make queries to the external server using the machine account of the local server.
125                 </para></listitem>
126                 </varlistentry>
128                 &stdarg.server.debug;
129         </variablelist>
130 </refsect1>
132 <refsect1>
133 <title>COMMANDS</title>
135 <refsect2>
136 <title>CHANGESECRETPW</title>
138 <para>This command allows the Samba machine account password to be set from an external application
139 to a machine account password that has already been stored in Active Directory. DO NOT USE this command
140 unless you know exactly what you are doing. The use of this command requires that the force flag (-f)
141 be used also. There will be NO command prompt. Whatever information is piped into stdin, either by
142 typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use
143 this without care and attention as it will overwrite a legitimate machine password without warning.
144 YOU HAVE BEEN WARNED.
145 </para>
147 </refsect2>
149 <refsect2>
150         <title>TIME</title>
152         <para>The <command>NET TIME</command> command allows you to view the time on a remote server
153         or synchronise the time on the local server with the time on the remote server.</para>
155 <refsect3>
156 <title>TIME</title>
158 <para>Without any options, the <command>NET TIME</command> command 
159 displays the time on the remote server.
160 </para>
162 </refsect3>
164 <refsect3>
165 <title>TIME SYSTEM</title>
167 <para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.</para>
169 </refsect3>
171 <refsect3>
172 <title>TIME SET</title>
173 <para>Tries to set the date and time of the local server to that on 
174 the remote server using <command>/bin/date</command>. </para>
176 </refsect3>
178 <refsect3>
179 <title>TIME ZONE</title>
181 <para>Displays the timezone in hours from GMT on the remote computer.</para>
183 </refsect3>
184 </refsect2>
186 <refsect2>
187 <title>[RPC|ADS] JOIN [TYPE] [-U username[%password]] [createupn=UPN] [createcomputer=OU] [options]</title>
189 <para>
190 Join a domain.  If the account already exists on the server, and 
191 [TYPE] is MEMBER, the machine will attempt to join automatically. 
192 (Assuming that the machine has been created in server manager)
193 Otherwise, a password will be prompted for, and a new account may
194 be created.</para>
196 <para>
197 [TYPE] may be PDC, BDC or MEMBER to specify the type of server
198 joining the domain.
199 </para>
201 <para>
202 [UPN] (ADS only) set the principalname attribute during the join.  The default
203 format is host/netbiosname@REALM.
204 </para>
206 <para>
207 [OU] (ADS only) Precreate the computer account in a specific OU.  The
208 OU string reads from top to bottom without RDNs, and is delimited by
209 a '/'.  Please note that '\' is used for escape by both the shell
210 and ldap, so it may need to be doubled or quadrupled to pass through, 
211 and it is not used as a delimiter.
212 </para>
213 </refsect2>
215 <refsect2>
216 <title>[RPC] OLDJOIN [options]</title>
218 <para>Join a domain. Use the OLDJOIN option to join the domain 
219 using the old style of domain joining - you need to create a trust 
220 account in server manager first.</para>
221 </refsect2>
223 <refsect2>
224 <title>[RPC|ADS] USER</title>
226 <refsect3>
227 <title>[RPC|ADS] USER</title>
229 <para>List all users</para>
231 </refsect3>
233 <refsect3>
234 <title>[RPC|ADS] USER DELETE <replaceable>target</replaceable></title>
236 <para>Delete specified user</para>
238 </refsect3>
240 <refsect3>
241 <title>[RPC|ADS] USER INFO <replaceable>target</replaceable></title>
243 <para>List the domain groups of the specified user.</para>
245 </refsect3>
247 <refsect3>
248 <title>[RPC|ADS] USER RENAME <replaceable>oldname</replaceable> <replaceable>newname</replaceable></title>
250 <para>Rename specified user.</para>
252 </refsect3>
254 <refsect3>
255 <title>[RPC|ADS] USER ADD <replaceable>name</replaceable> [password] [-F user flags] [-C comment]</title>
257 <para>Add specified user.</para>
258 </refsect3>
259 </refsect2>
261 <refsect2>
262 <title>[RPC|ADS] GROUP</title>
264 <refsect3>
265 <title>[RPC|ADS] GROUP [misc options] [targets]</title>
266 <para>List user groups.</para>
267 </refsect3>
269 <refsect3>
270 <title>[RPC|ADS] GROUP DELETE <replaceable>name</replaceable> [misc. options]</title>
272 <para>Delete specified group.</para>
274 </refsect3>
276 <refsect3>
277 <title>[RPC|ADS] GROUP ADD <replaceable>name</replaceable> [-C comment]</title>
279 <para>Create specified group.</para>
281 </refsect3>
282 </refsect2>
284 <refsect2>
285 <title>[RAP|RPC] SHARE</title>
287 <refsect3>
288 <title>[RAP|RPC] SHARE [misc. options] [targets]</title>
290 <para>Enumerates all exported resources (network shares) on target server.</para>
292 </refsect3>
294 <refsect3>
295 <title>[RAP|RPC] SHARE ADD <replaceable>name=serverpath</replaceable> [-C comment] [-M maxusers] [targets]</title>
297 <para>Adds a share from a server (makes the export active). Maxusers 
298 specifies the number of users that can be connected to the 
299 share simultaneously.</para>
301 </refsect3>
303 <refsect3>
304 <title>SHARE DELETE <replaceable>sharename</replaceable></title>
306 <para>Delete specified share.</para>
307 </refsect3>
308 </refsect2>
310 <refsect2>
311 <title>[RPC|RAP] FILE</title>
313 <refsect3>
314 <title>[RPC|RAP] FILE</title>
316 <para>List all open files on remote server.</para>
318 </refsect3>
320 <refsect3>
321 <title>[RPC|RAP] FILE CLOSE <replaceable>fileid</replaceable></title>
323 <para>Close file with specified <replaceable>fileid</replaceable> on 
324 remote server.</para>
326 </refsect3>
328 <refsect3>
329 <title>[RPC|RAP] FILE INFO <replaceable>fileid</replaceable></title>
331 <para>
332 Print information on specified <replaceable>fileid</replaceable>. 
333 Currently listed are: file-id, username, locks, path, permissions.
334 </para>
336 </refsect3>
338 <refsect3>
339 <title>[RAP|RPC] FILE USER <replaceable>user</replaceable></title>
341 <para>
342 List files opened by specified <replaceable>user</replaceable>.
343 Please note that <command>net rap file user</command> does not work
344 against Samba servers. 
345 </para>
347 </refsect3>
349 </refsect2>
351 <refsect2>
352 <title>SESSION</title>
354 <refsect3>
355 <title>RAP SESSION</title>
357 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
358 sessions on the target server.</para>
360 </refsect3>
362 <refsect3>
363 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
365 <para>Close the specified sessions.</para>
367 </refsect3>
369 <refsect3>
370 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
372 <para>Give a list with all the open files in specified session.</para>
374 </refsect3>
376 </refsect2>
378 <refsect2>
379 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
381 <para>List all servers in specified domain or workgroup. Defaults
382 to local domain.</para>
384 </refsect2>
386 <refsect2>
387 <title>RAP DOMAIN</title>
389 <para>Lists all domains and workgroups visible on the 
390 current network.</para>
392 </refsect2>
394 <refsect2>
395 <title>RAP PRINTQ</title>
397 <refsect3>
398 <title>RAP PRINTQ LIST <replaceable>QUEUE_NAME</replaceable></title>
400 <para>Lists the specified print queue and print jobs on the server.
401 If the <replaceable>QUEUE_NAME</replaceable> is omitted, all 
402 queues are listed.</para>
404 </refsect3>
406 <refsect3>
407 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
409 <para>Delete job with specified id.</para>
411 </refsect3>
413 </refsect2>
415 <refsect2>
416 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
418 <para>
419 Validate whether the specified user can log in to the 
420 remote server. If the password is not specified on the commandline, it 
421 will be prompted. 
422 </para>
424 &not.implemented;
426 </refsect2>
428 <refsect2>
429 <title>RAP GROUPMEMBER</title>
431 <refsect3>
432 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
434 <para>List all members of the specified group.</para>
436 </refsect3>
438 <refsect3>
439 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
441 <para>Delete member from group.</para>
443 </refsect3>
445 <refsect3>
446 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
448 <para>Add member to group.</para>
450 </refsect3>
452 </refsect2>
454 <refsect2>
455 <title>RAP ADMIN <replaceable>command</replaceable></title>
457 <para>Execute the specified <replaceable>command</replaceable> on 
458 the remote server. Only works with OS/2 servers.
459 </para>
461 &not.implemented;
463 </refsect2>
465 <refsect2>
466 <title>RAP SERVICE</title>
468 <refsect3>
469 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
471 <para>Start the specified service on the remote server. Not implemented yet.</para>
473 &not.implemented;
475 </refsect3>
477 <refsect3>
478 <title>RAP SERVICE STOP</title>
480 <para>Stop the specified service on the remote server.</para>
482 &not.implemented;
484 </refsect3>
486 </refsect2>
488 <refsect2>
489 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
491 <para>
492 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
493 </para>
495 </refsect2>
497 <refsect2>
498 <title>LOOKUP</title>
500 <refsect3>
501 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
503 <para>
504 Lookup the IP address of the given host with the specified type (netbios suffix). 
505 The type defaults to 0x20 (workstation).
506 </para>
508 </refsect3>
510 <refsect3>
511 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable>]</title>
513 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
515 </refsect3>
517 <refsect3>
518 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
520 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
521 Defaults to local realm.</para>
523 </refsect3>
525 <refsect3>
526 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
528 <para>Give IP's of Domain Controllers for specified <replaceable>
529 DOMAIN</replaceable>. Defaults to local domain.</para>
531 </refsect3>
533 <refsect3>
534 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
536 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
537 or workgroup. Defaults to local domain.</para>
539 </refsect3>
541 </refsect2>
543 <refsect2>
544 <title>CACHE</title>
546 <para>Samba uses a general caching interface called 'gencache'. It 
547 can be controlled using 'NET CACHE'.</para>
549 <para>All the timeout parameters support the suffixes:
551 <simplelist>
552 <member>s - Seconds</member>
553 <member>m - Minutes</member>
554 <member>h - Hours</member>
555 <member>d - Days</member>
556 <member>w - Weeks</member>
557 </simplelist>
559 </para>
561 <refsect3>
562 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
564 <para>Add specified key+data to the cache with the given timeout.</para>
566 </refsect3>
568 <refsect3>
569 <title>CACHE DEL <replaceable>key</replaceable></title>
571 <para>Delete key from the cache.</para>
573 </refsect3>
575 <refsect3>
576 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
578 <para>Update data of existing cache entry.</para>
580 </refsect3>
582 <refsect3>
583 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
585 <para>Search for the specified pattern in the cache data.</para>
587 </refsect3>
589 <refsect3>
590 <title>CACHE LIST</title>
592 <para>
593 List all current items in the cache.
594 </para>
596 </refsect3>
598 <refsect3>
599 <title>CACHE FLUSH</title>
601 <para>Remove all the current items from the cache.</para>
603 </refsect3>
605 </refsect2>
607 <refsect2>
608 <title>GETLOCALSID [DOMAIN]</title>
610 <para>Prints the SID of the specified domain, or if the parameter is
611 omitted, the SID of the local server.</para>
613 </refsect2>
615 <refsect2>
616 <title>SETLOCALSID S-1-5-21-x-y-z</title>
618 <para>Sets SID for the local server to the specified SID.</para>
620 </refsect2>
622 <refsect2>
623 <title>GETDOMAINSID</title>
625 <para>Prints the local machine SID and the SID of the current 
626 domain.</para>
628 </refsect2>
630 <refsect2>
631 <title>SETDOMAINSID</title>
633 <para>Sets the SID of the current domain.</para>
635 </refsect2>
637 <refsect2>
638 <title>GROUPMAP</title>
640 <para>Manage the mappings between Windows group SIDs and UNIX groups.
641 Common options include:</para>
643 <itemizedlist>
644 <listitem><para>unixgroup - Name of the UNIX group</para></listitem>
645 <listitem><para>ntgroup - Name of the Windows NT group (must be
646   resolvable to a SID</para></listitem>
647 <listitem><para>rid - Unsigned 32-bit integer</para></listitem>
648 <listitem><para>sid - Full SID in the form of "S-1-..."</para></listitem>
649 <listitem><para>type - Type of the group; either 'domain', 'local',
650   or 'builtin'</para></listitem>
651 <listitem><para>comment - Freeform text description of the group</para></listitem>
652 </itemizedlist>
654 <refsect3>
655 <title>GROUPMAP ADD</title>
657 <para>
658 Add a new group mapping entry:
659 <programlisting>
660 net groupmap add {rid=int|sid=string} unixgroup=string \
661         [type={domain|local}] [ntgroup=string] [comment=string]
662 </programlisting>
663 </para>
665 </refsect3>
667 <refsect3>
668 <title>GROUPMAP DELETE</title>
670 <para>Delete a group mapping entry. If more than one group name matches, the first entry found is deleted.</para>
672 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
674 </refsect3>
676 <refsect3>
677 <title>GROUPMAP MODIFY</title>
679 <para>Update en existing group entry.</para>
681 <para>
682 <programlisting>
683 net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
684        [comment=string] [type={domain|local}]
685 </programlisting>
686 </para>
687 </refsect3>
689 <refsect3>
690 <title>GROUPMAP LIST</title>
692 <para>List existing group mapping entries.</para>
694 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
696 </refsect3>
697 </refsect2>
701 <refsect2>
702 <title>MAXRID</title>
704 <para>Prints out the highest RID currently in use on the local
705 server (by the active 'passdb backend').
706 </para>
708 </refsect2>
710 <refsect2>
711 <title>RPC INFO</title>
713 <para>Print information about the domain of the remote server,
714 such as domain name, domain sid and number of users and groups.
715 </para>
717 </refsect2>
719 <refsect2>
720 <title>[RPC|ADS] TESTJOIN</title>
722 <para>Check whether participation in a domain is still valid.</para>
724 </refsect2>
726 <refsect2>
727 <title>[RPC|ADS] CHANGETRUSTPW</title>
729 <para>Force change of domain trust password.</para>
731 </refsect2>
733 <refsect2>
734 <title>RPC TRUSTDOM</title>
736 <refsect3>
737 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
739 <para>Add a interdomain trust account for <replaceable>DOMAIN</replaceable>. 
740 This is in fact a Samba account named <replaceable>DOMAIN$</replaceable> 
741 with the account flag <constant>'I'</constant> (interdomain trust account). 
742 If the command is used against localhost it has the same effect as 
743 <command>smbpasswd -a -i DOMAIN</command>. Please note that both commands
744 expect a appropriate UNIX account. 
745 </para>
747 </refsect3>
749 <refsect3>
750 <title>RPC TRUSTDOM DEL <replaceable>DOMAIN</replaceable></title>
752 <para>Remove interdomain trust account for 
753 <replaceable>DOMAIN</replaceable>. If it is used against localhost 
754 it has the same effect as <command>smbpasswd -x DOMAIN$</command>. 
755 </para>
757 </refsect3>
759 <refsect3>
760 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
762 <para>
763 Establish a trust relationship to a trusting domain. 
764 Interdomain account must already be created on the remote PDC.
765 </para>
767 </refsect3>
769 <refsect3>
770 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
771 <para>Abandon relationship to trusted domain</para>
773 </refsect3>
775 <refsect3>
776 <title>RPC TRUSTDOM LIST</title>
778 <para>List all current interdomain trust relationships.</para>
780 </refsect3>
782 <refsect3>
783 <title>RPC RIGHTS</title>
785 <para>This subcommand is used to view and manage Samba's rights assignments (also 
786 referred to as privileges).  There are three options currently available: 
787 <parameter>list</parameter>, <parameter>grant</parameter>, and 
788 <parameter>revoke</parameter>.  More details on Samba's privilege model and its use
789 can be found in the Samba-HOWTO-Collection.</para>
791 </refsect3>
794 </refsect2>
796 <refsect2>
797 <title>RPC ABORTSHUTDOWN</title>
799 <para>Abort the shutdown of a remote server.</para>
801 </refsect2>
803 <refsect2>
804 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
806 <para>Shut down the remote server.</para>
808 <variablelist>
809 <varlistentry>
810 <term>-r</term>
811 <listitem><para>
812 Reboot after shutdown.
813 </para></listitem>
814 </varlistentry>
816 <varlistentry>
817 <term>-f</term>
818 <listitem><para>
819 Force shutting down all applications.
820 </para></listitem>
821 </varlistentry>
823 <varlistentry>
824 <term>-t timeout</term>
825 <listitem><para>
826 Timeout before system will be shut down. An interactive 
827 user of the system can use this time to cancel the shutdown.
828 </para></listitem>
829 </varlistentry>'>
831 <varlistentry>
832 <term>-C message</term>
833 <listitem><para>Display the specified message on the screen to 
834 announce the shutdown.</para></listitem>
835 </varlistentry>
836 </variablelist>
838 </refsect2>
840 <refsect2>
841 <title>RPC SAMDUMP</title>
843 <para>Print out sam database of remote server. You need
844 to run this against the PDC, from a Samba machine joined as a BDC. </para>
845 </refsect2>
847 <refsect2>
848 <title>RPC VAMPIRE</title>
850 <para>Export users, aliases and groups from remote server to 
851 local server.  You need to run this against the PDC, from a Samba machine joined as a BDC. 
852 </para>
854 </refsect2>
856 <refsect2>
857 <title>RPC GETSID</title>
859 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
861 </refsect2>
863 <refsect2>
864 <title>ADS LEAVE</title>
866 <para>Make the remote host leave the domain it is part of. </para>
868 </refsect2>
870 <refsect2>
871 <title>ADS STATUS</title>
873 <para>Print out status of machine account of the local machine in ADS.
874 Prints out quite some debug info. Aimed at developers, regular 
875 users should use <command>NET ADS TESTJOIN</command>.</para>
877 </refsect2>
879 <refsect2>
880 <title>ADS PRINTER</title>
882 <refsect3>
883 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
885 <para>
886 Lookup info for <replaceable>PRINTER</replaceable> on <replaceable>SERVER</replaceable>. The printer name defaults to "*", the 
887 server name defaults to the local host.</para>
889 </refsect3>
891 <refsect3>
892 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
894 <para>Publish specified printer using ADS.</para>
896 </refsect3>
898 <refsect3>
899 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
901 <para>Remove specified printer from ADS directory.</para>
903 </refsect3>
905 </refsect2>
907 <refsect2>
908 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
910 <para>Perform a raw LDAP search on a ADS server and dump the results. The 
911 expression is a standard LDAP search expression, and the 
912 attributes are a list of LDAP fields to show in the results.</para>
914 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
915 </para>
917 </refsect2>
919 <refsect2>
920 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
922 <para>
923 Perform a raw LDAP search on a ADS server and dump the results. The 
924 DN standard LDAP DN, and the attributes are a list of LDAP fields 
925 to show in the result. 
926 </para>
928 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
930 </refsect2>
932 <refsect2>
933 <title>ADS WORKGROUP</title>
935 <para>Print out workgroup name for specified kerberos realm.</para>
937 </refsect2>
939 <refsect2>
940 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
942 <para>
943 (Re)Create a BUILTIN group.
944 Only a wellknown set of BUILTIN groups can be created with this command.
945 This is the list of currently recognized group names: Administrators,
946 Users, Guests, Power Users, Account Operators, Server Operators, Print
947 Operators, Backup Operators, Replicator, RAS Servers, Pre-Windows 2000
948 compatible Access.
950 This command requires a running Winbindd with idmap allocation properly
951 configured. The group gid will be allocated out of the winbindd range.
952 </para>
954 </refsect2>
956 <refsect2>
957 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
959 <para>
960 Create a LOCAL group (also known as Alias).
962 This command requires a running Winbindd with idmap allocation properly
963 configured. The group gid will be allocated out of the winbindd range.
964 </para>
966 </refsect2>
968 <refsect2>
969 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
971 <para>
972 Delete an existing LOCAL group (also known as Alias).
974 </para>
976 </refsect2>
978 <refsect2>
979 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
981 <para>
982 Map an existing Unix group and make it a Domain Group, the domain group
983 will have the same name.
984 </para>
986 </refsect2>
988 <refsect2>
989 <title>SAM UNMAPUNIXGROUP &lt;NAME&gt;</title>
991 <para>
992 Remove an existing group mapping entry.
993 </para>
995 </refsect2>
997 <refsect2>
998 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1000 <para>
1001 Add a member to a Local group. The group can be specified only by name,
1002 the member can be specified by name or SID.
1003 </para>
1005 </refsect2>
1007 <refsect2>
1008 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
1010 <para>
1011 Remove a member from a Local group. The group and the member must be
1012 specified by name.
1013 </para>
1015 </refsect2>
1017 <refsect2>
1018 <title>SAM LISTMEM &lt;GROUP&gt;</title>
1020 <para>
1021 List Local group members. The group must be specified by name.
1022 </para>
1024 </refsect2>
1026 <refsect2>
1027 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
1029 <para>
1030 List the specified set of accounts by name. If verbose is specified,
1031 the rid and description is also provided for each account.
1032 </para>
1034 </refsect2>
1036 <refsect2>
1037 <title>SAM SHOW &lt;NAME&gt;</title>
1039 <para>
1040 Show the full DOMAIN\\NAME the SID and the type for the corresponding
1041 account.
1042 </para>
1044 </refsect2>
1046 <refsect2>
1047 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1049 <para>
1050 Set the home directory for a user account.
1051 </para>
1053 </refsect2>
1055 <refsect2>
1056 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1058 <para>
1059 Set the profile path for a user account.
1060 </para>
1062 </refsect2>
1064 <refsect2>
1065 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1067 <para>
1068 Set the comment for a user or group account.
1069 </para>
1071 </refsect2>
1073 <refsect2>
1074 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1076 <para>
1077 Set the full name for a user account.
1078 </para>
1080 </refsect2>
1082 <refsect2>
1083 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1085 <para>
1086 Set the logon script for a user account.
1087 </para>
1089 </refsect2>
1091 <refsect2>
1092 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1094 <para>
1095 Set the home drive for a user account.
1096 </para>
1098 </refsect2>
1100 <refsect2>
1101 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1103 <para>
1104 Set the workstations a user account is allowed to log in from.
1105 </para>
1107 </refsect2>
1109 <refsect2>
1110 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1112 <para>
1113 Set the "disabled" flag for a user account.
1114 </para>
1116 </refsect2>
1118 <refsect2>
1119 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1121 <para>
1122 Set the "password not required" flag for a user account.
1123 </para>
1125 </refsect2>
1127 <refsect2>
1128 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1130 <para>
1131 Set the "autolock" flag for a user account.
1132 </para>
1134 </refsect2>
1136 <refsect2>
1137 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1139 <para>
1140 Set the "password do not expire" flag for a user account.
1141 </para>
1143 </refsect2>
1145 <refsect2>
1146 <title>SAM SET PWDMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1148 <para>
1149 Set or unset the "password must change" flag for a user account.
1150 </para>
1152 </refsect2>
1154 <refsect2>
1155 <title>SAM POLICY LIST</title>
1157 <para>
1158 List the available account policies.
1159 </para>
1161 </refsect2>
1163 <refsect2>
1164 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1166 <para>
1167 Show the account policy value.
1168 </para>
1170 </refsect2>
1172 <refsect2>
1173 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1175 <para>
1176 Set a value for the account policy.
1177 Valid values can be: "forever", "never", "off", or a number.
1178 </para>
1180 </refsect2>
1182 <refsect2>
1183 <title>SAM PROVISION</title>
1185 <para>
1186 Only available if ldapsam:editposix is set and winbindd is running.
1187 Properly populates the ldap tree with the basic accounts (Administrator)
1188 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1189 </para>
1191 </refsect2>
1193 <refsect2>
1194 <title>IDMAP DUMP &lt;local tdb file name&gt;</title>
1196 <para>
1197 Dumps the mappings contained in the local tdb file specified.
1198 This command is useful to dump only the mappings produced by the idmap_tdb backend.
1199 </para>
1201 </refsect2>
1203 <refsect2>
1204 <title>IDMAP RESTORE [input file]</title>
1206 <para>
1207 Restore the mappings from the specified file or stdin.
1208 </para>
1210 </refsect2>
1212 <refsect2>
1213 <title>IDMAP SECRET &lt;DOMAIN&gt;|ALLOC &lt;secret&gt;</title>
1215 <para>
1216 Store a secret for the specified domain, used primarily for domains
1217 that use idmap_ldap as a backend. In this case the secret is used
1218 as the password for the user DN used to bind to the ldap server.
1219 </para>
1221 </refsect2>
1223 <refsect2>
1224 <title>USERSHARE</title>
1226 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1227 non-root users to add user defined shares to be exported using the "net usershare"
1228 commands.
1229 </para>
1231 <para>
1232 To set this up, first set up your smb.conf by adding to the [global] section:
1234 usershare path = /usr/local/samba/lib/usershares
1236 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1237 set the group owner to the UNIX group who should have the ability to create usershares,
1238 for example a group called "serverops".
1240 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1242 (Owner and group all access, no access for others, plus the sticky bit,
1243 which means that a file in that directory can be renamed or deleted only
1244 by the owner of the file).
1246 Finally, tell smbd how many usershares you will allow by adding to the [global]
1247 section of smb.conf a line such as :
1249 usershare max shares = 100.
1251 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1252 can create user defined shares on demand using the commands below.
1253 </para>
1255 <para>The usershare commands are:
1257 <simplelist>
1258 <member>net usershare add sharename path [comment] [acl] [guest_ok=[y|n]] - to add or change a user defined share.</member>
1259 <member>net usershare delete sharename - to delete a user defined share.</member>
1260 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1261 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1262 </simplelist>
1264 </para>
1266 <refsect3>
1267 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1269 <para>
1270 Add or replace a new user defined share, with name "sharename".
1271 </para>
1273 <para>
1274 "path" specifies the absolute pathname on the system to be exported.
1275 Restrictions may be put on this, see the global smb.conf parameters:
1276 "usershare owner only", "usershare prefix allow list", and
1277 "usershare prefix deny list".
1278 </para>
1280 <para>
1281 The optional "comment" parameter is the comment that will appear
1282 on the share when browsed to by a client.
1283 </para>
1285 <para>The optional "acl" field
1286 specifies which users have read and write access to the entire share.
1287 Note that guest connections are not allowed unless the smb.conf parameter
1288 "usershare allow guests" has been set. The definition of a user
1289 defined share acl is: "user:permission", where user is a valid
1290 username on the system and permission can be "F", "R", or "D".
1291 "F" stands for "full permissions", ie. read and write permissions.
1292 "D" stands for "deny" for a user, ie. prevent this user from accessing
1293 this share.
1294 "R" stands for "read only", ie. only allow read access to this
1295 share (no creation of new files or directories or writing to files).
1296 </para>
1298 <para>
1299 The default if no "acl" is given is "Everyone:R", which means any 
1300 authenticated user has read-only access.
1301 </para>
1303 <para>
1304 The optional "guest_ok" has the same effect as the parameter of the
1305 same name in smb.conf, in that it allows guest access to this user
1306 defined share. This parameter is only allowed if the global parameter
1307 "usershare allow guests" has been set to true in the smb.conf.
1308 </para>
1310 There is no separate command to modify an existing user defined share,
1311 just use the "net usershare add [sharename]" command using the same
1312 sharename as the one you wish to modify and specify the new options
1313 you wish. The Samba smbd daemon notices user defined share modifications
1314 at connect time so will see the change immediately, there is no need
1315 to restart smbd on adding, deleting or changing a user defined share.
1316 </refsect3>
1318 <refsect3>
1319 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1321 <para>
1322 Deletes the user defined share by name. The Samba smbd daemon
1323 immediately notices this change, although it will not disconnect
1324 any users currently connected to the deleted share.
1325 </para>
1327 </refsect3>
1329 <refsect3>
1330 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1332 <para>
1333 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1334 </para>
1336 <para>
1337 net usershare info on its own dumps out info on the user defined shares that were
1338 created by the current user, or restricts them to share names that match the given
1339 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1340 If the '-l' or '--long' option is also given, it prints out info on user defined
1341 shares created by other users.
1342 </para>
1344 <para>
1345 The information given about a share looks like:
1347 [foobar]
1348 path=/home/jeremy
1349 comment=testme
1350 usershare_acl=Everyone:F
1351 guest_ok=n
1353 And is a list of the current settings of the user defined share that can be
1354 modified by the "net usershare add" command.
1355 </para>
1357 </refsect3>
1359 <refsect3>
1360 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1362 <para>
1363 List all the user defined shares owned by the current user matching the given pattern, or all users.
1364 </para>
1366 <para>
1367 net usershare list on its own list out the names of the user defined shares that were
1368 created by the current user, or restricts the list to share names that match the given
1369 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1370 If the '-l' or '--long' option is also given, it includes the names of user defined
1371 shares created by other users.
1372 </para>
1374 </refsect3>
1376 </refsect2>
1378 <refsect2>
1379 <title>CONF</title>
1381 <para>Starting with version 3.2.0, a Samba server can be configured by data
1382 stored in registry. This configuration data can be edited with the new "net
1383 conf" commands.
1384 </para>
1386 <para>
1387 The deployment of this configuration data can be activated in two levels from the
1388 <emphasis>smb.conf</emphasis> file: Share definitions from registry are
1389 activated by setting <parameter>registry shares</parameter> to
1390 <quote>yes</quote> in the [global] section and global configuration options are
1391 activated by setting <smbconfoption name="include">registry</smbconfoption> in
1392 the [global] section.
1393 See the <citerefentry><refentrytitle>smb.conf</refentrytitle>
1394 <manvolnum>5</manvolnum></citerefentry> manpage for details.
1395 </para>
1397 <para>The conf commands are:
1398 <simplelist>
1399 <member>net conf list - Dump the complete configuration in smb.conf like
1400 format.</member>
1401 <member>net conf import - Import configuration from file in smb.conf
1402 format.</member>
1403 <member>net conf listshares - List the registry shares.</member>
1404 <member>net conf drop - Delete the complete configuration from
1405 registry.</member>
1406 <member>net conf showshare - Show the definition of a registry share.</member>
1407 <member>net conf addshare - Create a new registry share.</member>
1408 <member>net conf delshare - Delete a registry share.</member>
1409 <member>net conf setparm - Store a parameter.</member>
1410 <member>net conf getparm - Retrieve the value of a parameter.</member>
1411 <member>net conf delparm - Delete a parameter.</member>
1412 </simplelist>
1413 </para>
1415 <refsect3>
1416 <title>CONF LIST</title>
1418 <para>
1419 Print the configuration data stored in the registry in a smb.conf-like format to
1420 standard output.
1421 </para>
1422 </refsect3>
1424 <refsect3>
1425 <title>CONF IMPORT <replaceable>[--test|-T]</replaceable> <replaceable>filename</replaceable> <replaceable>[section]</replaceable></title>
1427 <para>
1428 This command imports configuration from a file in smb.conf format.
1429 If a section encountered in the input file is present in registry,
1430 its contents is replaced. Sections of registry configuration that have
1431 no counterpart in the input file are not affected. If you want to delete these,
1432 you will have to use the "net conf drop" or "net conf delshare" commands.
1433 Optionally, a section may be specified to restrict the effect of the
1434 import command to that specific section. A test mode is enabled by specifying
1435 the parameter "-T" on the commandline. In test mode, no changes are made to the
1436 registry, and the resulting configuration is printed to standard output instead.
1437 </para>
1438 </refsect3>
1440 <refsect3>
1441 <title>CONF LISTSHARES</title>
1443 <para>
1444 List the names of the shares defined in registry.
1445 </para>
1446 </refsect3>
1448 <refsect3>
1449 <title>CONF DROP</title>
1451 <para>
1452 Delete the complete configuration data from registry.
1453 </para>
1454 </refsect3>
1456 <refsect3>
1457 <title>CONF SHOWSHARE <replaceable>sharename</replaceable></title>
1459 <para>
1460 Show the definition of the share or section specified. It is valid to specify
1461 "global" as sharename to retrieve the global configuration options from
1462 registry.
1463 </para>
1464 </refsect3>
1466 <refsect3>
1467 <title>CONF ADDSHARE <replaceable>sharename</replaceable> <replaceable>path</replaceable> [<replaceable>writeable={y|N}</replaceable> [<replaceable>guest_ok={y|N}</replaceable> [<replaceable>comment</replaceable>]]] </title>
1469 <para>Create a new share definition in registry.
1470 The sharename and path have to be given. The share name may
1471 <emphasis>not</emphasis> be "global". Optionally, values for the very
1472 common options "writeable", "guest ok" and a "comment" may be specified.
1473 The same result may be obtained by a sequence of "net conf setparm"
1474 commands.
1475 </para>
1476 </refsect3>
1478 <refsect3>
1479 <title>CONF DELSHARE <replaceable>sharename</replaceable></title>
1481 <para>
1482 Delete a share definition from registry.
1483 </para>
1484 </refsect3>
1486 <refsect3>
1487 <title>CONF SETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable> <replaceable>value</replaceable></title>
1489 <para>
1490 Store a parameter in registry. The section may be global or a sharename.
1491 The section is created if it does not exist yet.
1492 </para>
1493 </refsect3>
1495 <refsect3>
1496 <title>CONF GETPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1498 <para>
1499 Show a parameter stored in registry.
1500 </para>
1501 </refsect3>
1503 <refsect3>
1504 <title>CONF DELPARM <replaceable>section</replaceable> <replaceable>parameter</replaceable></title>
1506 <para>
1507 Delete a parameter stored in registry.
1508 </para>
1509 </refsect3>
1511 <refsect3>
1512 <title></title>
1514 <para>
1515 </para>
1516 </refsect3>
1518 </refsect2>
1520 <refsect2>
1521 <title>HELP [COMMAND]</title>
1523 <para>Gives usage information for the specified command.</para>
1525 </refsect2>
1527 </refsect1>
1529 <refsect1>
1530         <title>VERSION</title>
1532         <para>This man page is complete for version 3.0 of the Samba 
1533         suite.</para>
1534 </refsect1>
1536 <refsect1>
1537         <title>AUTHOR</title>
1538         
1539         <para>The original Samba software and related utilities 
1540         were created by Andrew Tridgell. Samba is now developed
1541         by the Samba Team as an Open Source project similar 
1542         to the way the Linux kernel is developed.</para>
1544         <para>The net manpage was written by Jelmer Vernooij.</para>
1545         
1546 </refsect1>
1548 </refentry>