From 8939efc8c700b46f53e336ef126c02e244c7f448 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 19 Apr 2001 21:41:48 +0000 Subject: merge from 2.2 (This used to be commit 6270765ed5d4e94d34af6d512f17f403b9624699) --- docs/docbook/manpages/rpcclient.1.sgml | 443 +++++++++++++++++---------------- 1 file changed, 227 insertions(+), 216 deletions(-) (limited to 'docs/docbook/manpages/rpcclient.1.sgml') diff --git a/docs/docbook/manpages/rpcclient.1.sgml b/docs/docbook/manpages/rpcclient.1.sgml index f45c4e8bb1..c02f935d82 100644 --- a/docs/docbook/manpages/rpcclient.1.sgml +++ b/docs/docbook/manpages/rpcclient.1.sgml @@ -9,27 +9,24 @@ rpcclient - developer's tool to testing client side + tool for executing client side MS-RPC functions - nmblookup - -d debuglevel - -S server - -U username - -W workgroup - -n <netbios name> + rpcclient + server -A authfile - -N - -l logfile - -I destinationIP - -E <terminal code> -c <command string> - -i scope - -O <socket options> + -d debuglevel + -h + -l logfile + -N -s <smb config file> + -U username[%password] + -W workgroup + -N @@ -39,10 +36,10 @@ This tool is part of the Samba suite. - 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 + rpcclient 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. @@ -51,23 +48,62 @@ OPTIONS + + server + 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 from + smb.conf(5). + + + + + -A filenameThis 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. + + + + + + -c 'command string' + execute semicolon separated commands (listed + below)) + + + + + -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). + planning on submitting a bug report to the Samba team (see BUGS.txt). + - + + + - -S 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 name resolve order - line or by using the -R option. + -h + Print a summary of command line options. + - + + + -l logbasename @@ -77,53 +113,33 @@ - - -n netbios nameNetBIOS 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. - -N - tells rpcclient not to ask for a password. - rpcclient will prompt the user by default. - + instruct rpcclient not to ask + for a password. By default, rpcclient will prompt + for a password. See also the -U option. - + - -I destinationIP - 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. + -s smb.conf + Specifies the location of the all important + smb.conf file. + - -E - causes rpcclient to write - messages to stderr instead of stdout. - - - - - -U username[%pass] - 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 - $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. + -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. If these environmental variables are not + found, the username GUEST is used. + A third option is to use a credentials file which contains the plaintext of the username and password. This option is mainly provided for scripts where the admin doesn't @@ -132,30 +148,14 @@ on the file restrict access from unwanted users. See the -A 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 + via the ps command. To be safe always allow rpcclient to prompt for a password and type it in directly. - - -A filenameThis 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. - @@ -168,55 +168,7 @@ password = <value> opposed to the Domain SAM). - - - -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. - + @@ -224,78 +176,50 @@ password = <value> COMMANDS - SPOOLSS Commands + LSARPC + + lsaquery + lookupsids + lookupnames + enumtrusts + + + + + SAMR - 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. - - spoolenumports level - - Executes an EnumPorts() call using the specified - info level. Currently only info level 1 and 2 are supported. - + queryuser + querygroup + queryusergroups + querygroupmem + + - 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. - spooljobs printer - List the jobs - and status of a given printer. - This command corresponds to the MS Platform SDK EnumJobs() - function. - - spoolopen printer - - Execute an OpenPrinterEx() and ClosePrinter() RPC - against a given printer. - - 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. - - spoolgetprinter printer - - Retrieve the current printer information. This command - corresponds to the GetPrinter() MS Platform SDK function. - - - 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. - - 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". - - 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 arch are the same as those for - the spooolgetprintedriverdir command. + + SPOOLSS + + + 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 getdriverdir command. The config parameter is defined as follows: -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 Any empty fields should be enter as the string "NULL". @@ -306,37 +230,123 @@ Comma Separated list of Files be "NULL". On a remote NT print server, the Print Monitor for a driver must already be installed prior to adding the driver or else the RPC will fail. + + - 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) - and the portmust be a valid port name. + must already be installed on the server (see adddriver) + and the portmust 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 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. + + + + + 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 + enumdrivers commands for obtaining a list of + of installed printers and drivers. + - General Commands + GENERAL OPTIONS - set - Set miscellaneous - rpcclient command line options during a - running session. - - 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. - help - Print a listing of all + help (?) - Print a listing of all known commands or extended help on a particular command. - quit - Exit rpcclient - - + quit (exit) - Exit rpcclient + . @@ -361,7 +371,7 @@ Comma Separated list of Files The development of Samba's implementation is also a bit rough, and as more of the services are understood, it can even result in - versions of smbd(8) and rpcclient + versions of smbd(8) and rpcclient(1) that are incompatible for some commands or services. Additionally, the developers are sending reports to Microsoft, and problems found or reported to Microsoft are fixed in Service Packs, which may @@ -372,8 +382,8 @@ Comma Separated list of Files 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. @@ -384,9 +394,10 @@ Comma Separated list of Files by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. - 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. -- cgit