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

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

Update to Samba 3.2.3

File size: 31.1 KB
Line 
1.\" Title: net
2.\" Author:
3.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
4.\" Date: 08/27/2008
5.\" Manual: System Administration tools
6.\" Source: Samba 3.2
7.\"
8.TH "NET" "8" "08/27/2008" "Samba 3\.2" "System Administration tools"
9.\" disable hyphenation
10.nh
11.\" disable justification (adjust text to left margin only)
12.ad l
13.SH "NAME"
14net - Tool for administration of Samba and remote CIFS servers.
15.SH "SYNOPSIS"
16.HP 1
17net {<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]
18.SH "DESCRIPTION"
19.PP
20This tool is part of the
21\fBsamba\fR(7)
22suite\.
23.PP
24The 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\.
25.SH "OPTIONS"
26.PP
27\-h|\-\-help
28.RS 4
29Print a summary of command line options\.
30.RE
31.PP
32\-w target\-workgroup
33.RS 4
34Sets target workgroup or domain\. You have to specify either this option or the IP address or the name of a server\.
35.RE
36.PP
37\-W workgroup
38.RS 4
39Sets client workgroup or domain
40.RE
41.PP
42\-U user
43.RS 4
44User name to use
45.RE
46.PP
47\-I ip\-address
48.RS 4
49IP address of target server to use\. You have to specify either this option or a target workgroup or a target server\.
50.RE
51.PP
52\-p port
53.RS 4
54Port on the target server to connect to (usually 139 or 445)\. Defaults to trying 445 first, then 139\.
55.RE
56.PP
57\-n <primary NetBIOS name>
58.RS 4
59This option allows you to override the NetBIOS name that Samba uses for itself\. This is identical to setting the
60\fInetbios name\fR
61parameter in the
62\fIsmb\.conf\fR
63file\. However, a command line setting will take precedence over settings in
64\fIsmb\.conf\fR\.
65.RE
66.PP
67\-s <configuration file>
68.RS 4
69The 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
70\fIsmb\.conf\fR
71for more information\. The default configuration file name is determined at compile time\.
72.RE
73.PP
74\-S server
75.RS 4
76Name of target server\. You should specify either this option or a target workgroup or a target IP address\.
77.RE
78.PP
79\-l
80.RS 4
81When listing data, give more information on each item\.
82.RE
83.PP
84\-P
85.RS 4
86Make queries to the external server using the machine account of the local server\.
87.RE
88.PP
89\-d|\-\-debuglevel=level
90.RS 4
91\fIlevel\fR
92is an integer from 0 to 10\. The default value if this parameter is not specified is 0\.
93.sp
94The 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\.
95.sp
96Levels 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\.
97.sp
98Note that specifying this parameter here will override the
99\fIlog level\fR
100parameter in the
101\fIsmb\.conf\fR
102file\.
103.RE
104.SH "COMMANDS"
105.SS "CHANGESECRETPW"
106.PP
107This 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\.
108.SS "TIME"
109.PP
110The
111NET TIME
112command 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\.
113.SS "TIME"
114.PP
115Without any options, the
116NET TIME
117command displays the time on the remote server\.
118.SS "TIME SYSTEM"
119.PP
120Displays the time on the remote server in a format ready for
121/bin/date\.
122.SS "TIME SET"
123.PP
124Tries to set the date and time of the local server to that on the remote server using
125/bin/date\.
126.SS "TIME ZONE"
127.PP
128Displays the timezone in hours from GMT on the remote computer\.
129.SS "[RPC|ADS] JOIN [TYPE] [\-U username[%password]] [createupn=UPN] [createcomputer=OU] [options]"
130.PP
131Join 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\.
132.PP
133[TYPE] may be PDC, BDC or MEMBER to specify the type of server joining the domain\.
134.PP
135[UPN] (ADS only) set the principalname attribute during the join\. The default format is host/netbiosname@REALM\.
136.PP
137[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\.
138.SS "[RPC] OLDJOIN [options]"
139.PP
140Join 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\.
141.SS "[RPC|ADS] USER"
142.SS "[RPC|ADS] USER"
143.PP
144List all users
145.SS "[RPC|ADS] USER DELETE target"
146.PP
147Delete specified user
148.SS "[RPC|ADS] USER INFO target"
149.PP
150List the domain groups of the specified user\.
151.SS "[RPC|ADS] USER RENAME oldname newname"
152.PP
153Rename specified user\.
154.SS "[RPC|ADS] USER ADD name [password] [-F user flags] [-C comment]"
155.PP
156Add specified user\.
157.SS "[RPC|ADS] GROUP"
158.SS "[RPC|ADS] GROUP [misc options] [targets]"
159.PP
160List user groups\.
161.SS "[RPC|ADS] GROUP DELETE name [misc. options]"
162.PP
163Delete specified group\.
164.SS "[RPC|ADS] GROUP ADD name [-C comment]"
165.PP
166Create specified group\.
167.SS "[RAP|RPC] SHARE"
168.SS "[RAP|RPC] SHARE [misc. options] [targets]"
169.PP
170Enumerates all exported resources (network shares) on target server\.
171.SS "[RAP|RPC] SHARE ADD name=serverpath [-C comment] [-M maxusers] [targets]"
172.PP
173Adds a share from a server (makes the export active)\. Maxusers specifies the number of users that can be connected to the share simultaneously\.
174.SS "SHARE DELETE sharename"
175.PP
176Delete specified share\.
177.SS "[RPC|RAP] FILE"
178.SS "[RPC|RAP] FILE"
179.PP
180List all open files on remote server\.
181.SS "[RPC|RAP] FILE CLOSE fileid"
182.PP
183Close file with specified
184\fIfileid\fR
185on remote server\.
186.SS "[RPC|RAP] FILE INFO fileid"
187.PP
188Print information on specified
189\fIfileid\fR\. Currently listed are: file\-id, username, locks, path, permissions\.
190.SS "[RAP|RPC] FILE USER user"
191.PP
192List files opened by specified
193\fIuser\fR\. Please note that
194net rap file user
195does not work against Samba servers\.
196.SS "SESSION"
197.SS "RAP SESSION"
198.PP
199Without any other options, SESSION enumerates all active SMB/CIFS sessions on the target server\.
200.SS "RAP SESSION DELETE|CLOSE CLIENT_NAME"
201.PP
202Close the specified sessions\.
203.SS "RAP SESSION INFO CLIENT_NAME"
204.PP
205Give a list with all the open files in specified session\.
206.SS "RAP SERVER \fIDOMAIN\fR"
207.PP
208List all servers in specified domain or workgroup\. Defaults to local domain\.
209.SS "RAP DOMAIN"
210.PP
211Lists all domains and workgroups visible on the current network\.
212.SS "RAP PRINTQ"
213.SS "RAP PRINTQ LIST QUEUE_NAME"
214.PP
215Lists the specified print queue and print jobs on the server\. If the
216\fIQUEUE_NAME\fR
217is omitted, all queues are listed\.
218.SS "RAP PRINTQ DELETE JOBID"
219.PP
220Delete job with specified id\.
221.SS "RAP VALIDATE \fIuser\fR [\fIpassword\fR]"
222.PP
223Validate whether the specified user can log in to the remote server\. If the password is not specified on the commandline, it will be prompted\.
224.sp
225.it 1 an-trap
226.nr an-no-space-flag 1
227.nr an-break-flag 1
228.br
229Note
230.PP
231Currently NOT implemented\.
232.SS "RAP GROUPMEMBER"
233.SS "RAP GROUPMEMBER LIST GROUP"
234.PP
235List all members of the specified group\.
236.SS "RAP GROUPMEMBER DELETE GROUP USER"
237.PP
238Delete member from group\.
239.SS "RAP GROUPMEMBER ADD GROUP USER"
240.PP
241Add member to group\.
242.SS "RAP ADMIN \fIcommand\fR"
243.PP
244Execute the specified
245\fIcommand\fR
246on the remote server\. Only works with OS/2 servers\.
247.sp
248.it 1 an-trap
249.nr an-no-space-flag 1
250.nr an-break-flag 1
251.br
252Note
253.PP
254Currently NOT implemented\.
255.SS "RAP SERVICE"
256.SS "RAP SERVICE START NAME [arguments...]"
257.PP
258Start the specified service on the remote server\. Not implemented yet\.
259.sp
260.it 1 an-trap
261.nr an-no-space-flag 1
262.nr an-break-flag 1
263.br
264Note
265.PP
266Currently NOT implemented\.
267
268.SS "RAP SERVICE STOP"
269.PP
270Stop the specified service on the remote server\.
271.sp
272.it 1 an-trap
273.nr an-no-space-flag 1
274.nr an-break-flag 1
275.br
276Note
277.PP
278Currently NOT implemented\.
279.SS "RAP PASSWORD \fIUSER\fR \fIOLDPASS\fR \fINEWPASS\fR"
280.PP
281Change password of
282\fIUSER\fR
283from
284\fIOLDPASS\fR
285to
286\fINEWPASS\fR\.
287.SS "LOOKUP"
288.SS "LOOKUP HOST HOSTNAME [TYPE]"