1 .\" This manpage has been automatically generated by docbook2man-spec
2 .\" from a DocBook document. docbook2man-spec can be found at:
3 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/>
4 .\" Please send any bug reports, improvements, comments, patches,
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH RPCCLIENT 1 "23 Jun 2001" "rpcclient 2.2.0a"
8 rpcclient \- tool for executing client side MS-RPC functions
11 \fBrpcclient\fR \fBserver\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 ]
14 This tool is part of the Sambasuite.
16 \fBrpcclient\fR is a utility initially developed
17 to test MS-RPC functionality in Samba itself. It has undergone
18 several stages of development and stability. Many system administrators
19 have now written scripts around it to manage Windows NT clients from
20 their UNIX workstation.
24 NetBIOS name of Server to which to connect.
25 The server can be any SMB/CIFS server. The name is
26 resolved using the \fIname resolve order\fRline from
31 you to specify a file from which to read the username and
32 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 string'\fR
47 execute semicolon separated commands (listed
51 set the debuglevel. Debug level 0 is the lowest
52 and 100 being the highest. This should be set to 100 if you are
53 planning on submitting a bug report to the Samba team (see BUGS.txt).
56 Print a summary of command line options.
59 File name for log/debug files. .client will be
60 appended. The log file is never removed by the client.
63 instruct \fBrpcclient\fR not to ask
64 for a password. By default, \fBrpcclient\fR will prompt
65 for a password. See also the \fI-U\fR option.
68 Specifies the location of the all important
71 \fB-U username[%password]\fR
72 Sets the SMB username or username and password.
74 If %password is not specified, The user will be prompted. The
75 client will first check the \fBUSER\fR environment variable, then the
76 \fBLOGNAME\fR variable and if either exist, the
77 string is uppercased. If these environmental variables are not
78 found, the username GUEST is used.
80 A third option is to use a credentials file which
81 contains the plaintext of the username and password. This
82 option is mainly provided for scripts where the admin doesn't
83 desire to pass the credentials on the command line or via environment
84 variables. If this method is used, make certain that the permissions
85 on the file restrict access from unwanted users. See the
86 \fI-A\fR for more details.
88 Be cautious about including passwords in scripts. Also, on
89 many systems the command line of a running process may be seen
90 via the \fBps\fR command. To be safe always allow
91 \fBrpcclient\fR to prompt for a password and type
95 Set the SMB domain of the username. This
96 overrides the default domain which is the domain of the
97 server specified with the \fI-S\fR option.
98 If the domain specified is the same as the server's NetBIOS name,
99 it causes the client to log on using the server's local SAM (as
100 opposed to the Domain SAM).
129 \fBqueryusergroups\fR
140 \fBadddriver <arch> <config>\fR
141 - Execute an AddPrinterDriver() RPC to install the printer driver
142 information on the server. Note that the driver files should
143 already exist in the directory returned by
144 \fBgetdriverdir\fR. Possible values for
145 \fIarch\fR are the same as those for
146 the \fBgetdriverdir\fR command.
147 The \fIconfig\fR parameter is defined as
157 Language Monitor Name:\\
159 Comma Separated list of Files
164 Any empty fields should be enter as the string "NULL".
166 Samba does not need to support the concept of Print Monitors
167 since these only apply to local printers whose driver can make
168 use of a bi-directional link for communication. This field should
169 be "NULL". On a remote NT print server, the Print Monitor for a
170 driver must already be installed prior to adding the driver or
171 else the RPC will fail.
174 \fBaddprinter <printername>
175 <sharename> <drivername> <port>\fR
176 - Add a printer on the remote server. This printer
177 will be automatically shared. Be aware that the printer driver
178 must already be installed on the server (see \fBadddriver\fR)
179 and the \fIport\fRmust be a valid port name (see
183 \fBenumdata\fR - Enumerate all
184 printer setting data stored on the server. On Windows NT clients,
185 these values are stored in the registry, while Samba servers
186 store them in the printers TDB. This command corresponds
187 to the MS Platform SDK GetPrinterData() function (* This
188 command is currently unimplemented).
191 \fBenumjobs <printer>\fR
192 - List the jobs and status of a given printer.
193 This command corresponds to the MS Platform SDK EnumJobs()
194 function (* This command is currently unimplemented).
197 \fBenumports [level]\fR
198 - Executes an EnumPorts() call using the specified
199 info level. Currently only info levels 1 and 2 are supported.
202 \fBenumdrivers [level]\fR
203 - Execute an EnumPrinterDrivers() call. This lists the various installed
204 printer drivers for all architectures. Refer to the MS Platform SDK
205 documentation for more details of the various flags and calling
206 options. Currently supported info levels are 1, 2, and 3.
209 \fBenumprinters [level]\fR
210 - Execute an EnumPrinters() call. This lists the various installed
211 and share printers. Refer to the MS Platform SDK documentation for
212 more details of the various flags and calling options. Currently
213 supported info levels are 0, 1, and 2.
216 \fBgetdata <printername>\fR
217 - Retrieve the data for a given printer setting. See
218 the \fBenumdata\fR command for more information.
219 This command corresponds to the GetPrinterData() MS Platform
220 SDK function (* This command is currently unimplemented).
223 \fBgetdriver <printername>\fR
224 - Retrieve the printer driver information (such as driver file,
225 config file, dependent files, etc...) for
226 the given printer. This command corresponds to the GetPrinterDriver()
227 MS Platform SDK function. Currently info level 1, 2, and 3 are supported.
230 \fBgetdriverdir <arch>\fR
231 - Execute a GetPrinterDriverDirectory()
232 RPC to retreive the SMB share name and subdirectory for
233 storing printer driver files for a given architecture. Possible
234 values for \fIarch\fR are "Windows 4.0"
235 (for Windows 95/98), "Windows NT x86", "Windows NT PowerPC", "Windows
236 Alpha_AXP", and "Windows NT R4000".
239 \fBgetprinter <printername>\fR
240 - Retrieve the current printer information. This command
241 corresponds to the GetPrinter() MS Platform SDK function.
244 \fBopenprinter <printername>\fR
245 - Execute an OpenPrinterEx() and ClosePrinter() RPC
246 against a given printer.
249 \fBsetdriver <printername> <drivername>\fR
250 - Execute a SetPrinter() command to update the printer driver associated
251 with an installed printer. The printer driver must already be correctly
252 installed on the print server.
254 See also the \fBenumprinters\fR and
255 \fBenumdrivers\fR commands for obtaining a list of
256 of installed printers and drivers.
258 \fBGENERAL OPTIONS\fR
262 \fBdebuglevel\fR - Set the current debug level
263 used to log information.
266 \fBhelp (?)\fR - Print a listing of all
267 known commands or extended help on a particular command.
270 \fBquit (exit)\fR - Exit \fBrpcclient
274 \fBrpcclient\fR is designed as a developer testing tool
275 and may not be robust in certain areas (such as command line parsing).
276 It has been known to generate a core dump upon failures when invalid
277 parameters where passed to the interpreter.
279 From Luke Leighton's original rpcclient man page:
281 \fB"WARNING!\fR The MSRPC over SMB code has
282 been developed from examining Network traces. No documentation is
283 available from the original creators (Microsoft) on how MSRPC over
284 SMB works, or how the individual MSRPC services work. Microsoft's
285 implementation of these services has been demonstrated (and reported)
286 to be... a bit flakey in places.
288 The development of Samba's implementation is also a bit rough,
289 and as more of the services are understood, it can even result in
290 versions of \fBsmbd(8)\fR and \fBrpcclient(1)\fR
291 that are incompatible for some commands or services. Additionally,
292 the developers are sending reports to Microsoft, and problems found
293 or reported to Microsoft are fixed in Service Packs, which may
294 result in incompatibilities."
297 This man page is correct for version 2.2 of the Samba
301 The original Samba software and related utilities
302 were created by Andrew Tridgell. Samba is now developed
303 by the Samba Team as an Open Source project similar
304 to the way the Linux kernel is developed.
306 The original rpcclient man page was written by Matthew
307 Geddes, Luke Kenneth Casson, and rewriten by Gerald Carter.
308 The conversion to DocBook for Samba 2.2 was done by Gerald