Add documentation for new net sam subcommand deletelocalgroup.
[Samba.git] / docs / manpages-3 / net.8.xml
blob73bbf7a7a55c43cf42a1b48ad978da86e8a50766
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 a 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>sharenam</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</title>
338 &not.implemented;
340 </refsect3>
342 </refsect2>
344 <refsect2>
345 <title>SESSION</title>
347 <refsect3>
348 <title>RAP SESSION</title>
350 <para>Without any other options, SESSION enumerates all active SMB/CIFS 
351 sessions on the target server.</para>
353 </refsect3>
355 <refsect3>
356 <title>RAP SESSION DELETE|CLOSE <replaceable>CLIENT_NAME</replaceable></title>
358 <para>Close the specified sessions.</para>
360 </refsect3>
362 <refsect3>
363 <title>RAP SESSION INFO <replaceable>CLIENT_NAME</replaceable></title>
365 <para>Give a list with all the open files in specified session.</para>
367 </refsect3>
369 </refsect2>
371 <refsect2>
372 <title>RAP SERVER <replaceable>DOMAIN</replaceable></title>
374 <para>List all servers in specified domain or workgroup. Defaults
375 to local domain.</para>
377 </refsect2>
379 <refsect2>
380 <title>RAP DOMAIN</title>
382 <para>Lists all domains and workgroups visible on the 
383 current network.</para>
385 </refsect2>
387 <refsect2>
388 <title>RAP PRINTQ</title>
390 <refsect3>
391 <title>RAP PRINTQ LIST <replaceable>QUEUE_NAME</replaceable></title>
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>
397 </refsect3>
399 <refsect3>
400 <title>RAP PRINTQ DELETE <replaceable>JOBID</replaceable></title>
402 <para>Delete job with specified id.</para>
404 </refsect3>
406 </refsect2>
408 <refsect2>
409 <title>RAP VALIDATE <replaceable>user</replaceable> [<replaceable>password</replaceable>]</title>
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>
417 &not.implemented;
419 </refsect2>
421 <refsect2>
422 <title>RAP GROUPMEMBER</title>
424 <refsect3>
425 <title>RAP GROUPMEMBER LIST <replaceable>GROUP</replaceable></title>
427 <para>List all members of the specified group.</para>
429 </refsect3>
431 <refsect3>
432 <title>RAP GROUPMEMBER DELETE <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
434 <para>Delete member from group.</para>
436 </refsect3>
438 <refsect3>
439 <title>RAP GROUPMEMBER ADD <replaceable>GROUP</replaceable> <replaceable>USER</replaceable></title>
441 <para>Add member to group.</para>
443 </refsect3>
445 </refsect2>
447 <refsect2>
448 <title>RAP ADMIN <replaceable>command</replaceable></title>
450 <para>Execute the specified <replaceable>command</replaceable> on 
451 the remote server. Only works with OS/2 servers.
452 </para>
454 &not.implemented;
456 </refsect2>
458 <refsect2>
459 <title>RAP SERVICE</title>
461 <refsect3>
462 <title>RAP SERVICE START <replaceable>NAME</replaceable> [arguments...]</title>
464 <para>Start the specified service on the remote server. Not implemented yet.</para>
466 &not.implemented;
468 </refsect3>
470 <refsect3>
471 <title>RAP SERVICE STOP</title>
473 <para>Stop the specified service on the remote server.</para>
475 &not.implemented;
477 </refsect3>
479 </refsect2>
481 <refsect2>
482 <title>RAP PASSWORD <replaceable>USER</replaceable> <replaceable>OLDPASS</replaceable> <replaceable>NEWPASS</replaceable></title>
484 <para>
485 Change password of <replaceable>USER</replaceable> from <replaceable>OLDPASS</replaceable> to <replaceable>NEWPASS</replaceable>.
486 </para>
488 </refsect2>
490 <refsect2>
491 <title>LOOKUP</title>
493 <refsect3>
494 <title>LOOKUP HOST <replaceable>HOSTNAME</replaceable> [<replaceable>TYPE</replaceable>]</title>
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>
501 </refsect3>
503 <refsect3>
504 <title>LOOKUP LDAP [<replaceable>DOMAIN</replaceable></title>
506 <para>Give IP address of LDAP server of specified <replaceable>DOMAIN</replaceable>. Defaults to local domain.</para>
508 </refsect3>
510 <refsect3>
511 <title>LOOKUP KDC [<replaceable>REALM</replaceable>]</title>
513 <para>Give IP address of KDC for the specified <replaceable>REALM</replaceable>.
514 Defaults to local realm.</para>
516 </refsect3>
518 <refsect3>
519 <title>LOOKUP DC [<replaceable>DOMAIN</replaceable>]</title>
521 <para>Give IP's of Domain Controllers for specified <replaceable>
522 DOMAIN</replaceable>. Defaults to local domain.</para>
524 </refsect3>
526 <refsect3>
527 <title>LOOKUP MASTER <replaceable>DOMAIN</replaceable></title>
529 <para>Give IP of master browser for specified <replaceable>DOMAIN</replaceable>
530 or workgroup. Defaults to local domain.</para>
532 </refsect3>
534 </refsect2>
536 <refsect2>
537 <title>CACHE</title>
539 <para>Samba uses a general caching interface called 'gencache'. It 
540 can be controlled using 'NET CACHE'.</para>
542 <para>All the timeout parameters support the suffixes:
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>
552 </para>
554 <refsect3>
555 <title>CACHE ADD <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
557 <para>Add specified key+data to the cache with the given timeout.</para>
559 </refsect3>
561 <refsect3>
562 <title>CACHE DEL <replaceable>key</replaceable></title>
564 <para>Delete key from the cache.</para>
566 </refsect3>
568 <refsect3>
569 <title>CACHE SET <replaceable>key</replaceable> <replaceable>data</replaceable> <replaceable>time-out</replaceable></title>
571 <para>Update data of existing cache entry.</para>
573 </refsect3>
575 <refsect3>
576 <title>CACHE SEARCH <replaceable>PATTERN</replaceable></title>
578 <para>Search for the specified pattern in the cache data.</para>
580 </refsect3>
582 <refsect3>
583 <title>CACHE LIST</title>
585 <para>
586 List all current items in the cache.
587 </para>
589 </refsect3>
591 <refsect3>
592 <title>CACHE FLUSH</title>
594 <para>Remove all the current items from the cache.</para>
596 </refsect3>
598 </refsect2>
600 <refsect2>
601 <title>GETLOCALSID [DOMAIN]</title>
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>
606 </refsect2>
608 <refsect2>
609 <title>SETLOCALSID S-1-5-21-x-y-z</title>
611 <para>Sets domain sid for the local server to the specified SID.</para>
613 </refsect2>
615 <refsect2>
616 <title>GROUPMAP</title>
618 <para>Manage the mappings between Windows group SIDs and UNIX groups.
619 Parameters take the for "parameter=value".  Common options include:</para>
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>
632 <refsect3>
633 <title>GROUPMAP ADD</title>
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>
643 </refsect3>
645 <refsect3>
646 <title>GROUPMAP DELETE</title>
648 <para>Delete a group mapping entry. If more then one group name matches, the first entry found is deleted.</para>
650 <para>net groupmap delete {ntgroup=string|sid=SID}</para>
652 </refsect3>
654 <refsect3>
655 <title>GROUPMAP MODIFY</title>
657 <para>Update en existing group entry</para>
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>
667 <refsect3>
668 <title>GROUPMAP LIST</title>
670 <para>List existing group mapping entries</para>
672 <para>net groupmap list [verbose] [ntgroup=string] [sid=SID]</para>
674 </refsect3>
675 </refsect2>
679 <refsect2>
680 <title>MAXRID</title>
682 <para>Prints out the highest RID currently in use on the local
683 server (by the active 'passdb backend').
684 </para>
686 </refsect2>
688 <refsect2>
689 <title>RPC INFO</title>
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>
695 </refsect2>
697 <refsect2>
698 <title>[RPC|ADS] TESTJOIN</title>
700 <para>Check whether participation in a domain is still valid.</para>
702 </refsect2>
704 <refsect2>
705 <title>[RPC|ADS] CHANGETRUSTPW</title>
707 <para>Force change of domain trust password.</para>
709 </refsect2>
711 <refsect2>
712 <title>RPC TRUSTDOM</title>
714 <refsect3>
715 <title>RPC TRUSTDOM ADD <replaceable>DOMAIN</replaceable></title>
717 <para>Add a interdomain trust account for 
718 <replaceable>DOMAIN</replaceable> to the remote server. 
719 </para>
721 </refsect3>
723 <refsect3>
724 <title>RPC TRUSTDOM DEL <replaceable>DOMAIM</replaceable></title>
726 <para>Remove interdomain trust account for 
727 <replaceable>DOMAIN</replaceable> from the remote server. 
728 </para>
730 &not.implemented;
732 </refsect3>
734 <refsect3>
735 <title>RPC TRUSTDOM ESTABLISH <replaceable>DOMAIN</replaceable></title>
737 <para>
738 Establish a trust relationship to a trusting domain. 
739 Interdomain account must already be created on the remote PDC.
740 </para>
742 </refsect3>
744 <refsect3>
745 <title>RPC TRUSTDOM REVOKE <replaceable>DOMAIN</replaceable></title>
746 <para>Abandon relationship to trusted domain</para>
748 </refsect3>
750 <refsect3>
751 <title>RPC TRUSTDOM LIST</title>
753 <para>List all current interdomain trust relationships.</para>
755 </refsect3>
757 <refsect3>
758 <title>RPC RIGHTS</title>
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>
766 </refsect3>
769 </refsect2>
771 <refsect2>
772 <title>RPC ABORTSHUTDOWN</title>
774 <para>Abort the shutdown of a remote server.</para>
776 </refsect2>
778 <refsect2>
779 <title>RPC SHUTDOWN [-t timeout] [-r] [-f] [-C message]</title>
781 <para>Shut down the remote server.</para>
783 <variablelist>
784 <varlistentry>
785 <term>-r</term>
786 <listitem><para>
787 Reboot after shutdown.
788 </para></listitem>
789 </varlistentry>
791 <varlistentry>
792 <term>-f</term>
793 <listitem><para>
794 Force shutting down all applications.
795 </para></listitem>
796 </varlistentry>
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>'>
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>
813 </refsect2>
815 <refsect2>
816 <title>RPC SAMDUMP</title>
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>
822 <refsect2>
823 <title>RPC VAMPIRE</title>
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>
829 </refsect2>
831 <refsect2>
832 <title>RPC GETSID</title>
834 <para>Fetch domain SID and store it in the local <filename>secrets.tdb</filename>. </para>
836 </refsect2>
838 <refsect2>
839 <title>ADS LEAVE</title>
841 <para>Make the remote host leave the domain it is part of. </para>
843 </refsect2>
845 <refsect2>
846 <title>ADS STATUS</title>
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>
852 </refsect2>
854 <refsect2>
855 <title>ADS PRINTER</title>
857 <refsect3>
858 <title>ADS PRINTER INFO [<replaceable>PRINTER</replaceable>] [<replaceable>SERVER</replaceable>]</title>
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>
864 </refsect3>
866 <refsect3>
867 <title>ADS PRINTER PUBLISH <replaceable>PRINTER</replaceable></title>
869 <para>Publish specified printer using ADS.</para>
871 </refsect3>
873 <refsect3>
874 <title>ADS PRINTER REMOVE <replaceable>PRINTER</replaceable></title>
876 <para>Remove specified printer from ADS directory.</para>
878 </refsect3>
880 </refsect2>
882 <refsect2>
883 <title>ADS SEARCH <replaceable>EXPRESSION</replaceable> <replaceable>ATTRIBUTES...</replaceable></title>
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>
889 <para>Example: <userinput>net ads search '(objectCategory=group)' sAMAccountName</userinput>
890 </para>
892 </refsect2>
894 <refsect2>
895 <title>ADS DN <replaceable>DN</replaceable> <replaceable>(attributes)</replaceable></title>
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>
903 <para>Example: <userinput>net ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName</userinput></para>
905 </refsect2>
907 <refsect2>
908 <title>ADS WORKGROUP</title>
910 <para>Print out workgroup name for specified kerberos realm.</para>
912 </refsect2>
914 <refsect2>
915 <title>SAM CREATEBUILTINGROUP &lt;NAME&gt;</title>
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.
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>
929 </refsect2>
931 <refsect2>
932 <title>SAM CREATELOCALGROUP &lt;NAME&gt;</title>
934 <para>
935 Create a LOCAL group (also known as Alias).
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>
941 </refsect2>
943 <refsect2>
944 <title>SAM DELETELOCALGROUP &lt;NAME&gt;</title>
946 <para>
947 Delete an existing LOCAL group (also known as Alias).
949 </para>
951 </refsect2>
953 <refsect2>
954 <title>SAM MAPUNIXGROUP &lt;NAME&gt;</title>
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>
961 </refsect2>
963 <refsect2>
964 <title>SAM ADDMEM &lt;GROUP&gt; &lt;MEMBER&gt;</title>
966 <para>
967 Add a member to a Local group. The group can be specified only by name,
968 the member can be specified by name or SID.
969 </para>
971 </refsect2>
973 <refsect2>
974 <title>SAM DELMEM  &lt;GROUP&gt; &lt;MEMBER&gt;</title>
976 <para>
977 Remove a member from a Local group. The group and the member must be
978 specified by name.
979 </para>
981 </refsect2>
983 <refsect2>
984 <title>SAM LISTMEM &lt;GROUP&gt;</title>
986 <para>
987 List Local group members. The group must be specified by name.
988 </para>
990 </refsect2>
992 <refsect2>
993 <title>SAM LIST &lt;users|groups|localgroups|builtin|workstations&gt; [verbose]</title>
995 <para>
996 List the specified set of accounts by name. If verbose is specified,
997 the rid and description is also provided for each account.
998 </para>
1000 </refsect2>
1002 <refsect2>
1003 <title>SAM SHOW &lt;NAME&gt;</title>
1005 <para>
1006 Show the full DOMAIN\\NAME the SID and the type for the corrisponding
1007 account.
1008 </para>
1010 </refsect2>
1012 <refsect2>
1013 <title>SAM SET HOMEDIR &lt;NAME&gt; &lt;DIRECTORY&gt;</title>
1015 <para>
1016 Set the home directory for a user account.
1017 </para>
1019 </refsect2>
1021 <refsect2>
1022 <title>SAM SET PROFILEPATH &lt;NAME&gt; &lt;PATH&gt;</title>
1024 <para>
1025 Set the profile path for a user account.
1026 </para>
1028 </refsect2>
1030 <refsect2>
1031 <title>SAM SET COMMENT &lt;NAME&gt; &lt;COMMENT&gt;</title>
1033 <para>
1034 Set the comment for a user or group account.
1035 </para>
1037 </refsect2>
1039 <refsect2>
1040 <title>SAM SET FULLNAME &lt;NAME&gt; &lt;FULL NAME&gt;</title>
1042 <para>
1043 Set the full name for a user account.
1044 </para>
1046 </refsect2>
1048 <refsect2>
1049 <title>SAM SET LOGONSCRIPT &lt;NAME&gt; &lt;SCRIPT&gt;</title>
1051 <para>
1052 Set the logon script for a user account.
1053 </para>
1055 </refsect2>
1057 <refsect2>
1058 <title>SAM SET HOMEDRIVE &lt;NAME&gt; &lt;DRIVE&gt;</title>
1060 <para>
1061 Set the home drive for a user account.
1062 </para>
1064 </refsect2>
1066 <refsect2>
1067 <title>SAM SET WORKSTATIONS &lt;NAME&gt; &lt;WORKSTATIONS&gt;</title>
1069 <para>
1070 Set the workstations a user account is allowed to log in from.
1071 </para>
1073 </refsect2>
1075 <refsect2>
1076 <title>SAM SET DISABLE &lt;NAME&gt;</title>
1078 <para>
1079 Set the "disabled" flag for a user account.
1080 </para>
1082 </refsect2>
1084 <refsect2>
1085 <title>SAM SET PWNOTREQ &lt;NAME&gt;</title>
1087 <para>
1088 Set the "password not required" flag for a user account.
1089 </para>
1091 </refsect2>
1093 <refsect2>
1094 <title>SAM SET AUTOLOCK &lt;NAME&gt;</title>
1096 <para>
1097 Set the "autolock" flag for a user account.
1098 </para>
1100 </refsect2>
1102 <refsect2>
1103 <title>SAM SET PWNOEXP &lt;NAME&gt;</title>
1105 <para>
1106 Set the "password do not expire" flag for a user account.
1107 </para>
1109 </refsect2>
1111 <refsect2>
1112 <title>SAM SET PWMUSTCHANGENOW &lt;NAME&gt; [yes|no]</title>
1114 <para>
1115 Set or unset the "password must change" flag fro a user account.
1116 </para>
1118 </refsect2>
1120 <refsect2>
1121 <title>SAM POLICY LIST</title>
1123 <para>
1124 List the avilable account policies.
1125 </para>
1127 </refsect2>
1129 <refsect2>
1130 <title>SAM POLICY SHOW &lt;account policy&gt;</title>
1132 <para>
1133 Show the account policy value.
1134 </para>
1136 </refsect2>
1138 <refsect2>
1139 <title>SAM POLICY SET &lt;account policy&gt; &lt;value&gt;</title>
1141 <para>
1142 Set a value for the account policy.
1143 Valid values can be: "forever", "never", "off", or a number.
1144 </para>
1146 </refsect2>
1148 <refsect2>
1149 <title>SAM PROVISION</title>
1151 <para>
1152 Only available if ldapsam:editposix is set and winbindd is running.
1153 Properly populates the ldap tree with the basic accounts (Administrator)
1154 and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree.
1155 </para>
1157 </refsect2>
1159 <refsect2>
1160 <title>IDMAP DUMP &lt;output file&gt;</title>
1162 <para>
1163 Dumps the mappings in the specified output file.
1164 </para>
1166 </refsect2>
1168 <refsect2>
1169 <title>IDMAP RESTORE [input file]</title>
1171 <para>
1172 Restore the mappings from the specified file or stdin.
1173 </para>
1175 </refsect2>
1177 <refsect2>
1178 <title>IDMAP SECRET &lt;DOMAIN&gt;|ALLOC &lt;secret&gt;</title>
1180 <para>
1181 Store a secret for the sepcified domain, used primarily for domains
1182 that use idmap_ldap as a backend. In this case the secret is used
1183 as the password for the user DN used to bind to the ldap server.
1184 </para>
1186 </refsect2>
1188 <refsect2>
1189 <title>USERSHARE</title>
1191 <para>Starting with version 3.0.23, a Samba server now supports the ability for
1192 non-root users to add user define shares to be exported using the "net usershare"
1193 commands.
1194 </para>
1196 <para>
1197 To set this up, first set up your smb.conf by adding to the [global] section :
1199 usershare path = /usr/local/samba/lib/usershares
1201 Next create the directory /usr/local/samba/lib/usershares, change the owner to root and
1202 set the group owner to the UNIX group who should have the ability to create usershares,
1203 for example a group called "serverops".
1205 Set the permissions on /usr/local/samba/lib/usershares to 01770.
1207 (Owner and group all access, no access for others, plus the sticky bit,
1208 which means that a file in that directory can be renamed or deleted only
1209 by the owner of the file).
1211 Finally, tell smbd how many usershares you will allow by adding to the [global]
1212 section of smb.conf a line such as :
1214 usershare max shares = 100.
1216 To allow 100 usershare definitions. Now, members of the UNIX group "serverops"
1217 can create user defined shares on demand using the commands below.
1218 </para>
1220 <para>The usershare commands are:
1222 <simplelist>
1223 <member>net usershare add sharename path [comment] [acl] [guest_ok=[y|n]] - to add or change a user defined share.</member>
1224 <member>net usershare delete sharename - to delete a user defined share.</member>
1225 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
1226 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
1227 </simplelist>
1229 </para>
1231 <refsect3>
1232 <title>USERSHARE ADD <replaceable>sharename</replaceable> <replaceable>path</replaceable> <replaceable>[comment]</replaceable> <replaceable>[acl]</replaceable> <replaceable>[guest_ok=[y|n]]</replaceable></title>
1234 <para>
1235 Add or replace a new user defined share, with name "sharename".
1236 </para>
1238 <para>
1239 "path" specifies the absolute pathname on the system to be exported.
1240 Restrictions may be put on this, see the global smb.conf parameters :
1241 "usershare owner only", "usershare prefix allow list", and
1242 "usershare prefix deny list".
1243 </para>
1245 <para>
1246 The optional "comment" parameter is the comment that will appear
1247 on the share when browsed to by a client.
1248 </para>
1250 <para>The optional "acl" field
1251 specifies which users have read and write access to the entire share.
1252 Note that guest connections are not allowed unless the smb.conf parameter
1253 "usershare allow guests" has been set. The definition of a user
1254 defined share acl is : "user:permission", where user is a valid
1255 username on the system and permission can be "F", "R", or "D".
1256 "F" stands for "full permissions", ie. read and write permissions.
1257 "D" stands for "deny" for a user, ie. prevent this user from accessing
1258 this share.
1259 "R" stands for "read only", ie. only allow read access to this
1260 share (no creation of new files or directories or writing to files).
1261 </para>
1263 <para>
1264 The default if no "acl" is given is "Everyone:R", which means any 
1265 authenticated user has read-only access.
1266 </para>
1268 <para>
1269 The optional "guest_ok" has the same effect as the parameter of the
1270 same name in smb.conf, in that it allows guest access to this user
1271 defined share. This parameter is only allowed if the global parameter
1272 "usershare allow guests" has been set to true in the smb.conf.
1273 </para>
1275 There is no separate command to modify an existing user defined share,
1276 just use the "net usershare add [sharename]" command using the same
1277 sharename as the one you wish to modify and specify the new options
1278 you wish. The Samba smbd daemon notices user defined share modifications
1279 at connect time so will see the change immediately, there is no need
1280 to restart smbd on adding, deleting or changing a user defined share.
1281 </refsect3>
1283 <refsect3>
1284 <title>USERSHARE DELETE <replaceable>sharename</replaceable></title>
1286 <para>
1287 Deletes the user defined share by name. The Samba smbd daemon
1288 immediately notices this change, although it will not disconnect
1289 any users currently connected to the deleted share.
1290 </para>
1292 </refsect3>
1294 <refsect3>
1295 <title>USERSHARE INFO <replaceable>[-l|--long]</replaceable> <replaceable>[wildcard sharename]</replaceable></title>
1297 <para>
1298 Get info on user defined shares owned by the current user matching the given pattern, or all users.
1299 </para>
1301 <para>
1302 net usershare info on its own dumps out info on the user defined shares that were
1303 created by the current user, or restricts them to share names that match the given
1304 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1305 If the '-l' or '--long' option is also given, it prints out info on user defined
1306 shares created by other users.
1307 </para>
1309 <para>
1310 The information given about a share looks like :
1312 [foobar]
1313 path=/home/jeremy
1314 comment=testme
1315 usershare_acl=Everyone:F
1316 guest_ok=n
1318 And is a list of the current settings of the user defined share that can be
1319 modified by the "net usershare add" command.
1320 </para>
1322 </refsect3>
1324 <refsect3>
1325 <title>USERSHARE LIST <replaceable>[-l|--long]</replaceable> <replaceable>wildcard sharename</replaceable></title>
1327 <para>
1328 List all the user defined shares owned by the current user matching the given pattern, or all users.
1329 </para>
1331 <para>
1332 net usershare list on its own list out the names of the user defined shares that were
1333 created by the current user, or restricts the list to share names that match the given
1334 wildcard pattern ('*' matches one or more characters, '?' matches only one character).
1335 If the '-l' or '--long' option is also given, it includes the names of user defined
1336 shares created by other users.
1337 </para>
1339 </refsect3>
1341 </refsect2>
1343 <refsect2>
1344 <title>HELP [COMMAND]</title>
1346 <para>Gives usage information for the specified command.</para>
1348 </refsect2>
1350 </refsect1>
1352 <refsect1>
1353         <title>VERSION</title>
1355         <para>This man page is complete for version 3.0 of the Samba 
1356         suite.</para>
1357 </refsect1>
1359 <refsect1>
1360         <title>AUTHOR</title>
1361         
1362         <para>The original Samba software and related utilities 
1363         were created by Andrew Tridgell. Samba is now developed
1364         by the Samba Team as an Open Source project similar 
1365         to the way the Linux kernel is developed.</para>
1367         <para>The net manpage was written by Jelmer Vernooij.</para>
1368         
1369 </refsect1>
1371 </refentry>