source: branches/samba-3.2.x/docs/manpages/net.8@ 235

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

Update 3.2 branch to 3.2.11

File size: 35.9 KB
Line 
1.\" Title: net
2.\" Author: [see the "AUTHOR" section]
3.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
4.\" Date: 04/17/2009
5.\" Manual: System Administration tools
6.\" Source: Samba 3.2
7.\" Language: English
8.\"
9.TH "NET" "8" "04/17/2009" "Samba 3\&.2" "System Administration tools"
10.\" -----------------------------------------------------------------
11.\" * (re)Define some macros
12.\" -----------------------------------------------------------------
13.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14.\" toupper - uppercase a string (locale-aware)
15.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16.de toupper
17.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
18\\$*
19.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
20..
21.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22.\" SH-xref - format a cross-reference to an SH section
23.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24.de SH-xref
25.ie n \{\
26.\}
27.toupper \\$*
28.el \{\
29\\$*
30.\}
31..
32.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33.\" SH - level-one heading that works better for non-TTY output
34.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35.de1 SH
36.\" put an extra blank line of space above the head in non-TTY output
37.if t \{\
38.sp 1
39.\}
40.sp \\n[PD]u
41.nr an-level 1
42.set-an-margin
43.nr an-prevailing-indent \\n[IN]
44.fi
45.in \\n[an-margin]u
46.ti 0
47.HTML-TAG ".NH \\n[an-level]"
48.it 1 an-trap
49.nr an-no-space-flag 1
50.nr an-break-flag 1
51\." make the size of the head bigger
52.ps +3
53.ft B
54.ne (2v + 1u)
55.ie n \{\
56.\" if n (TTY output), use uppercase
57.toupper \\$*
58.\}
59.el \{\
60.nr an-break-flag 0
61.\" if not n (not TTY), use normal case (not uppercase)
62\\$1
63.in \\n[an-margin]u
64.ti 0
65.\" if not n (not TTY), put a border/line under subheading
66.sp -.6
67\l'\n(.lu'
68.\}
69..
70.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71.\" SS - level-two heading that works better for non-TTY output
72.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73.de1 SS
74.sp \\n[PD]u
75.nr an-level 1
76.set-an-margin
77.nr an-prevailing-indent \\n[IN]
78.fi
79.in \\n[IN]u
80.ti \\n[SN]u
81.it 1 an-trap
82.nr an-no-space-flag 1
83.nr an-break-flag 1
84.ps \\n[PS-SS]u
85\." make the size of the head bigger
86.ps +2
87.ft B
88.ne (2v + 1u)
89.if \\n[.$] \&\\$*
90..
91.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92.\" BB/BE - put background/screen (filled box) around block of text
93.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94.de BB
95.if t \{\
96.sp -.5
97.br
98.in +2n
99.ll -2n
100.gcolor red
101.di BX
102.\}
103..
104.de EB
105.if t \{\
106.if "\\$2"adjust-for-leading-newline" \{\
107.sp -1
108.\}
109.br
110.di
111.in
112.ll
113.gcolor
114.nr BW \\n(.lu-\\n(.i
115.nr BH \\n(dn+.5v
116.ne \\n(BHu+.5v
117.ie "\\$2"adjust-for-leading-newline" \{\
118\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
119.\}
120.el \{\
121\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
122.\}
123.in 0
124.sp -.5v
125.nf
126.BX
127.in
128.sp .5v
129.fi
130.\}
131..
132.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133.\" BM/EM - put colored marker in margin next to block of text
134.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135.de BM
136.if t \{\
137.br
138.ll -2n
139.gcolor red
140.di BX
141.\}
142..
143.de EM
144.if t \{\
145.br
146.di
147.ll
148.gcolor
149.nr BH \\n(dn
150.ne \\n(BHu
151\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
152.in 0
153.nf
154.BX
155.in
156.fi
157.\}
158..
159.\" -----------------------------------------------------------------
160.\" * set default formatting
161.\" -----------------------------------------------------------------
162.\" disable hyphenation
163.nh
164.\" disable justification (adjust text to left margin only)
165.ad l
166.\" -----------------------------------------------------------------
167.\" * MAIN CONTENT STARTS HERE *
168.\" -----------------------------------------------------------------
169.SH "Name"
170net \- Tool for administration of Samba and remote CIFS servers\&.
171.SH "Synopsis"
172.fam C
173.HP \w'\ 'u
174\FCnet\F[] {<ads|rap|rpc>} [\-h] [\-w\ workgroup] [\-W\ myworkgroup] [\-U\ user] [\-I\ ip\-address] [\-p\ port] [\-n\ myname] [\-s\ conffile] [\-S\ server] [\-l] [\-P] [\-d\ debuglevel] [\-V]
175.fam
176.SH "DESCRIPTION"
177.PP
178This tool is part of the
179\fBsamba\fR(7)
180suite\&.
181.PP
182The Samba net utility is meant to work just like the net utility available for windows and DOS\&. The first argument should be used to specify the protocol to use when executing a certain command\&. ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3) clients and RPC can be used for NT4 and Windows 2000\&. If this argument is omitted, net will try to determine it automatically\&. Not all commands are available on all protocols\&.
183.SH "OPTIONS"
184.PP
185\-h|\-\-help
186.RS 4
187Print a summary of command line options\&.
188.RE
189.PP
190\-w target\-workgroup
191.RS 4
192Sets target workgroup or domain\&. You have to specify either this option or the IP address or the name of a server\&.
193.RE
194.PP
195\-W workgroup
196.RS 4
197Sets client workgroup or domain
198.RE
199.PP
200\-U user
201.RS 4
202User name to use
203.RE
204.PP
205\-I ip\-address
206.RS 4
207IP address of target server to use\&. You have to specify either this option or a target workgroup or a target server\&.
208.RE
209.PP
210\-p port
211.RS 4
212Port on the target server to connect to (usually 139 or 445)\&. Defaults to trying 445 first, then 139\&.
213.RE
214.PP
215\-n <primary NetBIOS name>
216.RS 4
217This option allows you to override the NetBIOS name that Samba uses for itself\&. This is identical to setting the
218\m[blue]\fBnetbios name\fR\m[]
219parameter in the
220\FCsmb\&.conf\F[]
221file\&. However, a command line setting will take precedence over settings in
222\FCsmb\&.conf\F[]\&.
223.RE
224.PP
225\-s <configuration file>
226.RS 4
227The file specified contains the configuration details required by the server\&. The information in this file includes server\-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide\&. See
228\FCsmb\&.conf\F[]
229for more information\&. The default configuration file name is determined at compile time\&.
230.RE
231.PP
232\-S server
233.RS 4
234Name of target server\&. You should specify either this option or a target workgroup or a target IP address\&.
235.RE
236.PP
237\-l
238.RS 4
239When listing data, give more information on each item\&.
240.RE
241.PP
242\-P
243.RS 4
244Make queries to the external server using the machine account of the local server\&.
245.RE
246.PP
247\-d|\-\-debuglevel=level
248.RS 4
249\fIlevel\fR
250is an integer from 0 to 10\&. The default value if this parameter is not specified is 0\&.
251.sp
252The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&.
253.sp
254Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&.
255.sp
256Note that specifying this parameter here will override the
257\m[blue]\fBlog level\fR\m[]
258parameter in the
259\FCsmb\&.conf\F[]
260file\&.
261.RE
262.SH "COMMANDS"
263.SS "CHANGESECRETPW"
264.PP
265This command allows the Samba machine account password to be set from an external application to a machine account password that has already been stored in Active Directory\&. DO NOT USE this command unless you know exactly what you are doing\&. The use of this command requires that the force flag (\-f) be used also\&. There will be NO command prompt\&. Whatever information is piped into stdin, either by typing at the command line or otherwise, will be stored as the literal machine password\&. Do NOT use this without care and attention as it will overwrite a legitimate machine password without warning\&. YOU HAVE BEEN WARNED\&.
266.SS "TIME"
267.PP
268The
269\FCNET TIME\F[]
270command allows you to view the time on a remote server or synchronise the time on the local server with the time on the remote server\&.
271.SS "TIME"
272.PP
273Without any options, the
274\FCNET TIME\F[]
275command displays the time on the remote server\&.
276.SS "TIME SYSTEM"
277.PP
278Displays the time on the remote server in a format ready for
279\FC/bin/date\F[]\&.
280.SS "TIME SET"
281.PP
282Tries to set the date and time of the local server to that on the remote server using
283\FC/bin/date\F[]\&.
284.SS "TIME ZONE"
285.PP
286Displays the timezone in hours from GMT on the remote computer\&.
287.SS "[RPC|ADS] JOIN [TYPE] [\-U username[%password]] [createupn=UPN] [createcomputer=OU] [options]"
288.PP
289Join a domain\&. If the account already exists on the server, and [TYPE] is MEMBER, the machine will attempt to join automatically\&. (Assuming that the machine has been created in server manager) Otherwise, a password will be prompted for, and a new account may be created\&.
290.PP
291[TYPE] may be PDC, BDC or MEMBER to specify the type of server joining the domain\&.
292.PP
293[UPN] (ADS only) set the principalname attribute during the join\&. The default format is host/netbiosname@REALM\&.
294.PP
295[OU] (ADS only) Precreate the computer account in a specific OU\&. The OU string reads from top to bottom without RDNs, and is delimited by a \'/\'\&. Please note that \'\e\' is used for escape by both the shell and ldap, so it may need to be doubled or quadrupled to pass through, and it is not used as a delimiter\&.
296.SS "[RPC] OLDJOIN [options]"
297.PP
298Join a domain\&. Use the OLDJOIN option to join the domain using the old style of domain joining \- you need to create a trust account in server manager first\&.
299.SS "[RPC|ADS] USER"
300.SS "[RPC|ADS] USER"
301.PP
302List all users
303.SS "[RPC|ADS] USER DELETE target"
304.PP
305Delete specified user
306.SS "[RPC|ADS] USER INFO target"
307.PP
308List the domain groups of the specified user\&.
309.SS "[RPC|ADS] USER RENAME oldname newname"
310.PP
311Rename specified user\&.
312.SS "[RPC|ADS] USER ADD name [password] [-F user flags] [-C comment]"
313.PP
314Add specified user\&.
315.SS "[RPC|ADS] GROUP"
316.SS "[RPC|ADS] GROUP [misc options] [targets]"
317.PP
318List user groups\&.
319.SS "[RPC|ADS] GROUP DELETE name [misc. options]"
320.PP
321Delete specified group\&.
322.SS "[RPC|ADS] GROUP ADD name [-C comment]"
323.PP
324Create specified group\&.
325.SS "[RAP|RPC] SHARE"
326.SS "[RAP|RPC] SHARE [misc. options] [targets]"
327.PP
328Enumerates all exported resources (network shares) on target server\&.
329.SS "[RAP|RPC] SHARE ADD name=serverpath [-C comment] [-M maxusers] [targets]"
330.PP
331Adds a share from a server (makes the export active)\&. Maxusers specifies the number of users that can be connected to the share simultaneously\&.
332.SS "SHARE DELETE sharename"
333.PP
334Delete specified share\&.
335.SS "[RPC|RAP] FILE"
336.SS "[RPC|RAP] FILE"
337.PP
338List all open files on remote server\&.
339.SS "[RPC|RAP] FILE CLOSE fileid"
340.PP
341Close file with specified
342\fIfileid\fR
343on remote server\&.
344.SS "[RPC|RAP] FILE INFO fileid"
345.PP
346Print information on specified
347\fIfileid\fR\&. Currently listed are: file\-id, username, locks, path, permissions\&.
348.SS "[RAP|RPC] FILE USER user"
349.PP
350List files opened by specified
351\fIuser\fR\&. Please note that
352\FCnet rap file user\F[]
353does not work against Samba servers\&.
354.SS "SESSION"
355.SS "RAP SESSION"
356.PP
357Without any other options, SESSION enumerates all active SMB/CIFS sessions on the target server\&.
358.SS "RAP SESSION DELETE|CLOSE CLIENT_NAME"
359.PP
360Close the specified sessions\&.
361.SS "RAP SESSION INFO CLIENT_NAME"
362.PP
363Give a list with all the open files in specified session\&.
364.SS "RAP SERVER \fIDOMAIN\fR"
365.PP
366List all servers in specified domain or workgroup\&. Defaults to local domain\&.
367.SS "RAP DOMAIN"
368.PP
369Lists all domains and workgroups visible on the current network\&.
370.SS "RAP PRINTQ"
371.SS "RAP PRINTQ INFO QUEUE_NAME"
372.PP
373Lists the specified print queue and print jobs on the server\&. If the
374\fIQUEUE_NAME\fR
375is omitted, all queues are listed\&.
376.SS "RAP PRINTQ DELETE JOBID"
377.PP
378Delete job with specified id\&.
379.SS "RAP VALIDATE \fIuser\fR [\fIpassword\fR]"
380.PP
381Validate whether the specified user can log in to the remote server\&. If the password is not specified on the commandline, it will be prompted\&.
382.if n \{\
383.sp
384.\}
385.RS 4
386.BM yellow
387.it 1 an-trap
388.nr an-no-space-flag 1
389.nr an-break-flag 1
390.br
391.ps +1
392\fBNote\fR
393.ps -1
394.br
395.PP
396Currently NOT implemented\&.
397.sp .5v
398.EM yellow
399.RE
400.SS "RAP GROUPMEMBER"
401.SS "RAP GROUPMEMBER LIST GROUP"
402.PP
403List all members of the specified group\&.
404.SS "RAP GROUPMEMBER DELETE GROUP USER"
405.PP
406Delete member from group\&.
407.SS "RAP GROUPMEMBER ADD GROUP USER"
408.PP
409Add member to group\&.
410.SS "RAP ADMIN \fIcommand\fR"
411.PP
412Execute the specified
413\fIcommand\fR
414on the remote server\&. Only works with OS/2 servers\&.
415.if n \{\
416.sp
417.\}
418.RS 4
419.BM yellow
420.it 1 an-trap
421.nr an-no-space-flag 1
422.nr an-break-flag 1
423.br
424.ps +1
425\fBNote\fR
426.ps -1
427.br
428.PP
429Currently NOT implemented\&.
430.sp .5v
431.EM yellow
432.RE
433.SS "RAP SERVICE"
434.SS "RAP SERVICE START NAME [arguments...]"
435.PP
436Start the specified service on the remote server\&. Not implemented yet\&.
437.if n \{\
438.sp
439.\}
440.RS 4
441.BM yellow
442.it 1 an-trap
443.nr an-no-space-flag 1
444.nr an-break-flag 1
445.br
446.ps +1
447\fBNote\fR
448.ps -1
449.br
450.PP
451Currently NOT implemented\&.
452.sp .5v
453.EM yellow
454.RE
455.SS "RAP SERVICE STOP"
456.PP
457Stop the specified service on the remote server\&.
458.if n \{\
459.sp
460.\}
461.RS 4
462.BM yellow
463.it 1 an-trap
464.nr an-no-space-flag 1
465.nr an-break-flag 1
466.br
467.ps +1
468\fBNote\fR
469.ps -1
470.br
471.PP
472Currently NOT implemented\&.
473.sp .5v
474.EM yellow
475.RE
476.SS "RAP PASSWORD \fIUSER\fR \fIOLDPASS\fR \fINEWPASS\fR"
477.PP
478Change password of
479\fIUSER\fR
480from
481\fIOLDPASS\fR
482to
483\fINEWPASS\fR\&.
484.SS "LOOKUP"
485.SS "LOOKUP HOST HOSTNAME [TYPE]"
486.PP
487Lookup the IP address of the given host with the specified type (netbios suffix)\&. The type defaults to 0x20 (workstation)\&.
488.SS "LOOKUP LDAP [DOMAIN]"
489.PP
490Give IP address of LDAP server of specified
491\fIDOMAIN\fR\&. Defaults to local domain\&.
492.SS "LOOKUP KDC [REALM]"
493.PP
494Give IP address of KDC for the specified
495\fIREALM\fR\&. Defaults to local realm\&.
496.SS "LOOKUP DC [DOMAIN]"
497.PP
498Give IP\'s of Domain Controllers for specified
499\fI DOMAIN\fR\&. Defaults to local domain\&.
500.SS "LOOKUP MASTER DOMAIN"
501.PP
502Give IP of master browser for specified
503\fIDOMAIN\fR
504or workgroup\&. Defaults to local domain\&.
505.SS "CACHE"
506.PP
507Samba uses a general caching interface called \'gencache\'\&. It can be controlled using \'NET CACHE\'\&.
508.PP
509All the timeout parameters support the suffixes:
510.RS 4
511s \- Seconds
512.RE
513.RS 4
514m \- Minutes
515.RE
516.RS 4
517h \- Hours
518.RE
519.RS 4
520d \- Days
521.RE
522.RS 4
523w \- Weeks
524.RE
525.SS "CACHE ADD key data time-out"
526.PP
527Add specified key+data to the cache with the given timeout\&.
528.SS "CACHE DEL key"
529.PP
530Delete key from the cache\&.
531.SS "CACHE SET key data time-out"
532.PP
533Update data of existing cache entry\&.
534.SS "CACHE SEARCH PATTERN"
535.PP
536Search for the specified pattern in the cache data\&.
537.SS "CACHE LIST"
538.PP
539List all current items in the cache\&.
540.SS "CACHE FLUSH"
541.PP
542Remove all the current items from the cache\&.
543.SS "GETLOCALSID [DOMAIN]"
544.PP
545Prints the SID of the specified domain, or if the parameter is omitted, the SID of the local server\&.
546.SS "SETLOCALSID S\-1\-5\-21\-x\-y\-z"
547.PP
548Sets SID for the local server to the specified SID\&.
549.SS "GETDOMAINSID"
550.PP
551Prints the local machine SID and the SID of the current domain\&.
552.SS "SETDOMAINSID"
553.PP
554Sets the SID of the current domain\&.
555.SS "GROUPMAP"
556.PP
557Manage the mappings between Windows group SIDs and UNIX groups\&. Common options include:
558.sp
559.RS 4
560.ie n \{\
561\h'-04'\(bu\h'+03'\c
562.\}
563.el \{\
564.sp -1
565.IP \(bu 2.3
566.\}
567unixgroup \- Name of the UNIX group
568.RE
569.sp
570.RS 4
571.ie n \{\
572\h'-04'\(bu\h'+03'\c
573.\}
574.el \{\
575.sp -1
576.IP \(bu 2.3
577.\}
578ntgroup \- Name of the Windows NT group (must be resolvable to a SID
579.RE
580.sp
581.RS 4
582.ie n \{\
583\h'-04'\(bu\h'+03'\c
584.\}
585.el \{\
586.sp -1
587.IP \(bu 2.3
588.\}
589rid \- Unsigned 32\-bit integer
590.RE
591.sp
592.RS 4
593.ie n \{\
594\h'-04'\(bu\h'+03'\c
595.\}
596.el \{\
597.sp -1
598.IP \(bu 2.3
599.\}
600sid \- Full SID in the form of "S\-1\-\&.\&.\&."
601.RE
602.sp
603.RS 4
604.ie n \{\
605\h'-04'\(bu\h'+03'\c
606.\}
607.el \{\
608.sp -1
609.IP \(bu 2.3
610.\}
611type \- Type of the group; either \'domain\', \'local\', or \'builtin\'
612.RE
613.sp
614.RS 4
615.ie n \{\
616\h'-04'\(bu\h'+03'\c
617.\}
618.el \{\
619.sp -1
620.IP \(bu 2.3
621.\}
622comment \- Freeform text description of the group
623.sp
624.RE
625.SS "GROUPMAP ADD"
626.PP
627Add a new group mapping entry:
628.sp
629.if n \{\
630.RS 4
631.\}
632.fam C
633.ps -1
634.nf
635.if t \{\
636.sp -1
637.\}
638.BB lightgray adjust-for-leading-newline
639.sp -1
640
641net groupmap add {rid=int|sid=string} unixgroup=string \e
642 [type={domain|local}] [ntgroup=string] [comment=string]
643.EB lightgray adjust-for-leading-newline
644.if t \{\
645.sp 1
646.\}
647.fi
648.fam
649.ps +1
650.if n \{\
651.RE
652.\}
653.sp
654
655.SS "GROUPMAP DELETE"
656.PP
657Delete a group mapping entry\&. If more than one group name matches, the first entry found is deleted\&.
658.PP
659net groupmap delete {ntgroup=string|sid=SID}
660.SS "GROUPMAP MODIFY"
661.PP
662Update en existing group entry\&.
663.PP
664
665.sp
666.if n \{\
667.RS 4
668.\}
669.fam C
670.ps -1
671.nf
672.if t \{\
673.sp -1
674.\}
675.BB lightgray adjust-for-leading-newline
676.sp -1
677
678net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \e
679 [comment=string] [type={domain|local}]
680.EB lightgray adjust-for-leading-newline
681.if t \{\
682.sp 1
683.\}
684.fi
685.fam
686.ps +1
687.if n \{\
688.RE
689.\}
690.sp
691
692.SS "GROUPMAP LIST"
693.PP
694List existing group mapping entries\&.
695.PP
696net groupmap list [verbose] [ntgroup=string] [sid=SID]
697.SS "MAXRID"
698.PP
699Prints out the highest RID currently in use on the local server (by the active \'passdb backend\')\&.
700.SS "RPC INFO"
701.PP
702Print information about the domain of the remote server, such as domain name, domain sid and number of users and groups\&.
703.SS "[RPC|ADS] TESTJOIN"
704.PP
705Check whether participation in a domain is still valid\&.
706.SS "[RPC|ADS] CHANGETRUSTPW"
707.PP
708Force change of domain trust password\&.
709.SS "RPC TRUSTDOM"
710.SS "RPC TRUSTDOM ADD DOMAIN"
711.PP
712Add a interdomain trust account for
713\fIDOMAIN\fR\&. This is in fact a Samba account named
714\fIDOMAIN$\fR
715with the account flag
716\fB\'I\'\fR
717(interdomain trust account)\&. If the command is used against localhost it has the same effect as
718\FCsmbpasswd \-a \-i DOMAIN\F[]\&. Please note that both commands expect a appropriate UNIX account\&.
719.SS "RPC TRUSTDOM DEL DOMAIN"
720.PP
721Remove interdomain trust account for
722\fIDOMAIN\fR\&. If it is used against localhost it has the same effect as
723\FCsmbpasswd \-x DOMAIN$\F[]\&.
724.SS "RPC TRUSTDOM ESTABLISH DOMAIN"
725.PP
726Establish a trust relationship to a trusting domain\&. Interdomain account must already be created on the remote PDC\&.
727.SS "RPC TRUSTDOM REVOKE DOMAIN"
728.PP
729Abandon relationship to trusted domain
730.SS "RPC TRUSTDOM LIST"
731.PP
732List all current interdomain trust relationships\&.
733.SS "RPC RIGHTS"
734.PP
735This subcommand is used to view and manage Samba\'s rights assignments (also referred to as privileges)\&. There are three options currently available:
736\fIlist\fR,
737\fIgrant\fR, and
738\fIrevoke\fR\&. More details on Samba\'s privilege model and its use can be found in the Samba\-HOWTO\-Collection\&.
739.SS "RPC ABORTSHUTDOWN"
740.PP
741Abort the shutdown of a remote server\&.
742.SS "RPC SHUTDOWN [\-t timeout] [\-r] [\-f] [\-C message]"
743.PP
744Shut down the remote server\&.
745.PP
746\-r
747.RS 4
748Reboot after shutdown\&.
749.RE
750.PP
751\-f
752.RS 4
753Force shutting down all applications\&.
754.RE
755.PP
756\-t timeout
757.RS 4
758Timeout before system will be shut down\&. An interactive user of the system can use this time to cancel the shutdown\&.
759.RE
760\'>
761.PP
762\-C message
763.RS 4
764Display the specified message on the screen to announce the shutdown\&.
765.RE
766.SS "RPC SAMDUMP"
767.PP
768Print out sam database of remote server\&. You need to run this against the PDC, from a Samba machine joined as a BDC\&.
769.SS "RPC VAMPIRE"
770.PP
771Export users, aliases and groups from remote server to local server\&. You need to run this against the PDC, from a Samba machine joined as a BDC\&.
772.SS "RPC GETSID"
773.PP
774Fetch domain SID and store it in the local
775\FCsecrets\&.tdb\F[]\&.
776.SS "ADS LEAVE"
777.PP
778Make the remote host leave the domain it is part of\&.
779.SS "ADS STATUS"
780.PP
781Print out status of machine account of the local machine in ADS\&. Prints out quite some debug info\&. Aimed at developers, regular users should use
782\FCNET ADS TESTJOIN\F[]\&.
783.SS "ADS PRINTER"
784.SS "ADS PRINTER INFO [PRINTER] [SERVER]"
785.PP
786Lookup info for
787\fIPRINTER\fR
788on
789\fISERVER\fR\&. The printer name defaults to "*", the server name defaults to the local host\&.
790.SS "ADS PRINTER PUBLISH PRINTER"
791.PP
792Publish specified printer using ADS\&.
793.SS "ADS PRINTER REMOVE PRINTER"
794.PP
795Remove specified printer from ADS directory\&.
796.SS "ADS SEARCH \fIEXPRESSION\fR \fIATTRIBUTES\&.\&.\&.\fR"
797.PP
798Perform a raw LDAP search on a ADS server and dump the results\&. The expression is a standard LDAP search expression, and the attributes are a list of LDAP fields to show in the results\&.
799.PP
800Example:
801\fBnet ads search \'(objectCategory=group)\' sAMAccountName\fR
802.SS "ADS DN \fIDN\fR \fI(attributes)\fR"
803.PP
804Perform a raw LDAP search on a ADS server and dump the results\&. The DN standard LDAP DN, and the attributes are a list of LDAP fields to show in the result\&.
805.PP
806Example:
807\fBnet ads dn \'CN=administrator,CN=Users,DC=my,DC=domain\' SAMAccountName\fR
808.SS "ADS WORKGROUP"
809.PP
810Print out workgroup name for specified kerberos realm\&.
811.SS "SAM CREATEBUILTINGROUP <NAME>"
812.PP
813(Re)Create a BUILTIN group\&. Only a wellknown set of BUILTIN groups can be created with this command\&. This is the list of currently recognized group names: Administrators, Users, Guests, Power Users, Account Operators, Server Operators, Print Operators, Backup Operators, Replicator, RAS Servers, Pre\-Windows 2000 compatible Access\&. This command requires a running Winbindd with idmap allocation properly configured\&. The group gid will be allocated out of the winbindd range\&.
814.SS "SAM CREATELOCALGROUP <NAME>"
815.PP
816Create a LOCAL group (also known as Alias)\&. This command requires a running Winbindd with idmap allocation properly configured\&. The group gid will be allocated out of the winbindd range\&.
817.SS "SAM DELETELOCALGROUP <NAME>"
818.PP
819Delete an existing LOCAL group (also known as Alias)\&.
820.SS "SAM MAPUNIXGROUP <NAME>"
821.PP
822Map an existing Unix group and make it a Domain Group, the domain group will have the same name\&.
823.SS "SAM UNMAPUNIXGROUP <NAME>"
824.PP
825Remove an existing group mapping entry\&.
826.SS "SAM ADDMEM <GROUP> <MEMBER>"
827.PP
828Add a member to a Local group\&. The group can be specified only by name, the member can be specified by name or SID\&.
829.SS "SAM DELMEM <GROUP> <MEMBER>"
830.PP
831Remove a member from a Local group\&. The group and the member must be specified by name\&.
832.SS "SAM LISTMEM <GROUP>"
833.PP
834List Local group members\&. The group must be specified by name\&.
835.SS "SAM LIST <users|groups|localgroups|builtin|workstations> [verbose]"
836.PP
837List the specified set of accounts by name\&. If verbose is specified, the rid and description is also provided for each account\&.
838.SS "SAM SHOW <NAME>"
839.PP
840Show the full DOMAIN\e\eNAME the SID and the type for the corresponding account\&.
841.SS "SAM SET HOMEDIR <NAME> <DIRECTORY>"
842.PP
843Set the home directory for a user account\&.
844.SS "SAM SET PROFILEPATH <NAME> <PATH>"
845.PP
846Set the profile path for a user account\&.
847.SS "SAM SET COMMENT <NAME> <COMMENT>"
848.PP
849Set the comment for a user or group account\&.
850.SS "SAM SET FULLNAME <NAME> <FULL NAME>"
851.PP
852Set the full name for a user account\&.
853.SS "SAM SET LOGONSCRIPT <NAME> <SCRIPT>"
854.PP
855Set the logon script for a user account\&.
856.SS "SAM SET HOMEDRIVE <NAME> <DRIVE>"
857.PP
858Set the home drive for a user account\&.
859.SS "SAM SET WORKSTATIONS <NAME> <WORKSTATIONS>"
860.PP
861Set the workstations a user account is allowed to log in from\&.
862.SS "SAM SET DISABLE <NAME>"
863.PP
864Set the "disabled" flag for a user account\&.
865.SS "SAM SET PWNOTREQ <NAME>"
866.PP
867Set the "password not required" flag for a user account\&.
868.SS "SAM SET AUTOLOCK <NAME>"
869.PP
870Set the "autolock" flag for a user account\&.
871.SS "SAM SET PWNOEXP <NAME>"
872.PP
873Set the "password do not expire" flag for a user account\&.
874.SS "SAM SET PWDMUSTCHANGENOW <NAME> [yes|no]"
875.PP
876Set or unset the "password must change" flag for a user account\&.
877.SS "SAM POLICY LIST"
878.PP
879List the available account policies\&.
880.SS "SAM POLICY SHOW <account policy>"
881.PP
882Show the account policy value\&.
883.SS "SAM POLICY SET <account policy> <value>"
884.PP
885Set a value for the account policy\&. Valid values can be: "forever", "never", "off", or a number\&.
886.SS "SAM PROVISION"
887.PP
888Only available if ldapsam:editposix is set and winbindd is running\&. Properly populates the ldap tree with the basic accounts (Administrator) and groups (Domain Users, Domain Admins, Domain Guests) on the ldap tree\&.
889.SS "IDMAP DUMP <local tdb file name>"
890.PP
891Dumps the mappings contained in the local tdb file specified\&. This command is useful to dump only the mappings produced by the idmap_tdb backend\&.
892.SS "IDMAP RESTORE [input file]"
893.PP
894Restore the mappings from the specified file or stdin\&.
895.SS "IDMAP SECRET <DOMAIN>|ALLOC <secret>"
896.PP
897Store a secret for the specified domain, used primarily for domains that use idmap_ldap as a backend\&. In this case the secret is used as the password for the user DN used to bind to the ldap server\&.
898.SS "USERSHARE"
899.PP
900Starting with version 3\&.0\&.23, a Samba server now supports the ability for non\-root users to add user defined shares to be exported using the "net usershare" commands\&.
901.PP
902To set this up, first set up your smb\&.conf by adding to the [global] section: usershare path = /usr/local/samba/lib/usershares Next create the directory /usr/local/samba/lib/usershares, change the owner to root and set the group owner to the UNIX group who should have the ability to create usershares, for example a group called "serverops"\&. Set the permissions on /usr/local/samba/lib/usershares to 01770\&. (Owner and group all access, no access for others, plus the sticky bit, which means that a file in that directory can be renamed or deleted only by the owner of the file)\&. Finally, tell smbd how many usershares you will allow by adding to the [global] section of smb\&.conf a line such as : usershare max shares = 100\&. To allow 100 usershare definitions\&. Now, members of the UNIX group "serverops" can create user defined shares on demand using the commands below\&.
903.PP
904The usershare commands are:
905.RS 4
906net usershare add sharename path [comment] [acl] [guest_ok=[y|n]] \- to add or change a user defined share\&.
907.RE
908.RS 4
909net usershare delete sharename \- to delete a user defined share\&.
910.RE
911.RS 4
912net usershare info [\-l|\-\-long] [wildcard sharename] \- to print info about a user defined share\&.
913.RE
914.RS 4
915net usershare list [\-l|\-\-long] [wildcard sharename] \- to list user defined shares\&.
916.RE
917.SS "USERSHARE ADD sharename path [comment] [acl] [guest_ok=[y|n]]"
918.PP
919Add or replace a new user defined share, with name "sharename"\&.
920.PP
921"path" specifies the absolute pathname on the system to be exported\&. Restrictions may be put on this, see the global smb\&.conf parameters: "usershare owner only", "usershare prefix allow list", and "usershare prefix deny list"\&.
922.PP
923The optional "comment" parameter is the comment that will appear on the share when browsed to by a client\&.
924.PP
925The optional "acl" field specifies which users have read and write access to the entire share\&. Note that guest connections are not allowed unless the smb\&.conf parameter "usershare allow guests" has been set\&. The definition of a user defined share acl is: "user:permission", where user is a valid username on the system and permission can be "F", "R", or "D"\&. "F" stands for "full permissions", ie\&. read and write permissions\&. "D" stands for "deny" for a user, ie\&. prevent this user from accessing this share\&. "R" stands for "read only", ie\&. only allow read access to this share (no creation of new files or directories or writing to files)\&.
926.PP
927The default if no "acl" is given is "Everyone:R", which means any authenticated user has read\-only access\&.
928.PP
929The optional "guest_ok" has the same effect as the parameter of the same name in smb\&.conf, in that it allows guest access to this user defined share\&. This parameter is only allowed if the global parameter "usershare allow guests" has been set to true in the smb\&.conf\&.
930
931
932There is no separate command to modify an existing user defined share,
933just use the "net usershare add [sharename]" command using the same
934sharename as the one you wish to modify and specify the new options
935you wish\&. The Samba smbd daemon notices user defined share modifications
936at connect time so will see the change immediately, there is no need
937to restart smbd on adding, deleting or changing a user defined share\&.
938.SS "USERSHARE DELETE sharename"
939.PP
940Deletes the user defined share by name\&. The Samba smbd daemon immediately notices this change, although it will not disconnect any users currently connected to the deleted share\&.
941.SS "USERSHARE INFO [-l|--long] [wildcard sharename]"
942.PP
943Get info on user defined shares owned by the current user matching the given pattern, or all users\&.
944.PP
945net usershare info on its own dumps out info on the user defined shares that were created by the current user, or restricts them to share names that match the given wildcard pattern (\'*\' matches one or more characters, \'?\' matches only one character)\&. If the \'\-l\' or \'\-\-long\' option is also given, it prints out info on user defined shares created by other users\&.
946.PP
947The information given about a share looks like: [foobar] path=/home/jeremy comment=testme usershare_acl=Everyone:F guest_ok=n And is a list of the current settings of the user defined share that can be modified by the "net usershare add" command\&.
948.SS "USERSHARE LIST [-l|--long] wildcard sharename"
949.PP
950List all the user defined shares owned by the current user matching the given pattern, or all users\&.
951.PP
952net usershare list on its own list out the names of the user defined shares that were created by the current user, or restricts the list to share names that match the given wildcard pattern (\'*\' matches one or more characters, \'?\' matches only one character)\&. If the \'\-l\' or \'\-\-long\' option is also given, it includes the names of user defined shares created by other users\&.
953.SS "CONF"
954.PP
955Starting with version 3\&.2\&.0, a Samba server can be configured by data stored in registry\&. This configuration data can be edited with the new "net conf" commands\&.
956.PP
957The deployment of this configuration data can be activated in two levels from the
958\fIsmb\&.conf\fR
959file: Share definitions from registry are activated by setting
960\fIregistry shares\fR
961to
962\(lqyes\(rq
963in the [global] section and global configuration options are activated by setting
964\m[blue]\fBinclude = registry\fR\m[]
965in the [global] section for a mixed configuration or by setting
966\m[blue]\fBconfig backend = registry\fR\m[]
967in the [global] section for a registry\-only configuration\&. See the
968\fBsmb.conf\fR(5)
969manpage for details\&.
970.PP
971The conf commands are:
972.RS 4
973net conf list \- Dump the complete configuration in smb\&.conf like
974format\&.
975.RE
976.RS 4
977net conf import \- Import configuration from file in smb\&.conf
978format\&.
979.RE
980.RS 4
981net conf listshares \- List the registry shares\&.
982.RE
983.RS 4
984net conf drop \- Delete the complete configuration from
985registry\&.
986.RE
987.RS 4
988net conf showshare \- Show the definition of a registry share\&.
989.RE
990.RS 4
991net conf addshare \- Create a new registry share\&.
992.RE
993.RS 4
994net conf delshare \- Delete a registry share\&.
995.RE
996.RS 4
997net conf setparm \- Store a parameter\&.
998.RE
999.RS 4
1000net conf getparm \- Retrieve the value of a parameter\&.
1001.RE
1002.RS 4
1003net conf delparm \- Delete a parameter\&.
1004.RE
1005.RS 4
1006net conf getincludes \- Show the includes of a share definition\&.
1007.RE
1008.RS 4
1009net conf setincludes \- Set includes for a share\&.
1010.RE
1011.RS 4
1012net conf delincludes \- Delete includes from a share definition\&.
1013.RE
1014.SS "CONF LIST"
1015.PP
1016Print the configuration data stored in the registry in a smb\&.conf\-like format to standard output\&.
1017.SS "CONF IMPORT [--test|-T] filename [section]"
1018.PP
1019This command imports configuration from a file in smb\&.conf format\&. If a section encountered in the input file is present in registry, its contents is replaced\&. Sections of registry configuration that have no counterpart in the input file are not affected\&. If you want to delete these, you will have to use the "net conf drop" or "net conf delshare" commands\&. Optionally, a section may be specified to restrict the effect of the import command to that specific section\&. A test mode is enabled by specifying the parameter "\-T" on the commandline\&. In test mode, no changes are made to the registry, and the resulting configuration is printed to standard output instead\&.
1020.SS "CONF LISTSHARES"
1021.PP
1022List the names of the shares defined in registry\&.
1023.SS "CONF DROP"
1024.PP
1025Delete the complete configuration data from registry\&.
1026.SS "CONF SHOWSHARE sharename"
1027.PP
1028Show the definition of the share or section specified\&. It is valid to specify "global" as sharename to retrieve the global configuration options from registry\&.
1029.SS "CONF ADDSHARE sharename path [writeable={y|N} [guest_ok={y|N} [comment]]] "
1030.PP
1031Create a new share definition in registry\&. The sharename and path have to be given\&. The share name may
1032\fInot\fR
1033be "global"\&. Optionally, values for the very common options "writeable", "guest ok" and a "comment" may be specified\&. The same result may be obtained by a sequence of "net conf setparm" commands\&.
1034.SS "CONF DELSHARE sharename"
1035.PP
1036Delete a share definition from registry\&.
1037.SS "CONF SETPARM section parameter value"
1038.PP
1039Store a parameter in registry\&. The section may be global or a sharename\&. The section is created if it does not exist yet\&.
1040.SS "CONF GETPARM section parameter"
1041.PP
1042Show a parameter stored in registry\&.
1043.SS "CONF DELPARM section parameter"
1044.PP
1045Delete a parameter stored in registry\&.
1046.SS "CONF GETINCLUDES section"
1047.PP
1048Get the list of includes for the provided section (global or share)\&.
1049.PP
1050Note that due to the nature of the registry database and the nature of include directives, the includes need special treatment: Parameters are stored in registry by the parameter name as valuename, so there is only ever one instance of a parameter per share\&. Also, a specific order like in a text file is not guaranteed\&. For all real parameters, this is perfectly ok, but the include directive is rather a meta parameter, for which, in the smb\&.conf text file, the place where it is specified between the other parameters is very important\&. This can not be achieved by the simple registry smbconf data model, so there is one ordered list of includes per share, and this list is evaluated after all the parameters of the share\&.
1051.PP
1052Further note that currently, only files can be included from registry configuration\&. In the future, there will be the ability to include configuration data from other registry keys\&.
1053.SS "CONF SETINCLUDES section [filename]+"
1054.PP
1055Set the list of includes for the provided section (global or share) to the given list of one or more filenames\&. The filenames may contain the usual smb\&.conf macros like %I\&.
1056.SS "CONF DELINCLUDES section"
1057.PP
1058Delete the list of includes from the provided section (global or share)\&.
1059.SS "HELP [COMMAND]"
1060.PP
1061Gives usage information for the specified command\&.
1062.SH "VERSION"
1063.PP
1064This man page is complete for version 3 of the Samba suite\&.
1065.SH "AUTHOR"
1066.PP
1067The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
1068.PP
1069The net manpage was written by Jelmer Vernooij\&.
Note: See TracBrowser for help on using the repository browser.