source: branches/samba-3.2.x/docs/manpages/rpcclient.1@ 204

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

Update 3.2 branch to 3.2.4

File size: 16.6 KB
Line 
1.\" Title: rpcclient
2.\" Author:
3.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
4.\" Date: 09/18/2008
5.\" Manual: User Commands
6.\" Source: Samba 3.2
7.\"
8.TH "RPCCLIENT" "1" "09/18/2008" "Samba 3\.2" "User Commands"
9.\" disable hyphenation
10.nh
11.\" disable justification (adjust text to left margin only)
12.ad l
13.SH "NAME"
14rpcclient - tool for executing client side MS-RPC functions
15.SH "SYNOPSIS"
16.HP 1
17rpcclient [\-A\ authfile] [\-c\ <command\ string>] [\-d\ debuglevel] [\-h] [\-l\ logdir] [\-N] [\-s\ <smb\ config\ file>] [\-U\ username[%password]] [\-W\ workgroup] [\-N] [\-I\ destinationIP] {server}
18.SH "DESCRIPTION"
19.PP
20This tool is part of the
21\fBsamba\fR(7)
22suite\.
23.PP
24rpcclient
25is a utility initially developed to test MS\-RPC functionality in Samba itself\. It has undergone several stages of development and stability\. Many system administrators have now written scripts around it to manage Windows NT clients from their UNIX workstation\.
26.SH "OPTIONS"
27.PP
28server
29.RS 4
30NetBIOS name of Server to which to connect\. The server can be any SMB/CIFS server\. The name is resolved using the
31\fIname resolve order\fR
32line from
33\fBsmb.conf\fR(5)\.
34.RE
35.PP
36\-c|\-\-command=\'command string\'
37.RS 4
38execute semicolon separated commands (listed below))
39.RE
40.PP
41\-I IP\-address
42.RS 4
43\fIIP address\fR
44is the address of the server to connect to\. It should be specified in standard "a\.b\.c\.d" notation\.
45.sp
46Normally the client would attempt to locate a named SMB/CIFS server by looking it up via the NetBIOS name resolution mechanism described above in the
47\fIname resolve order\fR
48parameter above\. Using this parameter will force the client to assume that the server is on the machine with the specified IP address and the NetBIOS name component of the resource being connected to will be ignored\.
49.sp
50There is no default for this parameter\. If not supplied, it will be determined automatically by the client as described above\.
51.RE
52.PP
53\-d|\-\-debuglevel=level
54.RS 4
55\fIlevel\fR
56is an integer from 0 to 10\. The default value if this parameter is not specified is 0\.
57.sp
58The 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\.
59.sp
60Levels 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\.
61.sp
62Note that specifying this parameter here will override the
63\fIlog level\fR
64parameter in the
65\fIsmb\.conf\fR
66file\.
67.RE
68.PP
69\-V
70.RS 4
71Prints the program version number\.
72.RE
73.PP
74\-s <configuration file>
75.RS 4
76The 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
77\fIsmb\.conf\fR
78for more information\. The default configuration file name is determined at compile time\.
79.RE
80.PP
81\-l|\-\-log\-basename=logdirectory
82.RS 4
83Base directory name for log/debug files\. The extension
84\fB"\.progname"\fR
85will be appended (e\.g\. log\.smbclient, log\.smbd, etc\.\.\.)\. The log file is never removed by the client\.
86.RE
87.PP
88\-N
89.RS 4
90If specified, this parameter suppresses the normal password prompt from the client to the user\. This is useful when accessing a service that does not require a password\.
91.sp
92Unless a password is specified on the command line or this parameter is specified, the client will request a password\.
93.sp
94If a password is specified on the command line and this option is also defined the password on the command line will be silently ingnored and no password will be used\.
95.RE
96.PP
97\-k
98.RS 4
99Try to authenticate with kerberos\. Only useful in an Active Directory environment\.
100.RE
101.PP
102\-A|\-\-authentication\-file=filename
103.RS 4
104This option allows you to specify a file from which to read the username and password used in the connection\. The format of the file is
105.sp
106.sp
107.RS 4
108.nf
109username = <value>
110password = <value>
111domain = <value>
112.fi
113.RE
114.sp
115Make certain that the permissions on the file restrict access from unwanted users\.
116.RE
117.PP
118\-U|\-\-user=username[%password]
119.RS 4
120Sets the SMB username or username and password\.
121.sp
122If %password is not specified, the user will be prompted\. The client will first check the
123\fBUSER\fR
124environment variable, then the
125\fBLOGNAME\fR
126variable and if either exists, the string is uppercased\. If these environmental variables are not found, the username
127\fBGUEST\fR
128is used\.
129.sp
130A third option is to use a credentials file which contains the plaintext of the username and password\. This option is mainly provided for scripts where the admin does not wish to pass the credentials on the command line or via environment variables\. If this method is used, make certain that the permissions on the file restrict access from unwanted users\. See the
131\fI\-A\fR
132for more details\.
133.sp
134Be cautious about including passwords in scripts\. Also, on many systems the command line of a running process may be seen via the
135ps
136command\. To be safe always allow
137rpcclient
138to prompt for a password and type it in directly\.
139.RE
140.PP
141\-n <primary NetBIOS name>
142.RS 4
143This option allows you to override the NetBIOS name that Samba uses for itself\. This is identical to setting the
144\fInetbios name\fR
145parameter in the
146\fIsmb\.conf\fR
147file\. However, a command line setting will take precedence over settings in
148\fIsmb\.conf\fR\.
149.RE
150.PP
151\-i <scope>
152.RS 4
153This specifies a NetBIOS scope that
154nmblookup
155will use to communicate with when generating NetBIOS names\. For details on the use of NetBIOS scopes, see rfc1001\.txt and rfc1002\.txt\. NetBIOS scopes are
156\fIvery\fR
157rarely used, only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with\.
158.RE
159.PP
160\-W|\-\-workgroup=domain
161.RS 4
162Set the SMB domain of the username\. This overrides the default domain which is the domain defined in smb\.conf\. If the domain specified is the same as the servers NetBIOS name, it causes the client to log on using the servers local SAM (as opposed to the Domain SAM)\.
163.RE
164.PP
165\-O socket options
166.RS 4
167TCP socket options to set on the client socket\. See the socket options parameter in the
168\fIsmb\.conf\fR
169manual page for the list of valid options\.
170.RE
171.PP
172\-h|\-\-help
173.RS 4
174Print a summary of command line options\.
175.RE
176.SH "COMMANDS"
177.SS "LSARPC"
178.PP
179lsaquery
180.RS 4
181Query info policy
182.RE
183.PP
184lookupsids
185.RS 4
186Resolve a list of SIDs to usernames\.
187.RE
188.PP
189lookupnames
190.RS 4
191Resolve a list of usernames to SIDs\.
192.RE
193.PP
194enumtrusts
195.RS 4
196Enumerate trusted domains
197.RE
198.PP
199enumprivs
200.RS 4
201Enumerate privileges
202.RE
203.PP
204getdispname
205.RS 4
206Get the privilege name
207.RE
208.PP
209lsaenumsid
210.RS 4
211Enumerate the LSA SIDS
212.RE
213.PP
214lsaenumprivsaccount
215.RS 4
216Enumerate the privileges of an SID
217.RE
218.PP
219lsaenumacctrights
220.RS 4
221Enumerate the rights of an SID
222.RE
223.PP
224lsaenumacctwithright
225.RS 4
226Enumerate accounts with a right
227.RE
228.PP
229lsaaddacctrights
230.RS 4
231Add rights to an account
232.RE
233.PP
234lsaremoveacctrights
235.RS 4
236Remove rights from an account
237.RE
238.PP
239lsalookupprivvalue
240.RS 4
241Get a privilege value given its name
242.RE
243.PP
244lsaquerysecobj
245.RS 4
246Query LSA security object
247.RE
248.SS "LSARPC\-DS"
249.PP
250dsroledominfo
251.RS 4
252Get Primary Domain Information
253.RE
254.PP
255.PP
256\fIDFS\fR
257.PP
258dfsexist
259.RS 4
260Query DFS support
261.RE
262.PP
263dfsadd
264.RS 4
265Add a DFS share
266.RE
267.PP
268dfsremove
269.RS 4
270Remove a DFS share
271.RE
272.PP
273dfsgetinfo
274.RS 4
275Query DFS share info
276.RE
277.PP
278dfsenum
279.RS 4
280Enumerate dfs shares
281.RE
282.SS "REG"
283.PP
284shutdown
285.RS 4
286Remote Shutdown
287.RE
288.PP
289abortshutdown
290.RS 4
291Abort Shutdown
292.RE
293.SS "SRVSVC"
294.PP
295srvinfo
296.RS 4
297Server query info
298.RE
299.PP
300netshareenum
301.RS 4
302Enumerate shares
303.RE
304.PP
305netfileenum
306.RS 4
307Enumerate open files
308.RE
309.PP
310netremotetod
311.RS 4
312Fetch remote time of day
313.RE
314.SS "SAMR"
315.PP
316queryuser
317.RS 4
318Query user info
319.RE
320.PP
321querygroup
322.RS 4
323Query group info
324.RE
325.PP
326queryusergroups
327.RS 4
328Query user groups
329.RE
330.PP
331querygroupmem
332.RS 4
333Query group membership
334.RE
335.PP
336queryaliasmem
337.RS 4
338Query alias membership
339.RE
340.PP
341querydispinfo
342.RS 4
343Query display info
344.RE
345.PP
346querydominfo
347.RS 4
348Query domain info
349.RE
350.PP
351enumdomusers
352.RS 4
353Enumerate domain users
354.RE
355.PP
356enumdomgroups
357.RS 4
358Enumerate domain groups
359.RE
360.PP
361enumalsgroups
362.RS 4
363Enumerate alias groups
364.RE
365.PP
366createdomuser
367.RS 4
368Create domain user
369.RE
370.PP
371samlookupnames
372.RS 4
373Look up names
374.RE
375.PP
376samlookuprids
377.RS 4
378Look up names
379.RE
380.PP
381deletedomuser
382.RS 4
383Delete domain user
384.RE
385.PP
386samquerysecobj
387.RS 4
388Query SAMR security object
389.RE
390.PP
391getdompwinfo
392.RS 4
393Retrieve domain password info
394.RE
395.PP
396lookupdomain
397.RS 4
398Look up domain
399.RE
400.SS "SPOOLSS"
401.PP
402adddriver <arch> <config> [<version>]
403.RS 4
404Execute an AddPrinterDriver() RPC to install the printer driver information on the server\. Note that the driver files should already exist in the directory returned by
405getdriverdir\. Possible values for
406\fIarch\fR
407are the same as those for the
408getdriverdir
409command\. The
410\fIconfig\fR
411parameter is defined as follows:
412.sp
413.sp