From f95fb5fe3941a0ef916ac85c6ccf4aecf17aaf39 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 19 Apr 2001 21:33:44 +0000 Subject: large sync up with 2.2 (This used to be commit 96523293da19df201703fed6130f1ff9ba25324b) --- docs/htmldocs/rpcclient.1.html | 590 ++++++++++++++++++++++------------------- 1 file changed, 315 insertions(+), 275 deletions(-) (limited to 'docs/htmldocs/rpcclient.1.html') diff --git a/docs/htmldocs/rpcclient.1.html b/docs/htmldocs/rpcclient.1.html index 95324065c2..0242f7b827 100644 --- a/docs/htmldocs/rpcclient.1.html +++ b/docs/htmldocs/rpcclient.1.html @@ -24,7 +24,7 @@ NAME="AEN5" >

Name

rpcclient -- developer's tool to testing client side +>rpcclient -- tool for executing client side MS-RPC functions

nmblookup [-d debuglevel] [-S server] [-U username] [-W workgroup] [-n <netbios name>] [-A authfile] [-N] [-l logfile] [-I destinationIP] [-E <terminal code>] [-c <command string>] [-i scope] [-O <socket options>] [-s <smb config file>]

rpcclient {server} [-A authfile] [-c <command string>] [-d debuglevel] [-h] [-l logfile] [-N] [-s <smb config file>] [-U username[%password]] [-W workgroup] [-N]

DESCRIPTION

rpcclient is a utility for developers for - executing various MS-RPC functions. It's primary use is for testing - Samba's own MS-RPC server implementation, however many administrators - have written scripts around it to manage Windows NT clients from +> is a utility initially developed + to test MS-RPC functionality in Samba itself. It has undergone + several stages of development and stability. Many system administrators + have now written scripts around it to manage Windows NT clients from their UNIX workstation.

OPTIONS

-d debuglevel

set the debuglevel. Debug level 0 is the lowest - and 100 being the highest. This should be set to 100 if you are - planning on submitting a bug report to the Samba team - (see BUGS.txt).

-S server
server

NetBIOS name of Server to which you wish to - connect. The server can be any SMB/CIFS server. The name is - resolved using either the NetBIOS name of Server to which to connect. + The server can be any SMB/CIFS server. The name is + resolved using the name resolve order - line or by using the -R option.

line from + smb.conf(5).

-l logbasename
-A filename

File name for log/debug files. .client will be - appended. The log file is never removed by the client. +>This option allows + you to specify a file from which to read the username and + password used in the connection. The format of the file is

		username = <value> 
+		password = <value>
+		domain   = <value>
+		

Make certain that the permissions on the file restrict + access from unwanted users.

-n netbios name
-c 'command string'

NetBIOS name of the - local machine. This option is only needed if your Samba client - cannot find it automatically. Samba should use the uppercase - of the machine's hostname.

execute semicolon separated commands (listed + below))

-N
-d debuglevel

tells rpcclient not to ask for a password. - rpcclient will prompt the user by default. +>set the debuglevel. Debug level 0 is the lowest + and 100 being the highest. This should be set to 100 if you are + planning on submitting a bug report to the Samba team (see BUGS.txt).

-I destinationIP
-h

The IP address of the server specified with - the -S option. Only needed when the server's NetBIOS name cannot - be resolved using WINS or broadcast and isn't found in the LMHOSTS - file.

Print a summary of command line options. +

-E
-l logbasename

causes rpcclient to write - messages to stderr instead of stdout.

File name for log/debug files. .client will be + appended. The log file is never removed by the client. +

-U username[%pass]
-N

Sets the SMB username or username and password. - If %pass is not specified, The user will be prompted. The client - will first check the USER environment variable, then the - instruct rpcclient not to ask + for a password. By default, rpcclient will prompt + for a password. See also the $LOGNAME-U option.

-s smb.conf

Specifies the location of the all important + smb.conf file.

-U username[%password]

Sets the SMB username or username and password.

If %password is not specified, The user will be prompted. The + client will first check the USER environment variable, then the + LOGNAME variable and if either exist, the - string is uppercased. Anything in these variables following a '%' - sign will be treated as the password. If these environmental - variables are not found, the username GUEST - is used.

