source: branches/samba-3.3.x/docs-xml/manpages-3/net.8.xml@ 222

Last change on this file since 222 was 217, checked in by Herwig Bauernfeind, 16 years ago

Import Samba 3.3 branch at 3.3.0 level docs-xml (psmedley's port)

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