Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Linux Magazine: The source for advanced Linux know-how

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Surveys

Features
HOWTOs
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 128 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  

rpcclient




SYNOPSIS

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


DESCRIPTION

       This tool is part of the  Samba suite.

       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 adminis­
       trators have now written scripts around it to manage  Win­
       dows NT clients from their UNIX workstation.


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 filename
              This option allows you to specify a file from which
              to  read the username and password used in the con­
              nection. 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).

       -h     Print a summary of command line options.

       -l logbasename
              File   name  for  log/debug  files.  The  extension
              '.client' will be appended. The log file  is  never
              prompted.  The  client  will  first  check the USER
              environment variable, then the LOGNAME variable and
              if  either  exists,  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  pass­
              word.  This  option  is mainly provided for scripts
              where the admin doesn't desire to pass the  creden­
              tials  on the command line or via environment vari­
              ables. If this method is used,  make  certain  that
              the  permissions  on  the file restrict access from
              unwanted users. See the -A for more details.

              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 rpcclient to prompt for a password and
              type it in directly.

       -W domain
              Set the SMB domain of the username. This  overrides
              the  default  domain which is the domain defined in
              smb.conf. If the domain specified is  the  same  as
              the  server's NetBIOS name, it causes the client to
              log on using the server's local SAM (as opposed  to
              the Domain SAM).


COMMANDS

       LSARPC

       · lsaquery

       · lookupsids - Resolve a list of SIDs to usernames.

       · lookupnames - Resolve s list of usernames to SIDs.

       · enumtrusts

       SAMR

       · queryuser

       · querygroup

       · queryusergroups

       · querygroupmem
       · adddriver  <arch>  <config>  -  Execute  an  AddPrinter­
         Driver() RPC to install the printer  driver  information
         on the server. Note that the driver files should already
         exist in the directory returned by getdriverdir.  Possi­
         ble  values  for arch are the same as those for the get­
         driverdir 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

         Any empty fields should be enter as the string "NULL".

         Samba does not need to support the concept of Print Mon­
         itors since these only apply  to  local  printers  whose
         driver  can make use of a bi-directional link for commu­
         nication. This field should 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.

       · 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
         adddriver)  and  the  portmust be a valid port name (see
         enumports.

       · deldriver - Delete the specified printer driver for  all
         architectures.  This  does  not delete the actual driver
         files from the server, only the entry from the  server's
         list of drivers.

       · 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
         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. Cur­
         rently 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  GetPrint­
         erData()  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  cor­
         responds to the GetPrinterDriver() MS Platform SDK func­
         tion. Currently info level 1, 2, and 3 are supported.

       · getdriverdir <arch> - Execute  a  GetPrinterDriverDirec­
         tory()  RPC to retreive the SMB share name and subdirec­
         tory for storing printer driver files for a given archi­
         tecture. 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   Get­
         Printer() MS Platform SDK function.

       · openprinter  <printername>  - Execute an OpenPrinterEx()
         and ClosePrinter() RPC against a given printer.

       · setdriver <printername> <drivername> -  Execute  a  Set­
         Printer()  command  to update the printer driver associ­
         ated 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 OPTIONS

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

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

       · quit (exit) - Exit rpcclient .


BUGS

       rpcclient is designed as a developer testing tool and  may

       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(1)  that
       are  incompatible for some commands or services. Addition­
       ally, the developers are sending reports to Microsoft, and
       problems  found or reported to Microsoft are fixed in Ser­
       vice Packs, which may result in incompatibilities."


VERSION

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


AUTHOR

       The  original  Samba  software  and related utilities were
       created by Andrew Tridgell. Samba is now developed 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  Leighton, and rewritten by
       Gerald Carter.  The conversion to DocBook  for  Samba  2.2
       was done by Gerald Carter.

                         19 November 2002            RPCCLIENT(1)
  
Help us cut cost by not downloading the whole site!
Use of automated download sofware ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and therefore is expressedly prohibited. For more details on this, take a look here

Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
The Linux Tutorial welcomes your suggestions and ideas.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.09 Seconds