If the password is not included in these environment - variables (using the %pass syntax), rpcclient will look for - a $PASSWD environment variable from which - to read the password.

is used.

A third option is to use a credentials file which contains the plaintext of the username and password. This @@ -188,18 +209,12 @@ CLASS="PARAMETER" > for more details.

Be cautious about including passwords in scripts or in - the $PASSWD environment variable. Also, on +>Be cautious about including passwords in scripts. Also, on many systems the command line of a running process may be seen via the ps command to be safe always allow +> command. To be safe always allow rpcclient

-A filename

This option allows - you to specify a file from which to read the username and - password used in the connection. The format of the file is -

username = <value> 
-password = <value>
-		

Make certain that the permissions on the file restrict - access from unwanted users.

-W domain

-P

operate in promptless mode. Without this - mode (the default) rpcclient displays a - prompt of the form '[domain\username@host]$'

-c 'command string'

execute semicolon separated commands (listed - below))

-t terminalcode

This tells the Samba client how to interpret - the incoming filenames, in regards to character sets. The list - here is not complete. For a complete list see your local Samba - source. Some valid options are sjis, euc, jis7, jis8, junet - and hex.

-O socket options

These socket options are the same as in - smb.conf (under the socket options - section).

-s smb.conf

Specifies the location of the all important - smb.conf file.

-i scope

Defines the NetBIOS scope. For more - information on NetBIOS scopes, see rfc1001 and rfc1002. NetBIOS - scopes are rarely used.

COMMANDS

SPOOLSS CommandsLSARPC

spoolenum - Execute an EnumPrinters() - call. This lists the various installed and share printers. Refer - to the MS Platform SDK documentation for more details of the various - flags and calling options.

