1 .\" This manpage has been automatically generated by docbook2man
2 .\" from a DocBook document. This tool can be found at:
3 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
4 .\" Please send any bug reports, improvements, comments, patches,
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH "RPCCLIENT" "1" "04 March 2003" "" ""
8 rpcclient \- tool for executing client side MS-RPC functions
11 \fBrpcclient\fR [ \fB-A authfile\fR ] [ \fB-c <command string>\fR ] [ \fB-d debuglevel\fR ] [ \fB-h\fR ] [ \fB-l logfile\fR ] [ \fB-N\fR ] [ \fB-s <smb config file>\fR ] [ \fB-U username[%password]\fR ] [ \fB-W workgroup\fR ] [ \fB-N\fR ] [ \fB-I destinationIP\fR ] \fBserver\fR
15 This tool is part of the Samba suite.
17 \fBrpcclient\fR is a utility initially developed
18 to test MS-RPC functionality in Samba itself. It has undergone
19 several stages of development and stability. Many system administrators
20 have now written scripts around it to manage Windows NT clients from
21 their UNIX workstation.
25 NetBIOS name of Server to which to connect.
26 The server can be any SMB/CIFS server. The name is
27 resolved using the \fIname resolve order\fR line from
30 \fB-A|--authfile=filename\fR
32 you to specify a file from which to read the username and
33 password used in the connection. The format of the file is
43 Make certain that the permissions on the file restrict
44 access from unwanted users.
46 \fB-c|--command='command string'\fR
47 execute semicolon separated commands (listed
50 \fB-d|--debug=debuglevel\fR
51 \fIdebuglevel\fR is an integer
52 from 0 to 10. The default value if this parameter is
53 not specified is zero.
55 The higher this value, the more detail will be
56 logged to the log files about the activities of the
57 server. At level 0, only critical errors and serious
58 warnings will be logged. Level 1 is a reasonable level for
59 day to day running - it generates a small amount of
60 information about operations carried out.
62 Levels above 1 will generate considerable
63 amounts of log data, and should only be used when
64 investigating a problem. Levels above 3 are designed for
65 use only by developers and generate HUGE amounts of log
66 data, most of which is extremely cryptic.
68 Note that specifying this parameter here will
73 Print a summary of command line options.
76 \fIIP address\fR is the address of the server to connect to.
77 It should be specified in standard "a.b.c.d" notation.
79 Normally the client would attempt to locate a named
80 SMB/CIFS server by looking it up via the NetBIOS name resolution
81 mechanism described above in the \fIname resolve order\fR
82 parameter above. Using this parameter will force the client
83 to assume that the server is on the machine with the specified IP
84 address and the NetBIOS name component of the resource being
85 connected to will be ignored.
87 There is no default for this parameter. If not supplied,
88 it will be determined automatically by the client as described
91 \fB-l|--logfile=logbasename\fR
92 File name for log/debug files. The extension
93 \&'.client' will be appended. The log file is
94 never removed by the client.
97 instruct \fBrpcclient\fR not to ask
98 for a password. By default, \fBrpcclient\fR will
99 prompt for a password. See also the \fI-U\fR
102 \fB-s|--conf=smb.conf\fR
103 Specifies the location of the all-important
106 \fB-U|--user=username[%password]\fR
107 Sets the SMB username or username and password.
109 If %password is not specified, the user will be prompted. The
110 client will first check the \fBUSER\fR environment variable, then the
111 \fBLOGNAME\fR variable and if either exists, the
112 string is uppercased. If these environmental variables are not
113 found, the username GUEST is used.
115 A third option is to use a credentials file which
116 contains the plaintext of the username and password. This
117 option is mainly provided for scripts where the admin does not
118 wish to pass the credentials on the command line or via environment
119 variables. If this method is used, make certain that the permissions
120 on the file restrict access from unwanted users. See the
121 \fI-A\fR for more details.
123 Be cautious about including passwords in scripts. Also, on
124 many systems the command line of a running process may be seen
125 via the \fBps\fR command. To be safe always allow
126 \fBrpcclient\fR to prompt for a password and type
129 \fB-W|--workgroup=domain\fR
130 Set the SMB domain of the username. This
131 overrides the default domain which is the domain defined in
132 smb.conf. If the domain specified is the same as the server's NetBIOS name,
133 it causes the client to log on using the server's local SAM (as
134 opposed to the Domain SAM).
143 \fBlookupsids\fR - Resolve a list
144 of SIDs to usernames.
147 \fBlookupnames\fR - Resolve a list
148 of usernames to SIDs.
163 \fBqueryusergroups\fR
184 \fBadddriver <arch> <config>\fR
185 - Execute an AddPrinterDriver() RPC to install the printer driver
186 information on the server. Note that the driver files should
187 already exist in the directory returned by
188 \fBgetdriverdir\fR. Possible values for
189 \fIarch\fR are the same as those for
190 the \fBgetdriverdir\fR command.
191 The \fIconfig\fR parameter is defined as
201 Language Monitor Name:\\
203 Comma Separated list of Files
207 Any empty fields should be enter as the string "NULL".
209 Samba does not need to support the concept of Print Monitors
210 since these only apply to local printers whose driver can make
211 use of a bi-directional link for communication. This field should
212 be "NULL". On a remote NT print server, the Print Monitor for a
213 driver must already be installed prior to adding the driver or
214 else the RPC will fail.
217 \fBaddprinter <printername>
218 <sharename> <drivername> <port>\fR
219 - Add a printer on the remote server. This printer
220 will be automatically shared. Be aware that the printer driver
221 must already be installed on the server (see \fBadddriver\fR)
222 and the \fIport\fRmust be a valid port name (see
226 \fBdeldriver\fR - Delete the
227 specified printer driver for all architectures. This
228 does not delete the actual driver files from the server,
229 only the entry from the server's list of drivers.
232 \fBenumdata\fR - Enumerate all
233 printer setting data stored on the server. On Windows NT clients,
234 these values are stored in the registry, while Samba servers
235 store them in the printers TDB. This command corresponds
236 to the MS Platform SDK GetPrinterData() function (* This
237 command is currently unimplemented).
240 \fBenumjobs <printer>\fR
241 - List the jobs and status of a given printer.
242 This command corresponds to the MS Platform SDK EnumJobs()
243 function (* This command is currently unimplemented).
246 \fBenumports [level]\fR
247 - Executes an EnumPorts() call using the specified
248 info level. Currently only info levels 1 and 2 are supported.
251 \fBenumdrivers [level]\fR
252 - Execute an EnumPrinterDrivers() call. This lists the various installed
253 printer drivers for all architectures. Refer to the MS Platform SDK
254 documentation for more details of the various flags and calling
255 options. Currently supported info levels are 1, 2, and 3.
258 \fBenumprinters [level]\fR
259 - Execute an EnumPrinters() call. This lists the various installed
260 and share printers. Refer to the MS Platform SDK documentation for
261 more details of the various flags and calling options. Currently
262 supported info levels are 0, 1, and 2.
265 \fBgetdata <printername>\fR
266 - Retrieve the data for a given printer setting. See
267 the \fBenumdata\fR command for more information.
268 This command corresponds to the GetPrinterData() MS Platform
269 SDK function (* This command is currently unimplemented).
272 \fBgetdriver <printername>\fR
273 - Retrieve the printer driver information (such as driver file,
274 config file, dependent files, etc...) for
275 the given printer. This command corresponds to the GetPrinterDriver()
276 MS Platform SDK function. Currently info level 1, 2, and 3 are supported.
279 \fBgetdriverdir <arch>\fR
280 - Execute a GetPrinterDriverDirectory()
281 RPC to retrieve the SMB share name and subdirectory for
282 storing printer driver files for a given architecture. Possible
283 values for \fIarch\fR are "Windows 4.0"
284 (for Windows 95/98), "Windows NT x86", "Windows NT PowerPC", "Windows
285 Alpha_AXP", and "Windows NT R4000".
288 \fBgetprinter <printername>\fR
289 - Retrieve the current printer information. This command
290 corresponds to the GetPrinter() MS Platform SDK function.
293 \fBopenprinter <printername>\fR
294 - Execute an OpenPrinterEx() and ClosePrinter() RPC
295 against a given printer.
298 \fBsetdriver <printername>
300 - Execute a SetPrinter() command to update the printer driver
301 associated with an installed printer. The printer driver must
302 already be correctly installed on the print server.
304 See also the \fBenumprinters\fR and
305 \fBenumdrivers\fR commands for obtaining a list of
306 of installed printers and drivers.
308 \fBGENERAL OPTIONS\fR
311 \fBdebuglevel\fR - Set the current
312 debug level used to log information.
315 \fBhelp (?)\fR - Print a listing of all
316 known commands or extended help on a particular command.
319 \fBquit (exit)\fR - Exit \fBrpcclient
323 \fBrpcclient\fR is designed as a developer testing tool
324 and may not be robust in certain areas (such as command line parsing).
325 It has been known to generate a core dump upon failures when invalid
326 parameters where passed to the interpreter.
328 From Luke Leighton's original rpcclient man page:
330 \fB"WARNING!\fR The MSRPC over SMB code has
331 been developed from examining Network traces. No documentation is
332 available from the original creators (Microsoft) on how MSRPC over
333 SMB works, or how the individual MSRPC services work. Microsoft's
334 implementation of these services has been demonstrated (and reported)
335 to be... a bit flaky in places.
337 The development of Samba's implementation is also a bit rough,
338 and as more of the services are understood, it can even result in
339 versions of \fBsmbd(8)\fR and \fBrpcclient(1)\fR
340 that are incompatible for some commands or services. Additionally,
341 the developers are sending reports to Microsoft, and problems found
342 or reported to Microsoft are fixed in Service Packs, which may
343 result in incompatibilities."
346 This man page is correct for version 3.0 of the Samba
350 The original Samba software and related utilities
351 were created by Andrew Tridgell. Samba is now developed
352 by the Samba Team as an Open Source project similar
353 to the way the Linux kernel is developed.
355 The original rpcclient man page was written by Matthew
356 Geddes, Luke Kenneth Casson Leighton, and rewritten by Gerald Carter.
357 The conversion to DocBook for Samba 2.2 was done by Gerald