1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></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 <SPAN
62 > is a utility initially developed
63 to test MS-RPC functionality in Samba itself. It has undergone
64 several stages of development and stability. Many system administrators
65 have now written scripts around it to manage Windows NT clients from
66 their UNIX workstation. </P
84 >NetBIOS name of Server to which to connect.
85 The server can be any SMB/CIFS server. The name is
87 HREF="smb.conf.5.html#NAMERESOLVEORDER"
91 >name resolve order</VAR
102 >-A|--authfile=filename</DT
106 you to specify a file from which to read the username and
107 password used in the connection. The format of the file is
111 CLASS="PROGRAMLISTING"
112 >username = <value>
113 password = <value>
114 domain = <value></PRE
117 >Make certain that the permissions on the file restrict
118 access from unwanted users. </P
121 >-c|--command='command string'</DT
124 >execute semicolon separated commands (listed
131 >Print a summary of command line options.</P
134 >-d|--debug=debuglevel</DT
141 from 0 to 10. The default value if this parameter is
142 not specified is zero.</P
144 >The higher this value, the more detail will be
145 logged to the log files about the activities of the
146 server. At level 0, only critical errors and serious
147 warnings will be logged. Level 1 is a reasonable level for
148 day to day running - it generates a small amount of
149 information about operations carried out.</P
151 >Levels above 1 will generate considerable
152 amounts of log data, and should only be used when
153 investigating a problem. Levels above 3 are designed for
154 use only by developers and generate HUGE amounts of log
155 data, most of which is extremely cryptic.</P
157 >Note that specifying this parameter here will
159 HREF="smb.conf.5.html#loglevel"
163 > parameter in the <A
164 HREF="smb.conf.5.html"
179 > is the address of the server to connect to.
180 It should be specified in standard "a.b.c.d" notation. </P
182 >Normally the client would attempt to locate a named
183 SMB/CIFS server by looking it up via the NetBIOS name resolution
184 mechanism described above in the <VAR
186 >name resolve order</VAR
188 parameter above. Using this parameter will force the client
189 to assume that the server is on the machine with the specified IP
190 address and the NetBIOS name component of the resource being
191 connected to will be ignored. </P
193 >There is no default for this parameter. If not supplied,
194 it will be determined automatically by the client as described
198 >-l|--logfile=logbasename</DT
201 >File name for log/debug files. The extension
205 > will be appended. The log file is
206 never removed by the client.
217 for a password. By default, <B
221 prompt for a password. See also the <VAR
228 >-s|--conf=smb.conf</DT
231 >Specifies the location of the all-important
238 >-U|--user=username[%password]</DT
241 >Sets the SMB username or username and password. </P
243 >If %password is not specified, the user will be prompted. The
244 client will first check the <VAR
247 > environment variable, then the
251 > variable and if either exists, the
252 string is uppercased. If these environmental variables are not
253 found, the username <CODE
258 >A third option is to use a credentials file which
259 contains the plaintext of the username and password. This
260 option is mainly provided for scripts where the admin does not
261 wish to pass the credentials on the command line or via environment
262 variables. If this method is used, make certain that the permissions
263 on the file restrict access from unwanted users. See the
267 > for more details. </P
269 >Be cautious about including passwords in scripts. Also, on
270 many systems the command line of a running process may be seen
274 > command. To be safe always allow
278 > to prompt for a password and type
282 >-W|--workgroup=domain</DT
285 >Set the SMB domain of the username. This
286 overrides the default domain which is the domain defined in
287 smb.conf. If the domain specified is the same as the server's NetBIOS name,
288 it causes the client to log on using the server's local SAM (as
289 opposed to the Domain SAM). </P
325 of SIDs to usernames.
334 of usernames to SIDs.
432 >adddriver <arch> <config></B
434 - Execute an AddPrinterDriver() RPC to install the printer driver
435 information on the server. Note that the driver files should
436 already exist in the directory returned by
440 >. Possible values for
444 > are the same as those for
452 > parameter is defined as
456 CLASS="PROGRAMLISTING"
462 Language Monitor Name:\
464 Comma Separated list of Files</PRE
467 >Any empty fields should be enter as the string "NULL". </P
469 >Samba does not need to support the concept of Print Monitors
470 since these only apply to local printers whose driver can make
471 use of a bi-directional link for communication. This field should
472 be "NULL". On a remote NT print server, the Print Monitor for a
473 driver must already be installed prior to adding the driver or
474 else the RPC will fail. </P
480 >addprinter <printername>
481 <sharename> <drivername> <port></B
483 - Add a printer on the remote server. This printer
484 will be automatically shared. Be aware that the printer driver
485 must already be installed on the server (see <B
492 >must be a valid port name (see
504 specified printer driver for all architectures. This
505 does not delete the actual driver files from the server,
506 only the entry from the server's list of drivers.
515 printer setting data stored on the server. On Windows NT clients,
516 these values are stored in the registry, while Samba servers
517 store them in the printers TDB. This command corresponds
518 to the MS Platform SDK GetPrinterData() function (* This
519 command is currently unimplemented).</P
525 >enumjobs <printer></B
527 - List the jobs and status of a given printer.
528 This command corresponds to the MS Platform SDK EnumJobs()
529 function (* This command is currently unimplemented).</P
535 >enumports [level]</B
537 - Executes an EnumPorts() call using the specified
538 info level. Currently only info levels 1 and 2 are supported.
545 >enumdrivers [level]</B
547 - Execute an EnumPrinterDrivers() call. This lists the various installed
548 printer drivers for all architectures. Refer to the MS Platform SDK
549 documentation for more details of the various flags and calling
550 options. Currently supported info levels are 1, 2, and 3.</P
556 >enumprinters [level]</B
558 - Execute an EnumPrinters() call. This lists the various installed
559 and share printers. Refer to the MS Platform SDK documentation for
560 more details of the various flags and calling options. Currently
561 supported info levels are 0, 1, and 2.</P
567 >getdata <printername></B
569 - Retrieve the data for a given printer setting. See
573 > command for more information.
574 This command corresponds to the GetPrinterData() MS Platform
575 SDK function (* This command is currently unimplemented). </P
581 >getdriver <printername></B
583 - Retrieve the printer driver information (such as driver file,
584 config file, dependent files, etc...) for
585 the given printer. This command corresponds to the GetPrinterDriver()
586 MS Platform SDK function. Currently info level 1, 2, and 3 are supported.
593 >getdriverdir <arch></B
595 - Execute a GetPrinterDriverDirectory()
596 RPC to retrieve the SMB share name and subdirectory for
597 storing printer driver files for a given architecture. Possible
602 (for Windows 95/98), "Windows NT x86", "Windows NT PowerPC", "Windows
603 Alpha_AXP", and "Windows NT R4000". </P
609 >getprinter <printername></B
611 - Retrieve the current printer information. This command
612 corresponds to the GetPrinter() MS Platform SDK function.
619 >openprinter <printername></B
621 - Execute an OpenPrinterEx() and ClosePrinter() RPC
622 against a given printer. </P
628 >setdriver <printername>
629 <drivername></B
631 - Execute a SetPrinter() command to update the printer driver
632 associated with an installed printer. The printer driver must
633 already be correctly installed on the print server. </P
642 > commands for obtaining a list of
643 of installed printers and drivers.</P
663 debug level used to log information.</P
670 > - Print a listing of all
671 known commands or extended help on a particular command.
698 > is designed as a developer testing tool
699 and may not be robust in certain areas (such as command line parsing).
700 It has been known to generate a core dump upon failures when invalid
701 parameters where passed to the interpreter. </P
703 >From Luke Leighton's original rpcclient man page:</P
711 > The MSRPC over SMB code has
712 been developed from examining Network traces. No documentation is
713 available from the original creators (Microsoft) on how MSRPC over
714 SMB works, or how the individual MSRPC services work. Microsoft's
715 implementation of these services has been demonstrated (and reported)
716 to be... a bit flaky in places. </P
718 >The development of Samba's implementation is also a bit rough,
719 and as more of the services are understood, it can even result in
723 CLASS="REFENTRYTITLE"
729 CLASS="REFENTRYTITLE"
732 > that are incompatible for some commands or services. Additionally,
733 the developers are sending reports to Microsoft, and problems found
734 or reported to Microsoft are fixed in Service Packs, which may
735 result in incompatibilities.</P
745 >This man page is correct for version 3.0 of the Samba
756 >The original Samba software and related utilities
757 were created by Andrew Tridgell. Samba is now developed
758 by the Samba Team as an Open Source project similar
759 to the way the Linux kernel is developed.</P
761 >The original rpcclient man page was written by Matthew
762 Geddes, Luke Kenneth Casson Leighton, and rewritten by Gerald Carter.
763 The conversion to DocBook for Samba 2.2 was done by Gerald
764 Carter. The conversion to DocBook XML 4.2 for Samba 3.0 was
765 done by Alexander Bokovoy.</P