1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.77"></HEAD
28 >rpcclient -- tool for executing client side
31 CLASS="REFSYNOPSISDIV"
41 > [-A authfile] [-c <command string>] [-d debuglevel] [-h] [-l logfile] [-N] [-s <smb config file>] [-U username[%password]] [-W workgroup] [-N] [-I destinationIP] {server}</P
51 >This tool is part of the <A
60 > is a utility initially developed
61 to test MS-RPC functionality in Samba itself. It has undergone
62 several stages of development and stability. Many system administrators
63 have now written scripts around it to manage Windows NT clients from
64 their UNIX workstation. </P
82 >NetBIOS name of Server to which to connect.
83 The server can be any SMB/CIFS server. The name is
85 HREF="smb.conf.5.html#NAMERESOLVEORDER"
90 >name resolve order</I
100 >-A|--authfile=filename</DT
104 you to specify a file from which to read the username and
105 password used in the connection. The format of the file is
109 CLASS="PROGRAMLISTING"
110 > username = <value>
111 password = <value>
112 domain = <value>
116 >Make certain that the permissions on the file restrict
117 access from unwanted users. </P
120 >-c|--command='command string'</DT
123 >execute semicolon separated commands (listed
127 >-d|--debug=debuglevel</DT
136 from 0 to 10. The default value if this parameter is
137 not specified is zero.</P
139 >The higher this value, the more detail will be
140 logged to the log files about the activities of the
141 server. At level 0, only critical errors and serious
142 warnings will be logged. Level 1 is a reasonable level for
143 day to day running - it generates a small amount of
144 information about operations carried out.</P
146 >Levels above 1 will generate considerable
147 amounts of log data, and should only be used when
148 investigating a problem. Levels above 3 are designed for
149 use only by developers and generate HUGE amounts of log
150 data, most of which is extremely cryptic.</P
152 >Note that specifying this parameter here will
154 HREF="smb.conf.5.html#loglevel"
158 > parameter in the <A
159 HREF="smb.conf.5.html"
171 >Print a summary of command line options.</P
182 > is the address of the server to connect to.
183 It should be specified in standard "a.b.c.d" notation. </P
185 >Normally the client would attempt to locate a named
186 SMB/CIFS server by looking it up via the NetBIOS name resolution
187 mechanism described above in the <TT
190 >name resolve order</I
193 parameter above. Using this parameter will force the client
194 to assume that the server is on the machine with the specified IP
195 address and the NetBIOS name component of the resource being
196 connected to will be ignored. </P
198 >There is no default for this parameter. If not supplied,
199 it will be determined automatically by the client as described
203 >-l|--logfile=logbasename</DT
206 >File name for log/debug files. The extension
210 > will be appended. The log file is
211 never removed by the client.
222 for a password. By default, <B
226 prompt for a password. See also the <TT
235 >-s|--conf=smb.conf</DT
238 >Specifies the location of the all-important
245 >-U|--user=username[%password]</DT
248 >Sets the SMB username or username and password. </P
250 >If %password is not specified, the user will be prompted. The
251 client will first check the <TT
254 > environment variable, then the
258 > variable and if either exists, the
259 string is uppercased. If these environmental variables are not
260 found, the username <TT
265 >A third option is to use a credentials file which
266 contains the plaintext of the username and password. This
267 option is mainly provided for scripts where the admin does not
268 wish to pass the credentials on the command line or via environment
269 variables. If this method is used, make certain that the permissions
270 on the file restrict access from unwanted users. See the
276 > for more details. </P
278 >Be cautious about including passwords in scripts. Also, on
279 many systems the command line of a running process may be seen
283 > command. To be safe always allow
287 > to prompt for a password and type
291 >-W|--workgroup=domain</DT
294 >Set the SMB domain of the username. This
295 overrides the default domain which is the domain defined in
296 smb.conf. If the domain specified is the same as the server's NetBIOS name,
297 it causes the client to log on using the server's local SAM (as
298 opposed to the Domain SAM). </P
334 of SIDs to usernames.
343 of usernames to SIDs.
441 >adddriver <arch> <config></B
443 - Execute an AddPrinterDriver() RPC to install the printer driver
444 information on the server. Note that the driver files should
445 already exist in the directory returned by
449 >. Possible values for
455 > are the same as those for
465 > parameter is defined as
469 CLASS="PROGRAMLISTING"
470 > Long Printer Name:\
475 Language Monitor Name:\
477 Comma Separated list of Files
481 >Any empty fields should be enter as the string "NULL". </P
483 >Samba does not need to support the concept of Print Monitors
484 since these only apply to local printers whose driver can make
485 use of a bi-directional link for communication. This field should
486 be "NULL". On a remote NT print server, the Print Monitor for a
487 driver must already be installed prior to adding the driver or
488 else the RPC will fail. </P
494 >addprinter <printername>
495 <sharename> <drivername> <port></B
497 - Add a printer on the remote server. This printer
498 will be automatically shared. Be aware that the printer driver
499 must already be installed on the server (see <B
508 >must be a valid port name (see
520 specified printer driver for all architectures. This
521 does not delete the actual driver files from the server,
522 only the entry from the server's list of drivers.
531 printer setting data stored on the server. On Windows NT clients,
532 these values are stored in the registry, while Samba servers
533 store them in the printers TDB. This command corresponds
534 to the MS Platform SDK GetPrinterData() function (* This
535 command is currently unimplemented).</P
541 >enumjobs <printer></B
543 - List the jobs and status of a given printer.
544 This command corresponds to the MS Platform SDK EnumJobs()
545 function (* This command is currently unimplemented).</P
551 >enumports [level]</B
553 - Executes an EnumPorts() call using the specified
554 info level. Currently only info levels 1 and 2 are supported.
561 >enumdrivers [level]</B
563 - Execute an EnumPrinterDrivers() call. This lists the various installed
564 printer drivers for all architectures. Refer to the MS Platform SDK
565 documentation for more details of the various flags and calling
566 options. Currently supported info levels are 1, 2, and 3.</P
572 >enumprinters [level]</B
574 - Execute an EnumPrinters() call. This lists the various installed
575 and share printers. Refer to the MS Platform SDK documentation for
576 more details of the various flags and calling options. Currently
577 supported info levels are 0, 1, and 2.</P
583 >getdata <printername></B
585 - Retrieve the data for a given printer setting. See
589 > command for more information.
590 This command corresponds to the GetPrinterData() MS Platform
591 SDK function (* This command is currently unimplemented). </P
597 >getdriver <printername></B
599 - Retrieve the printer driver information (such as driver file,
600 config file, dependent files, etc...) for
601 the given printer. This command corresponds to the GetPrinterDriver()
602 MS Platform SDK function. Currently info level 1, 2, and 3 are supported.
609 >getdriverdir <arch></B
611 - Execute a GetPrinterDriverDirectory()
612 RPC to retrieve the SMB share name and subdirectory for
613 storing printer driver files for a given architecture. Possible
620 (for Windows 95/98), "Windows NT x86", "Windows NT PowerPC", "Windows
621 Alpha_AXP", and "Windows NT R4000". </P
627 >getprinter <printername></B
629 - Retrieve the current printer information. This command
630 corresponds to the GetPrinter() MS Platform SDK function.
637 >openprinter <printername></B
639 - Execute an OpenPrinterEx() and ClosePrinter() RPC
640 against a given printer. </P
646 >setdriver <printername>
647 <drivername></B
649 - Execute a SetPrinter() command to update the printer driver
650 associated with an installed printer. The printer driver must
651 already be correctly installed on the print server. </P
660 > commands for obtaining a list of
661 of installed printers and drivers.</P
681 debug level used to log information.</P
688 > - Print a listing of all
689 known commands or extended help on a particular command.
716 > is designed as a developer testing tool
717 and may not be robust in certain areas (such as command line parsing).
718 It has been known to generate a core dump upon failures when invalid
719 parameters where passed to the interpreter. </P
721 >From Luke Leighton's original rpcclient man page:</P
729 > The MSRPC over SMB code has
730 been developed from examining Network traces. No documentation is
731 available from the original creators (Microsoft) on how MSRPC over
732 SMB works, or how the individual MSRPC services work. Microsoft's
733 implementation of these services has been demonstrated (and reported)
734 to be... a bit flaky in places. </P
736 >The development of Samba's implementation is also a bit rough,
737 and as more of the services are understood, it can even result in
745 that are incompatible for some commands or services. Additionally,
746 the developers are sending reports to Microsoft, and problems found
747 or reported to Microsoft are fixed in Service Packs, which may
748 result in incompatibilities." </P
758 >This man page is correct for version 3.0 of the Samba
769 >The original Samba software and related utilities
770 were created by Andrew Tridgell. Samba is now developed
771 by the Samba Team as an Open Source project similar
772 to the way the Linux kernel is developed.</P
774 >The original rpcclient man page was written by Matthew
775 Geddes, Luke Kenneth Casson Leighton, and rewritten by Gerald Carter.
776 The conversion to DocBook for Samba 2.2 was done by Gerald