lsaquery

  • spoolenumports level - - Executes an EnumPorts() call using the specified - info level. Currently only info level 1 and 2 are supported. -

    lookupsids

  • spoolenumdata - Enumerate all - printer setting data stored on the server. On Windows NT clients, - these values are stored in the registry, while Samba servers - store them in the printers TDB. This command corresponds - to the MS Platform SDK GetPrinterData() function.

    lookupnames

  • spooljobs printer - List the jobs - and status of a given printer. - This command corresponds to the MS Platform SDK EnumJobs() - function.

    enumtrusts

  • SAMR

    • spoolopen printer - - Execute an OpenPrinterEx() and ClosePrinter() RPC - against a given printer.

      queryuser

    • spoolgetdata printer - - Retrieve the data for a given printer setting. See - the spoolenumdata command for more information. - This command corresponds to the GetPrinterData() MS Platform - SDK function.

      querygroup

    • spoolgetprinter printer - - Retrieve the current printer information. This command - corresponds to the GetPrinter() MS Platform SDK function. -

      queryusergroups

    • spoolgetprinterdriver - printer - Retrieve the printer driver information - (such as driver file, config file, dependent files, etc...) for - the given printer. This command corresponds to the GetPrinterDriver() - MS Platform SDK function.

      querygroupmem

    spoolgetprinterdriverdir - arch - Execute a GetPrinterDriverDirectory() - RPC to retreive the SMB share name and subdirectory for - storing printer driver files for a given architecture. Possible - values for arch are "Windows 4.0" - (for Windows 95/98), "Windows NT x86", "Windows NT PowerPC", "Windows - Alpha_AXP", and "Windows NT R4000".

    SPOOLSS

    • spooladdprinterdriver - arch config - Execute an - AddPrinterDriver() RPC to install the printer driver information - on the server. Note that the driver files should already exist - in the directory returned by spoolgetprinterdriverdir. Possible - values for adddriver <arch> <config> + - Execute an AddPrinterDriver() RPC to install the printer driver + information on the server. Note that the driver files should + already exist in the directory returned by + getdriverdir. Possible values for + arch are the same as those for the spooolgetprintedriverdirgetdriverdir command. The

      Long Printer Name:\
      -Driver File Name:\
      -Data File Name:\
      -Config File Name:\
      -Help File Name:\
      -Language Monitor Name:\
      -Default Data Type:\
      -Comma Separated list of Files
      +>		Long Printer Name:\
      +		Driver File Name:\
      +		Data File Name:\
      +		Config File Name:\
      +		Help File Name:\
      +		Language Monitor Name:\
      +		Default Data Type:\
      +		Comma Separated list of Files
       		

      spooladdprinter printername - sharename drivername port - - Add a printer on the remote server. This printer +>addprinter <printername> + <sharename> <drivername> <port> + - Add a printer on the remote server. This printer will be automatically shared. Be aware that the printer driver - must already be installed on the server (see addprinterdriver) + must already be installed on the server (see adddriver) and the portmust be a valid port name.

      must be a valid port name (see + enumports.

  • enumdata - Enumerate all + printer setting data stored on the server. On Windows NT clients, + these values are stored in the registry, while Samba servers + store them in the printers TDB. This command corresponds + to the MS Platform SDK GetPrinterData() function (* This + command is currently unimplemented).

  • enumjobs <printer> + - List the jobs and status of a given printer. + This command corresponds to the MS Platform SDK EnumJobs() + function (* This command is currently unimplemented).

  • enumports [level] + - Executes an EnumPorts() call using the specified + info level. Currently only info levels 1 and 2 are supported. +

  • enumdrivers [level] + - Execute an EnumPrinterDrivers() call. This lists the various installed + printer drivers for all architectures. Refer to the MS Platform SDK + documentation for more details of the various flags and calling + options. Currently supported info levels are 1, 2, and 3.

  • enumprinters [level] + - Execute an EnumPrinters() call. This lists the various installed + and share printers. Refer to the MS Platform SDK documentation for + more details of the various flags and calling options. Currently + supported info levels are 0, 1, and 2.

  • getdata <printername> + - Retrieve the data for a given printer setting. See + the enumdata command for more information. + This command corresponds to the GetPrinterData() MS Platform + SDK function (* This command is currently unimplemented).

  • getdriver <printername> + - Retrieve the printer driver information (such as driver file, + config file, dependent files, etc...) for + the given printer. This command corresponds to the GetPrinterDriver() + MS Platform SDK function. Currently info level 1, 2, and 3 are supported. +

  • getdriverdir <arch> + - Execute a GetPrinterDriverDirectory() + RPC to retreive the SMB share name and subdirectory for + storing printer driver files for a given architecture. Possible + values for General Commands

    arch are "Windows 4.0" + (for Windows 95/98), "Windows NT x86", "Windows NT PowerPC", "Windows + Alpha_AXP", and "Windows NT R4000".

    • getprinter <printername> + - Retrieve the current printer information. This command + corresponds to the GetPrinter() MS Platform SDK function. +

    • set - Set miscellaneous +>openprinter <printername> + - Execute an OpenPrinterEx() and ClosePrinter() RPC + against a given printer.

    • setdriver <printername> <drivername> + - Execute a SetPrinter() command to update the printer driver associated + with an installed printer. The printer driver must already be correctly + installed on the print server.

      See also the enumprinters and rpcclient command line options during a - running session.

      enumdrivers commands for obtaining a list of + of installed printers and drivers.

    GENERAL OPTIONS

    • use - Connect to a rmeote SMB - server. rpcclient has the ability to - maintain connections to multiple server simulaneously.

      debuglevel - Set the current debug level + used to log information.

    • helphelp (?) - Print a listing of all known commands or extended help on a particular command.

      quitquit (exit) - Exit rpcclient -

      .

  • BUGS

    smbd(8) and rpcclientrpcclient(1) that are incompatible for some commands or services. Additionally, the developers are sending reports to Microsoft, and problems found @@ -592,18 +631,18 @@ CLASS="COMMAND" >

    VERSION

    This man page is correct for version 2.2 of - the Samba suite.

    This man page is correct for version 2.2 of the Samba + suite.

    AUTHOR

    The original rpcclient man page was written by Matthew Geddes, - Luke Kenneth Casson, and Gerald Carter. The conversion to - DocBook for Samba 2.2 was done by Gerald Carter

    The original rpcclient man page was written by Matthew + Geddes, Luke Kenneth Casson, and rewriten by Gerald Carter. + The conversion to DocBook for Samba 2.2 was done by Gerald + Carter.