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" "06 December 2001" "" ""
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 \fIBUGS.txt\fR).
56 Print a summary of command line options.
59 File name for log/debug files. The extension
60 \&'.client' will be appended. The log file is never removed
64 instruct \fBrpcclient\fR not to ask
65 for a password. By default, \fBrpcclient\fR will prompt
66 for a password. See also the \fI-U\fR option.
69 Specifies the location of the all important
72 \fB-U username[%password]\fR
73 Sets the SMB username or username and password.
75 If %password is not specified, the user will be prompted. The
76 client will first check the \fBUSER\fR environment variable, then the
77 \fBLOGNAME\fR variable and if either exists, the
78 string is uppercased. If these environmental variables are not
79 found, the username GUEST is used.
81 A third option is to use a credentials file which
82 contains the plaintext of the username and password. This
83 option is mainly provided for scripts where the admin doesn't
84 desire to pass the credentials on the command line or via environment
85 variables. If this method is used, make certain that the permissions
86 on the file restrict access from unwanted users. See the
87 \fI-A\fR for more details.
89 Be cautious about including passwords in scripts. Also, on
90 many systems the command line of a running process may be seen
91 via the \fBps\fR command. To be safe always allow
92 \fBrpcclient\fR to prompt for a password and type
96 Set the SMB domain of the username. This
97 overrides the default domain which is the domain defined in
98 smb.conf. 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).
109 \fBlookupsids\fR - Resolve a list
110 of SIDs to usernames.
113 \fBlookupnames\fR - Resolve s list
114 of usernames to SIDs.
131 \fBqueryusergroups\fR
154 \fBadddriver <arch> <config>\fR
155 - Execute an AddPrinterDriver() RPC to install the printer driver
156 information on the server. Note that the driver files should
157 already exist in the directory returned by
158 \fBgetdriverdir\fR. Possible values for
159 \fIarch\fR are the same as those for
160 the \fBgetdriverdir\fR command.
161 The \fIconfig\fR parameter is defined as
171 Language Monitor Name:\\
173 Comma Separated list of Files
178 Any empty fields should be enter as the string "NULL".
180 Samba does not need to support the concept of Print Monitors
181 since these only apply to local printers whose driver can make
182 use of a bi-directional link for communication. This field should
183 be "NULL". On a remote NT print server, the Print Monitor for a
184 driver must already be installed prior to adding the driver or
185 else the RPC will fail.
188 \fBaddprinter <printername>
189 <sharename> <drivername> <port>\fR
190 - Add a printer on the remote server. This printer
191 will be automatically shared. Be aware that the printer driver
192 must already be installed on the server (see \fBadddriver\fR)
193 and the \fIport\fRmust be a valid port name (see
197 \fBdeldriver\fR - Delete the
198 specified printer driver for all architectures. This
199 does not delete the actual driver files from the server,
200 only the entry from the server's list of drivers.
203 \fBenumdata\fR - Enumerate all
204 printer setting data stored on the server. On Windows NT clients,
205 these values are stored in the registry, while Samba servers
206 store them in the printers TDB. This command corresponds
207 to the MS Platform SDK GetPrinterData() function (* This
208 command is currently unimplemented).
211 \fBenumjobs <printer>\fR
212 - List the jobs and status of a given printer.
213 This command corresponds to the MS Platform SDK EnumJobs()
214 function (* This command is currently unimplemented).
217 \fBenumports [level]\fR
218 - Executes an EnumPorts() call using the specified
219 info level. Currently only info levels 1 and 2 are supported.
222 \fBenumdrivers [level]\fR
223 - Execute an EnumPrinterDrivers() call. This lists the various installed
224 printer drivers for all architectures. Refer to the MS Platform SDK
225 documentation for more details of the various flags and calling
226 options. Currently supported info levels are 1, 2, and 3.
229 \fBenumprinters [level]\fR
230 - Execute an EnumPrinters() call. This lists the various installed
231 and share printers. Refer to the MS Platform SDK documentation for
232 more details of the various flags and calling options. Currently
233 supported info levels are 0, 1, and 2.
236 \fBgetdata <printername>\fR
237 - Retrieve the data for a given printer setting. See
238 the \fBenumdata\fR command for more information.
239 This command corresponds to the GetPrinterData() MS Platform
240 SDK function (* This command is currently unimplemented).
243 \fBgetdriver <printername>\fR
244 - Retrieve the printer driver information (such as driver file,
245 config file, dependent files, etc...) for
246 the given printer. This command corresponds to the GetPrinterDriver()
247 MS Platform SDK function. Currently info level 1, 2, and 3 are supported.
250 \fBgetdriverdir <arch>\fR
251 - Execute a GetPrinterDriverDirectory()
252 RPC to retreive the SMB share name and subdirectory for
253 storing printer driver files for a given architecture. Possible
254 values for \fIarch\fR are "Windows 4.0"
255 (for Windows 95/98), "Windows NT x86", "Windows NT PowerPC", "Windows
256 Alpha_AXP", and "Windows NT R4000".
259 \fBgetprinter <printername>\fR
260 - Retrieve the current printer information. This command
261 corresponds to the GetPrinter() MS Platform SDK function.
264 \fBopenprinter <printername>\fR
265 - Execute an OpenPrinterEx() and ClosePrinter() RPC
266 against a given printer.
269 \fBsetdriver <printername> <drivername>\fR
270 - Execute a SetPrinter() command to update the printer driver associated
271 with an installed printer. The printer driver must already be correctly
272 installed on the print server.
274 See also the \fBenumprinters\fR and
275 \fBenumdrivers\fR commands for obtaining a list of
276 of installed printers and drivers.
278 \fBGENERAL OPTIONS\fR
282 \fBdebuglevel\fR - Set the current debug level
283 used to log information.
286 \fBhelp (?)\fR - Print a listing of all
287 known commands or extended help on a particular command.
290 \fBquit (exit)\fR - Exit \fBrpcclient
294 \fBrpcclient\fR is designed as a developer testing tool
295 and may not be robust in certain areas (such as command line parsing).
296 It has been known to generate a core dump upon failures when invalid
297 parameters where passed to the interpreter.
299 From Luke Leighton's original rpcclient man page:
301 \fB"WARNING!\fR The MSRPC over SMB code has
302 been developed from examining Network traces. No documentation is
303 available from the original creators (Microsoft) on how MSRPC over
304 SMB works, or how the individual MSRPC services work. Microsoft's
305 implementation of these services has been demonstrated (and reported)
306 to be... a bit flaky in places.
308 The development of Samba's implementation is also a bit rough,
309 and as more of the services are understood, it can even result in
310 versions of \fBsmbd(8)\fR and \fBrpcclient(1)\fR
311 that are incompatible for some commands or services. Additionally,
312 the developers are sending reports to Microsoft, and problems found
313 or reported to Microsoft are fixed in Service Packs, which may
314 result in incompatibilities."
317 This man page is correct for version 2.2 of the Samba
321 The original Samba software and related utilities
322 were created by Andrew Tridgell. Samba is now developed
323 by the Samba Team as an Open Source project similar
324 to the way the Linux kernel is developed.
326 The original rpcclient man page was written by Matthew
327 Geddes, Luke Kenneth Casson Leighton, and rewritten by Gerald Carter.
328 The conversion to DocBook for Samba 2.2 was done by Gerald