source: branches/samba-3.3.x/manpages/net.8@ 207

Last change on this file since 207 was 207, checked in by Herwig Bauernfeind, 17 years ago

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

File size: 35.0 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: 01/27/2009
5.\" Manual: System Administration tools
6.\" Source: Samba 3.3
7.\" Language: English
8.\"
9.TH "NET" "8" "01/27/2009" "Samba 3\&.3" "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