7 CONTENT=
"Modular DocBook HTML Stylesheet Version 1.57"></HEAD
27 >rpcclient
--
tool for executing client side
30 CLASS=
"REFSYNOPSISDIV"
40 > {server} [-A authfile] [-c
<command string
>] [-d debuglevel] [-h] [-l logfile] [-N] [-s
<smb config file
>] [-U username[%password]] [-W workgroup] [-N]
</P
50 >This tool is part of the
<A
59 > is a utility initially developed
60 to test MS-RPC functionality in Samba itself. It has undergone
61 several stages of development and stability. Many system administrators
62 have now written scripts around it to manage Windows NT clients from
63 their UNIX workstation.
</P
81 >NetBIOS name of Server to which to connect.
82 The server can be any SMB/CIFS server. The name is
84 HREF=
"smb.conf.5.html#NAMERESOLVEORDER"
89 >name resolve order
</I
103 you to specify a file from which to read the username and
104 password used in the connection. The format of the file is
114 CLASS=
"PROGRAMLISTING"
115 > username =
<value
>
116 password =
<value
>
117 domain =
<value
>
124 >Make certain that the permissions on the file restrict
125 access from unwanted users.
</P
128 >-c 'command string'
</DT
131 >execute semicolon separated commands (listed
138 >set the debuglevel. Debug level
0 is the lowest
139 and
100 being the highest. This should be set to
100 if you are
140 planning on submitting a bug report to the Samba team (see BUGS.txt).
147 >Print a summary of command line options.
154 >File name for log/debug files. .client will be
155 appended. The log file is never removed by the client.
166 for a password. By default,
<B
170 for a password. See also the
<TT
181 >Specifies the location of the all important
188 >-U username[%password]
</DT
191 >Sets the SMB username or username and password.
</P
193 >If %password is not specified, The user will be prompted. The
194 client will first check the
<TT
197 > environment variable, then the
201 > variable and if either exist, the
202 string is uppercased. If these environmental variables are not
203 found, the username
<TT
208 >A third option is to use a credentials file which
209 contains the plaintext of the username and password. This
210 option is mainly provided for scripts where the admin doesn't
211 desire to pass the credentials on the command line or via environment
212 variables. If this method is used, make certain that the permissions
213 on the file restrict access from unwanted users. See the
219 > for more details.
</P
221 >Be cautious about including passwords in scripts. Also, on
222 many systems the command line of a running process may be seen
226 > command. To be safe always allow
230 > to prompt for a password and type
237 >Set the SMB domain of the username. This
238 overrides the default domain which is the domain of the
239 server specified with the
<TT
245 If the domain specified is the same as the server's NetBIOS name,
246 it causes the client to log on using the server's local SAM (as
247 opposed to the Domain SAM).
</P
346 >adddriver
<arch
> <config
></B
348 - Execute an AddPrinterDriver() RPC to install the printer driver
349 information on the server. Note that the driver files should
350 already exist in the directory returned by
354 >. Possible values for
360 > are the same as those for
370 > parameter is defined as
380 CLASS=
"PROGRAMLISTING"
381 > Long Printer Name:\
386 Language Monitor Name:\
388 Comma Separated list of Files
395 >Any empty fields should be enter as the string
"NULL".
</P
397 >Samba does not need to support the concept of Print Monitors
398 since these only apply to local printers whose driver can make
399 use of a bi-directional link for communication. This field should
400 be
"NULL". On a remote NT print server, the Print Monitor for a
401 driver must already be installed prior to adding the driver or
402 else the RPC will fail.
</P
408 >addprinter
<printername
>
409 <sharename
> <drivername
> <port
></B
411 - Add a printer on the remote server. This printer
412 will be automatically shared. Be aware that the printer driver
413 must already be installed on the server (see
<B
422 >must be a valid port name (see
434 printer setting data stored on the server. On Windows NT clients,
435 these values are stored in the registry, while Samba servers
436 store them in the printers TDB. This command corresponds
437 to the MS Platform SDK GetPrinterData() function (* This
438 command is currently unimplemented).
</P
444 >enumjobs
<printer
></B
446 - List the jobs and status of a given printer.
447 This command corresponds to the MS Platform SDK EnumJobs()
448 function (* This command is currently unimplemented).
</P
454 >enumports [level]
</B
456 - Executes an EnumPorts() call using the specified
457 info level. Currently only info levels
1 and
2 are supported.
464 >enumdrivers [level]
</B
466 - Execute an EnumPrinterDrivers() call. This lists the various installed
467 printer drivers for all architectures. Refer to the MS Platform SDK
468 documentation for more details of the various flags and calling
469 options. Currently supported info levels are
1,
2, and
3.
</P
475 >enumprinters [level]
</B
477 - Execute an EnumPrinters() call. This lists the various installed
478 and share printers. Refer to the MS Platform SDK documentation for
479 more details of the various flags and calling options. Currently
480 supported info levels are
0,
1, and
2.
</P
486 >getdata
<printername
></B
488 - Retrieve the data for a given printer setting. See
492 > command for more information.
493 This command corresponds to the GetPrinterData() MS Platform
494 SDK function (* This command is currently unimplemented).
</P
500 >getdriver
<printername
></B
502 - Retrieve the printer driver information (such as driver file,
503 config file, dependent files, etc...) for
504 the given printer. This command corresponds to the GetPrinterDriver()
505 MS Platform SDK function. Currently info level
1,
2, and
3 are supported.
512 >getdriverdir
<arch
></B
514 - Execute a GetPrinterDriverDirectory()
515 RPC to retreive the SMB share name and subdirectory for
516 storing printer driver files for a given architecture. Possible
523 (for Windows
95/
98),
"Windows NT x86",
"Windows NT PowerPC",
"Windows
524 Alpha_AXP", and
"Windows NT R4000".
</P
530 >getprinter
<printername
></B
532 - Retrieve the current printer information. This command
533 corresponds to the GetPrinter() MS Platform SDK function.
540 >openprinter
<printername
></B
542 - Execute an OpenPrinterEx() and ClosePrinter() RPC
543 against a given printer.
</P
549 >setdriver
<printername
> <drivername
></B
551 - Execute a SetPrinter() command to update the printer driver associated
552 with an installed printer. The printer driver must already be correctly
553 installed on the print server.
</P
562 > commands for obtaining a list of
563 of installed printers and drivers.
</P
578 > - Set the current debug level
579 used to log information.
</P
586 > - Print a listing of all
587 known commands or extended help on a particular command.
614 > is designed as a developer testing tool
615 and may not be robust in certain areas (such as command line parsing).
616 It has been known to generate a core dump upon failures when invalid
617 parameters where passed to the interpreter.
</P
619 >From Luke Leighton's original rpcclient man page:
</P
623 > The MSRPC over SMB code has
624 been developed from examining Network traces. No documentation is
625 available from the original creators (Microsoft) on how MSRPC over
626 SMB works, or how the individual MSRPC services work. Microsoft's
627 implementation of these services has been demonstrated (and reported)
628 to be... a bit flakey in places. </P
630 >The development of Samba's implementation is also a bit rough,
631 and as more of the services are understood, it can even result in
639 that are incompatible for some commands or services. Additionally,
640 the developers are sending reports to Microsoft, and problems found
641 or reported to Microsoft are fixed in Service Packs, which may
642 result in incompatibilities." </P
652 >This man page is correct for version
2.2 of the Samba
663 >The original Samba software and related utilities
664 were created by Andrew Tridgell. Samba is now developed
665 by the Samba Team as an Open Source project similar
666 to the way the Linux kernel is developed.
</P
668 >The original rpcclient man page was written by Matthew
669 Geddes, Luke Kenneth Casson, and rewriten by Gerald Carter.
670 The conversion to DocBook for Samba
2.2 was done by Gerald