RPCCLIENT(1)
π rpcclient β the manual, but make it make sense
Okay bestie, gather round, because we're reading rpcclient(1) from the User Commands section of the manual and it's honestly giving main character energy. This is part 1 of 4, so hydrate and stay with me. π«Ά
β¨ NAME β¨
rpcclient β the tool for executing client-side MS-RPC functions. That's it, that's the whole vibe. π
π¦ SYNOPSIS π¦
rpcclient [-c|--command=COMMANDS] [-I|--dest-ip=IP] [-p|--port=PORT]
[-?|--help] [--usage] [-d|--debuglevel=DEBUGLEVEL] [--debug-stdout]
[--configfile=CONFIGFILE] [--option=name=value]
[-l|--log-basename=LOGFILEBASE] [--leak-report] [--leak-report-full]
[-R|--name-resolve=NAME-RESOLVE-ORDER]
[-O|--socket-options=SOCKETOPTIONS] [-m|--max-protocol=MAXPROTOCOL]
[-n|--netbiosname=NETBIOSNAME] [--netbios-scope=SCOPE]
[-W|--workgroup=WORKGROUP] [--realm=REALM]
[-U|--user=[DOMAIN/]USERNAME[%PASSWORD]] [-N|--no-pass]
[--password=STRING] [--pw-nt-hash] [-A|--authentication-file=FILE]
[-P|--machine-pass] [--simple-bind-dn=DN]
[--use-kerberos=desired|required|off] [--use-krb5-ccache=CCACHE]
[--use-winbind-ccache] [--client-protection=sign|encrypt|off]
[-V|--version] {BINDING-STRING|HOST}
Look at all those flags, she's serving range. π
πΈ DESCRIPTION πΈ
So, first thing's first: this tool is part of the samba(7) suite. Family reunion energy. π
Now the lore: rpcclient started out as a little utility to test MS-RPC functionality inside Samba itself. Then it went through several stages of development and stability β glow-up after glow-up, we love to see it. β¨
And now? Many system administrators have written scripts around it to manage Windows NT clients from their UNIX workstation. Not a phase, it's a lifestyle. Periodt.
π OPTIONS π
Okay buckle up, this is the long part. Every single one of these matters, no skipping, I will know. π
BINDING-STRING|HOSTβ When you're connecting to a dcerpc service you need to specify a binding string. Non-negotiable, bestie.
The format is:
TRANSPORT:host[options]
where TRANSPORT is either ncacn_np (named pipes) for SMB, or ncacn_ip_tcp for DCERPC over TCP/IP.
"host" is an IP or hostname or netbios name. If the binding string identifies the server side of an endpoint, "host" may be an empty string. See below for more details β yes, there's more, keep scrolling.
"options" can include a SMB pipe name if you're using the ncacn_np transport, or a TCP port number if you're using the ncacn_ip_tcp transport. Otherwise they will be auto-determined for you. The tool's got you. π«Ά
Examples β copy these exactly, they're iconic:
ncacn_ip_tcp:samba.example.com[1024]ncacn_ip_tcp:samba.example.com[sign,seal,krb5]ncacn_ip_tcp:samba.example.com[sign,spnego]ncacn_np:samba.example.comncacn_np:samba.example.com[samr]ncacn_np:samba.example.com[samr,sign,print]ncalrpc:/path/to/unix/socket//SAMBA
The supported transports are:
ncacn_npβ Connect using named pipesncacn_ip_tcpβ Connect over TCP/IPncalrpcβ Connect over local RPC (unix sockets)
The supported options are:
signβ Use RPC integrity authentication levelsealβ Enable RPC privacy (encryption) authentication levelconnectβ Use RPC connect level authentication (auth, but no sign or seal)packetβ Use RPC packet authentication levelspnegoβ Use SPNEGO instead of NTLMSSP authenticationntlmβ Use plain NTLM instead of SPNEGO or NTLMSSPkrb5β Use Kerberos instead of NTLMSSP authenticationschannelβ Create a schannel connectionsmb1β Use SMB1 for named pipessmb2β Use SMB2/3 for named pipesvalidateβ Enable the NDR validatorprintβ Enable debug output of packetspadcheckβ Check reply data for non-zero pad bytesbigendianβ Use big endian for RPCndr64β Use NDR64 for RPC
-c|--command=<command string>β Execute semicolon separated commands (they're listed below, further down the page, patience bestie). π₯-I|--dest-ip IP-addressβIP-addressis the address of the server to connect to. Write it in standard "a.b.c.d" notation, no creative formatting please.
Normally the client would try to locate a named SMB/CIFS server by looking it up via the NetBIOS name resolution mechanism described above in the name resolve order parameter. Using this parameter forces the client to assume that the server is on the machine with the specified IP address, and the NetBIOS name component of the resource being connected to will be ignored. Just straight-up ignored, she doesn't even look. π
There is no default for this parameter. If you don't supply it, it gets determined automatically by the client as described above.
-p|--port portβ This number is the TCP port number used when making connections to the server. The standard (well-known) TCP port number for an SMB/CIFS server is139, which is the default. Classic, timeless, never misses. π-?|--helpβ Print a summary of command line options. When in doubt, ask for help, it's self care. π--usageβ Display brief usage message. The short version. The trailer. The teaser. π¦-d|--debuglevel=levelβlevelis an integer from0to10. The default value if this parameter is not specified is1for client applications.
The higher this value, the more detail will be logged to the log files about the activities of the server. At level 0, only critical errors and serious warnings will be logged. Level 1 is a reasonable level for day-to-day running β it generates a small amount of information about operations carried out. Chill, manageable, we love her. π
Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic. Like, do not. I'm serious. π
Note that specifying this parameter here will override the log level parameter in the /etc/samba/smb.conf file.
--debug-stdoutβ This will redirect debug output toSTDOUT. By default all clients are logging toSTDERR. Surprise relocation, but make it intentional. β¨--configfile=<configuration file>β The file specified contains the configuration details required by the client. The information in this file can be general for client and server, or it can only provide client specific stuff like options such as client smb encrypt. See/etc/samba/smb.conffor more information. The default configuration file name is determined at compile time β so it was decided for you before you were even born, lowkey. πΈ--option=<name>=<value>β Set thesmb.conf(5)option "<name>" to value "<value>" from the command line. This overrides compiled-in defaults and options read from the configuration file. It's giving "I said what I said". π
If a name or a value includes a space, wrap whole --option=name=value into quotes.
-l|--log-basename=logdirectoryβ Base directory name for log/debug files. The extension ".progname" will be appended (e.g.log.smbclient,log.smbd, etc...). The log file is never removed by the client. It simply refuses to let go. π--leak-reportβ Enable talloc leak reporting on exit. Snitching on memory, but for your own good. π΅οΈ--leak-report-fullβ Enable full talloc leak reporting on exit. The director's cut. The extended edition. π₯-V|--versionβ Prints the program version number. Short, sweet, iconic. β-R|--name-resolve=NAME-RESOLVE-ORDERβ This option determines what naming services get used, and in what order, to resolve host names to IP addresses. The option takes a space-separated string of different name resolution options. Best practice: wrap the whole--name-resolve=NAME-RESOLVE-ORDERinto quotes. π«Ά
The options are: "lmhosts", "host", "wins" and "bcast". They cause names to be resolved as follows:
lmhosts: Lookup an IP address in the Samba lmhosts file. If the line in lmhosts has no name type attached to the NetBIOS name (see thelmhosts(5)for details) then any name type matches for lookup.host: Do a standard host name to IP address resolution, using the system/etc/hosts, NIS, or DNS lookups. This method of name resolution is operating system dependent β for instance on IRIX or Solaris this may be controlled by the/etc/nsswitch.conffile). Note that this method is only used if the NetBIOS name type being queried is the0x20(server) name type, otherwise it is ignored. Picky, but valid. πwins: Query a name with the IP address listed in the wins server parameter. If no WINS server has been specified this method will be ignored.bcast: Do a broadcast on each of the known local interfaces listed in the interfaces parameter. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet. Risky business, ngl.
If this parameter is not set then the name resolve order defined in the /etc/samba/smb.conf file parameter (name resolve order) will be used.
The default order is lmhosts, host, wins, bcast. Without this parameter, or any entry in the name resolve order parameter of the /etc/samba/smb.conf file, the name resolution methods will be attempted in this order. That's the canon order, don't fight it. π
-O|--socket-options=SOCKETOPTIONSβ TCP socket options to set on the client socket. See the socket options parameter in the/etc/samba/smb.confmanual page for the list of valid options. Go read the other manual, she's got the full list. π-m|--max-protocol=MAXPROTOCOLβ The value of the parameter (a string) is the highest protocol level that will be supported by the client. Set the ceiling, bestie. π
Note that specifying this parameter here will override the client max protocol parameter in the /etc/samba/smb.conf file.
-n|--netbiosname=NETBIOSNAMEβ This option lets you override the NetBIOS name that Samba uses for itself. This is identical to setting the netbios name parameter in the/etc/samba/smb.conffile. However, a command line setting will take precedence over settings in/etc/samba/smb.conf. Command line wins, always, no cap. π--netbios-scope=SCOPEβ This specifies a NetBIOS scope thatnmblookupwill use to communicate with when generating NetBIOS names. For details on the use of NetBIOS scopes, seerfc1001.txtandrfc1002.txt. NetBIOS scopes are very rarely used β only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with. That's a lot of responsibility, are you sure? π-W|--workgroup=WORKGROUPβ Set the SMB domain of the username. This overrides the default domain which is the domain defined insmb.conf. If the domain specified is the same as the servers NetBIOS name, it causes the client to log on using the servers local SAM (as opposed to the Domain SAM). Plot twist, but a useful one. β¨
Note that specifying this parameter here will override the workgroup parameter in the /etc/samba/smb.conf file.
-r|--realm=REALMβ Set the realm for the domain. Straight to the point. π
Note that specifying this parameter here will override the realm parameter in the /etc/samba/smb.conf file.
-U|--user=[DOMAIN\]USERNAME[%PASSWORD]β Sets the SMB username or username and password.
Like, if %PASSWORD isn't specified, bestie, the user gets prompted. π
And the client goes on a lil scavenger hunt: first it checks the USER environment variable (which is also allowed to smuggle the password in, separated by a %), then it checks LOGNAME (which is not allowed to contain a password, sorry), and if either one exists, that value gets used. If neither of those environment variables is around? The username found in a Kerberos Credentials cache may be used instead. β¨
A third option, and honestly kind of the girlboss move for automation: a credentials file holding the plaintext of the username and password. This one's mainly for scripts where the admin does not want to pass credentials on the command line or through environment variables. If you go this route, you must make certain the permissions on the file restrict access from unwanted users. See the -A for the full tea. π
Be cautious about including passwords in scripts or passing user-supplied values onto the command line. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with kinit. No cap, this one's important.
And while Samba will attempt to scrub the password from the process title (the thing you'd see in ps), that happens after startup, so it is subject to a race. π So it's giving "better safe than sorry" energy.
-N|--no-passβ if you specify this, it suppresses the normal password prompt from the client to the user. Super useful when you're accessing a service that doesn't require a password at all. Unless a password is specified on the command line or this parameter is specified, the client will request a password. And heads up: if a password is specified on the command line and this option is also defined, the password on the command line will be silently ignored and no password will be used. π--passwordβ specify the password on the commandline. Be cautious about including passwords in scripts or passing user-supplied values onto the command line, fr fr β for security it is better to let the Samba client tool ask for the password if needed, or obtain the password once withkinit. If--passwordis not specified, the tool will check thePASSWDenvironment variable, followed byPASSWD_FD, which is expected to contain an open file descriptor (FD) number. And finally it will checkPASSWD_FILE(containing a file path to be opened) β that file should only contain the password. Make certain that the permissions on the file restrict access from unwanted users! And while Samba will attempt to scrub the password from the process title (as seen inps), this is after startup and so is subject to a race. π--pw-nt-hashβ the supplied password is the NT hash. that's it, that's the option. β¨-A|--authentication-file=filenameβ this option lets you specify a file to read the username and password used in the connection from. 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! π«Ά
-P|--machine-passβ use stored machine account password. lowkey iconic for machine accounts.--simple-bind-dn=DNβ DN to use for a simple bind.--use-kerberos=desired|required|offβ this parameter determines whether Samba client tools will try to authenticate using Kerberos. For Kerberos authentication you should use DNS names instead of IP addresses when connecting to a service. By default, Samba client tools will try to use the default Kerberos credential cache (ccache). In case the ccache does not exist or the-U|--useroption was specified, clients will ask to enter a password and will obtain a Kerberos ticket (kinit) for you. If you want to use an alternative Kerberos credential cache, use the--use-krb5-ccacheoption. Note that specifying this parameter here will override theclient use kerberosparameter in the/etc/samba/smb.conffile. π--use-krb5-ccache=CCACHEβ specifies the credential cache location for Kerberos authentication. This will enforce--use-kerberos=required. π--use-winbind-ccacheβ try to use the credential cache by winbind.--client-protection=sign|encrypt|offβ sets the connection protection the client tool should use. Note that specifying this parameter here will override theclient protectionparameter in the/etc/samba/smb.conffile. In case you need more fine grained control you can use:--option=clientsmbencrypt=OPTION,--option=clientipcsigning=OPTION,--option=clientsigning=OPTION. π₯
π COMMANDS π
okay bestie, this is the good part β all the actual RPC commands you can throw at it. buckle up. π¦
LSARPC
lsaqueryβ query info policylookupsidsβ convert SIDs to nameslookupsids3β convert SIDs to nameslookupsids_levelβ convert SIDs to nameslookupnamesβ convert names to SIDslookupnames4β convert names to SIDslookupnames_levelβ convert names to SIDsenumtrustβ enumerate trusted domainsenumprivsβ enumerate privilegesgetdispnameβ get the privilege namelsaenumsidβ enumerate the LSA SIDSlsacreateaccountβ create a new lsa accountlsaenumprivsaccountβ enumerate the privileges of an SIDlsaenumacctrightsβ enumerate the rights of an SIDlsaaddprivβ assign a privilege to a SIDlsadelprivβ revoke a privilege from a SIDlsaaddacctrightsβ add rights to an accountlsaremoveacctrightsβ remove rights from an accountlsalookupprivvalueβ get a privilege value given its namelsaquerysecobjβ query LSA security objectlsaquerytrustdominfoβ query LSA trusted domains info (given a SID)lsaquerytrustdominfobynameβ query LSA trusted domains info (given a name), only works for Windows > 2klsaquerytrustdominfobysidβ query LSA trusted domains info (given a SID)lsasettrustdominfoβ set LSA trusted domain infogetusernameβ get usernamecreatesecretβ create Secretdeletesecretβ delete Secretquerysecretβ query Secretsetsecretβ set Secretretrieveprivatedataβ retrieve Private Datastoreprivatedataβ store Private Datacreatetrustdomβ create Trusted Domaindeletetrustdomβ delete Trusted Domain
LSARPC-DS
dsroledominfoβ get Primary Domain Information
DFS
dfsversionβ query DFS supportdfsaddβ add a DFS sharedfsremoveβ remove a DFS sharedfsgetinfoβ query DFS share infodfsenumβ enumerate dfs sharesdfsenumexβ enumerate dfs shares
SHUTDOWN
shutdowninitβ syntax:shutdown [-m message]shutdownabortβ syntax:shutdownabort
SRVSVC
srvinfoβ server query infonetshareenumβ enumerate sharesnetshareenumallβ enumerate all sharesnetsharegetinfoβ get Share Infonetsharesetinfoβ set Share Infonetsharesetdfsflagsβ set DFS flagsnetfileenumβ enumerate open filesnetremotetodβ fetch remote time of daynetnamevalidateβ validate sharenamenetfilegetsecβ get File securitynetsessdelβ delete Sessionnetsessenumβ enumerate Sessionsnetdiskenumβ enumerate Disksnetconnenumβ enumerate Connectionsnetshareaddβ add sharenetsharedelβ delete share
SAMR
queryuserβ query user infoquerygroupβ query group infoqueryusergroupsβ query user groupsqueryuseraliasesβ query user aliasesquerygroupmemβ query group membershipqueryaliasmemβ query alias membershipqueryaliasinfoβ query alias infodeletealiasβ delete an aliasquerydispinfoβ query display infoquerydispinfo2β query display infoquerydispinfo3β query display infoquerydominfoβ query domain infoenumdomusersβ enumerate domain usersenumdomgroupsβ enumerate domain groupsenumalsgroupsβ enumerate alias groupsenumdomainsβ enumerate domainscreatedomuserβ create domain usercreatedomgroupβ create domain groupcreatedomaliasβ create domain aliassamlookupnamesβ look up namessamlookupridsβ look up namesdeletedomgroupβ delete domain groupdeletedomuserβ delete domain usersamquerysecobjβ query SAMR security objectgetdompwinfoβ retrieve domain password infogetusrdompwinfoβ retrieve user domain password infolookupdomainβ lookup Domain Namechgpasswdβ change user passwordchgpasswd2β change user passwordchgpasswd3β change user password (RC4 encrypted)chgpasswd4β change user password (AES encrypted)getdispinfoidxβ get Display Information Indexsetuserinfoβ set user infosetuserinfo2β set user info2
SPOOLSS
adddriver <arch> <config> [<version>]β execute anAddPrinterDriver()RPC to install the printer driver information on the server. Note that the driver files should already exist in the directory returned bygetdriverdir. Possible values for arch are the same as those for thegetdriverdircommand. The config parameter is defined as follows:
Long Driver 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 Monitors since these only apply to local printers whose driver can make use of a bi-directional link for communication. 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. π
The version parameter lets you specify the printer driver version number. If omitted, the default driver version for the specified architecture will be used. This option can be used to upload Windows 2000 (version 3) printer drivers. π¨οΈβ¨
addprinter<printername> <sharename> <drivername> <port>β Adds a printer on the remote server, and she gets auto-shared the second she exists β¨. Heads up though: the printer driver has to be already installed on the server first (go look atadddriver), and theportmust be a valid port name (peepenumports).deldriver<driver>β Deletes the specified printer driver for all architectures. Ngl this does not delete the actual driver files off the server β it only yanks the entry out of the server's list of drivers. So the vibes are gone, the files are still there π.deldriverex<driver> [architecture] [version] [flags]β Deletes the specified printer driver and, optionally, files associated with the driver. You can limit the whole thing to a specific architecture and a specific version. If no architecture is given, all driver files of that driver get deleted. Theflagscorrespond to numericDPD_*values β so a value of3requests (DPD_DELETE_UNUSED_FILES | DPD_DELETE_SPECIFIC_VERSION).enumdataβ Enumerates all printer setting data stored on the server ποΈ. On Windows NT clients these values live in the registry, while Samba servers store them in the printers TDB. This one corresponds to the MS Platform SDKGetPrinterData()function (* this command is currently unimplemented).enumdataexβ Enumerate printer data for a key π.enumkeyβ Enumerate printer keys.enumjobs<printer>β Lists the jobs and status of a given printer, bestie π. Corresponds to the MS Platform SDKEnumJobs()function.getjobβ Get print job. That's it, that's the whole description, she's mysterious like that π«Ά.setjobβ Set print job.enumports[level]β Executes anEnumPorts()call using the specified info level. Currently only info levels1and2are supported (yes, only those two, don't come for me).enumdrivers[level]β Executes anEnumPrinterDrivers()call and lists all the various installed printer drivers for all architectures π¨οΈ. For more details on the various flags and calling options, refer to the MS Platform SDK documentation. Currently supported info levels are1,2, and3.enumprinters[level]β Executes anEnumPrinters()call, listing all the installed and shared printers. Same deal: the MS Platform SDK documentation has the details on the various flags and calling options. Currently supported info levels are1,2and5.getdata<printername> <valuename;>β Retrieves the data for a given printer setting. Go look at theenumdatacommand if you want more info. This one corresponds to theGetPrinterData()MS Platform SDK function.getdataexβ Get printer driver data with keyname.getdriver<printername>β Retrieves the printer driver information (like driver file, config file, dependent files, etc...) for the given printer π. Corresponds to theGetPrinterDriver()MS Platform SDK function. Currently info levels1,2, and3are supported.getdriverdir<arch>β Executes aGetPrinterDriverDirectory()RPC to retrieve the SMB share name and subdirectory where printer driver files for a given architecture get stored. Possible values forarchare"Windows 4.0"(for Windows 95/98),"Windows NT x86","Windows NT PowerPC","Windows Alpha_AXP", and"Windows NT R4000"β yes, real ones, we don't make the rules π.getdriverpackagepathβ Get print driver package download directory.getprinter<printername>β Retrieves the current printer information β¨. Corresponds to theGetPrinter()MS Platform SDK function.openprinter<printername>β Executes anOpenPrinterEx()andClosePrinter()RPC against a given printer.openprinter_ex<printername>β Open printer handle.setdriver<printername> <drivername>β Executes aSetPrinter()command to update the printer driver associated with an installed printer. The printer driver must already be correctly installed on the print server β no shortcuts, bestie π .
Also peep the enumprinters and enumdrivers commands for obtaining a list of installed printers and drivers.
getprintprocdirβ Get print processor directory.addformβ Add form.setformβ Set form.getformβ Get form.deleteformβ Delete form.enumformsβ Enumerate form.setprinterβ Set printer comment.setprinterdataβ SetREG_SZprinter data.setprintername<printername> <newprintername>β Set printer name.rffpcnexβ Rffpcnex test.printercmpβ Printer comparison test.enumprocsβ Enumerate Print Processors.enumprocdatatypesβ Enumerate Print Processor Data Types.enummonitorsβ Enumerate Print Monitors.createprintericβ Create Printer IC.playgdiscriptonprintericβ Create Printer IC.getcoreprinterdriversβ Get CorePrinterDriver.enumpermachineconnectionsβ Enumerate Per Machine Connections.addpermachineconnectionβ Add Per Machine Connection.delpermachineconnectionβ Delete Per Machine Connection.
πΈ NETLOGON πΈ
logonctrl2β Logon Control 2.getanydcnameβ Get trusted DC name.getdcnameβ Get trusted PDC name.dsr_getdcnameβ Get trusted DC name.dsr_getdcnameexβ Get trusted DC name.dsr_getdcnameex2β Get trusted DC name.dsr_getsitenameβ Get sitename.dsr_getforesttrustinfoβ Get Forest Trust Info.logonctrlβ Logon Control.samlogonβ Sam Logon.change_trust_pwβ Change Trust Account Password.gettrustridβ Get trust rid.dsr_enumtrustdomβ Enumerate trusted domains.dsenumdomtrustsβ Enumerate all trusted domains in an AD forest π.deregisterdnsrecordsβ Deregister DNS records.netrenumtrusteddomainsβ Enumerate trusted domains.netrenumtrusteddomainsexβ Enumerate trusted domains.getdcsitecoverageβ Get the Site-Coverage from a DC.capabilitiesβ Return Capabilities.logongetdomaininfoβ Return LogonGetDomainInfo.
π¦ FSRVP π¦
fss_is_path_supβ Check whether a share supports shadow-copy.fss_get_sup_versionβ Get supported FSRVP version from server.fss_create_exposeβ Request shadow-copy creation and exposure.fss_deleteβ Request shadow-copy share deletion.fss_has_shadow_copyβ Check for an associated share shadow-copy.fss_get_mappingβ Get shadow-copy share mapping information.fss_recovery_completeβ Flag read-write snapshot as recovery complete,
π CLUSAPI π
clusapi_open_clusterβ Open cluster.clusapi_get_cluster_nameβ Get cluster name.clusapi_get_cluster_versionβ Get cluster version.clusapi_get_quorum_resourceβ Get quorum resource.clusapi_create_enumβ Create enum query.clusapi_create_enumexβ Create enumex query.clusapi_open_resourceβ Open cluster resource.clusapi_online_resourceβ Set cluster resource online.clusapi_offline_resourceβ Set cluster resource offline.clusapi_get_resource_stateβ Get cluster resource state.clusapi_get_cluster_version2β Get cluster version2.clusapi_pause_nodeβ Pause cluster node.clusapi_resume_nodeβ Resume cluster node.
π DRSUAPI π
dscracknamesβ Crack Name.dsgetdcinfoβ Get Domain Controller Info.dsgetncchangesβ Get NC Changes.dswriteaccountspnβ Write Account SPN.
β ECHO β
echoaddoneβ Add one to a number.echodataβ Echo data.sinkdataβ Sink data.sourcedataβ Source data.
π§ EPMAPPER π§
epmmapβ Map a binding.epmlookupβ Lookup bindings.
π₯ EVENTLOG π₯
eventlog_readlogβ Read Eventlog.eventlog_numrecordβ Get number of records.eventlog_oldestrecordβ Get oldest record.eventlog_reporteventβ Report event.eventlog_reporteventsourceβ Report event and source.eventlog_registerevsourceβ Register event source.eventlog_backuplogβ Backup Eventlog File.eventlog_loginfoβ Get Eventlog Information.
π¨οΈ IRemoteWinspool π¨οΈ
winspool_AsyncOpenPrinterβ Open printer handle.winspool_AsyncCorePrinterDriverInstalledβ Query Core Printer Driver Installed.
π NTSVCS π
ntsvcs_getversionβ Query NTSVCS version.ntsvcs_validatedevinstβ Query NTSVCS device instance.ntsvcs_hwprofflagsβ Query NTSVCS HW prof flags.ntsvcs_hwprofinfoβ Query NTSVCS HW prof info.ntsvcs_getdevregpropβ Query NTSVCS device registry property.ntsvcs_getdevlistsizeβ Query NTSVCS device list size.ntsvcs_getdevlistβ Query NTSVCS device list.
π MDSSVC π
fetch_propertiesβ Fetch connection properties.fetch_attributesβ Fetch attributes for a CNID.
π WINREG π
winreg_enumkeyβ Enumerate Keys.querymultiplevaluesβ Query multiple values.querymultiplevalues2β Query multiple values.
π WITNESS π
GetInterfaceListβ List the interfaces to which witness client connections can be made.Registerβ Register for resource state change notifications of a NetName and IPAddress.UnRegisterβ Unregister for notifications from the server.AsyncNotifyβ Request notification of registered resource changes from the server.RegisterExβ Register for resource state change notifications of a NetName, ShareName and multiple IPAddresses.
π WKSSVC π
wkssvc_wkstagetinfoβ Query WKSSVC Workstation Information.wkssvc_getjoininformationβ Query WKSSVC Join Information.wkssvc_messagebuffersendβ Send WKSSVC message.wkssvc_enumeratecomputernamesβ Enumerate WKSSVC computer names.wkssvc_enumerateusersβ Enumerate WKSSVC users.
β¨ GENERAL OPTIONS β¨
helpβ Get help on commands π«Ά.?β Get help on commands (same energy, different key).debuglevelβ Set debug level.debugβ Set debug level.listβ List available commands on pipe.exitβ Exit program.quitβ Exit program.signβ Force RPC pipe connections to be signed.sealβ Force RPC pipe connections to be sealed.packetβ Force RPC pipe connections with packet authentication level.schannelβ Force RPC pipe connections to be sealed with'schannel'. Assumes valid machine account to this domain controller. (The page literally says the sealing thing twice, and honestly? we respect the commitment.)schannelsignβ Force RPC pipe connections to be signed (not sealed) with'schannel'. Assumes valid machine account to this domain controller.timeoutβ Set timeout (in milliseconds) for RPC operations β±οΈ.
transportβ pick thencacntransport for RPC operations πnoneβ forces RPC pipe connections to have no special properties. that's it, that's the whole vibe. β¨
π BUGS π
okay bestie, real talk, no filter: rpcclient is literally designed as a developer testing tool, so it may not be robust in certain areas β like, for example, command line parsing. and yes, it has been known to generate a core dump upon failures when invalid parameters were passed to the interpreter. it's giving chaotic energy fr fr. π
and now, straight from Luke Leighton's original rpcclient man page, because this warning is iconic and deserves to be preserved in amber:
WARNING! The MSRPC over SMB code has been developed from examining Network traces. No documentation is available from the original creators (Microsoft) on how MSRPC over SMB works, or how the individual MSRPC services work. Microsoft's implementation of these services has been demonstrated (and reported) to be... a bit flaky in places.
not me reading that and going π β "a bit flaky in places" is the most polite way anyone has ever described a whole protocol stack, periodt.
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. π additionally, the developers are sending reports to Microsoft, and problems found or reported to Microsoft are fixed in Service Packs, which may result in incompatibilities. so likeβ¦ the bugs get fixed over there and then everything gets more mismatched over here. the way that this is just how it is π
π VERSION π
This man page is part of version 4.24.7 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. The conversion to DocBook XML 4.2 for Samba 3.0 was done by Alexander Bokovoy. π
and that's the whole page, bestie!! π you made it to the end, I'm so proud of you fr fr π
this one's Samba 4.24.7, dated 09/09/2026, and it's the RPCCLIENT(1) manual page β so go forth, poke at some RPC pipes, and remember: if it core dumps, that's not a you problem, that's canon. ππ
β¨
π¦ where this page comes from
- fedora 44: samba-client 2:4.24.7-1.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms