source: vendor/current/docs/manpages/rpcclient.1

Last change on this file was 989, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.7

File size: 14.0 KB
Line 
1'\" t
2.\" Title: rpcclient
3.\" Author: [see the "AUTHOR" section]
4.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
5.\" Date: 10/25/2016
6.\" Manual: User Commands
7.\" Source: Samba 4.4
8.\" Language: English
9.\"
10.TH "RPCCLIENT" "1" "10/25/2016" "Samba 4\&.4" "User Commands"
11.\" -----------------------------------------------------------------
12.\" * Define some portability stuff
13.\" -----------------------------------------------------------------
14.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15.\" http://bugs.debian.org/507673
16.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18.ie \n(.g .ds Aq \(aq
19.el .ds Aq '
20.\" -----------------------------------------------------------------
21.\" * set default formatting
22.\" -----------------------------------------------------------------
23.\" disable hyphenation
24.nh
25.\" disable justification (adjust text to left margin only)
26.ad l
27.\" -----------------------------------------------------------------
28.\" * MAIN CONTENT STARTS HERE *
29.\" -----------------------------------------------------------------
30.SH "NAME"
31rpcclient \- tool for executing client side MS\-RPC functions
32.SH "SYNOPSIS"
33.HP \w'\ 'u
34rpcclient [\-A\ authfile] [\-c\ <command\ string>] [\-d\ debuglevel] [\-l\ logdir] [\-N] [\-s\ <smb\ config\ file>] [\-U\ username[%password]] [\-W\ workgroup] [\-I\ destinationIP] {server}
35.SH "DESCRIPTION"
36.PP
37This tool is part of the
38\fBsamba\fR(7)
39suite\&.
40.PP
41rpcclient
42is 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\&.
43.SH "OPTIONS"
44.PP
45server
46.RS 4
47NetBIOS name of Server to which to connect\&. The server can be any SMB/CIFS server\&. The name is resolved using the
48\m[blue]\fBname resolve order\fR\m[]
49line from
50\fBsmb.conf\fR(5)\&.
51.RE
52.PP
53\-c|\-\-command=<command string>
54.RS 4
55Execute semicolon separated commands (listed below)
56.RE
57.PP
58\-I|\-\-dest\-ip IP\-address
59.RS 4
60\fIIP address\fR
61is the address of the server to connect to\&. It should be specified in standard "a\&.b\&.c\&.d" notation\&.
62.sp
63Normally the client would attempt to locate a named SMB/CIFS server by looking it up via the NetBIOS name resolution mechanism described above in the
64\fIname resolve order\fR
65parameter above\&. Using this parameter will force 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\&.
66.sp
67There is no default for this parameter\&. If not supplied, it will be determined automatically by the client as described above\&.
68.RE
69.PP
70\-p|\-\-port port
71.RS 4
72This number is the TCP port number that will be used when making connections to the server\&. The standard (well\-known) TCP port number for an SMB/CIFS server is 139, which is the default\&.
73.RE
74.SH "COMMANDS"
75.SS "LSARPC"
76.PP
77lsaquery
78.RS 4
79Query info policy
80.RE
81.PP
82lookupsids
83.RS 4
84Resolve a list of SIDs to usernames\&.
85.RE
86.PP
87lookupnames
88.RS 4
89Resolve a list of usernames to SIDs\&.
90.RE
91.PP
92enumtrust
93.RS 4
94Enumerate trusted domains
95.RE
96.PP
97enumprivs
98.RS 4
99Enumerate privileges
100.RE
101.PP
102getdispname
103.RS 4
104Get the privilege name
105.RE
106.PP
107lsaenumsid
108.RS 4
109Enumerate the LSA SIDS
110.RE
111.PP
112lsaenumprivsaccount
113.RS 4
114Enumerate the privileges of an SID
115.RE
116.PP
117lsaenumacctrights
118.RS 4
119Enumerate the rights of an SID
120.RE
121.PP
122lsaenumacctwithright
123.RS 4
124Enumerate accounts with a right
125.RE
126.PP
127lsaaddacctrights
128.RS 4
129Add rights to an account
130.RE
131.PP
132lsaremoveacctrights
133.RS 4
134Remove rights from an account
135.RE
136.PP
137lsalookupprivvalue
138.RS 4
139Get a privilege value given its name
140.RE
141.PP
142lsaquerysecobj
143.RS 4
144Query LSA security object
145.RE
146.SS "LSARPC\-DS"
147.PP
148dsroledominfo
149.RS 4
150Get Primary Domain Information
151.RE
152.PP
153.PP
154\fIDFS\fR
155.PP
156dfsexist
157.RS 4
158Query DFS support
159.RE
160.PP
161dfsadd
162.RS 4
163Add a DFS share
164.RE
165.PP
166dfsremove
167.RS 4
168Remove a DFS share
169.RE
170.PP
171dfsgetinfo
172.RS 4
173Query DFS share info
174.RE
175.PP
176dfsenum
177.RS 4
178Enumerate dfs shares
179.RE
180.SS "REG"
181.PP
182shutdown
183.RS 4
184Remote Shutdown
185.RE
186.PP
187abortshutdown
188.RS 4
189Abort Shutdown
190.RE
191.SS "SRVSVC"
192.PP
193srvinfo
194.RS 4
195Server query info
196.RE
197.PP
198netshareenum
199.RS 4
200Enumerate shares
201.RE
202.PP
203netshareenumall
204.RS 4
205Enumerate all shares
206.RE
207.PP
208netsharegetinfo
209.RS 4
210Get Share Info
211.RE
212.PP
213netsharesetinfo
214.RS 4
215Set Share Info
216.RE
217.PP
218netsharesetdfsflags
219.RS 4
220Set DFS flags
221.RE
222.PP
223netfileenum
224.RS 4
225Enumerate open files
226.RE
227.PP
228netremotetod
229.RS 4
230Fetch remote time of day
231.RE
232.PP
233netnamevalidate
234.RS 4
235Validate sharename
236.RE
237.PP
238netfilegetsec
239.RS 4
240Get File security
241.RE
242.PP
243netsessdel
244.RS 4
245Delete Session
246.RE
247.PP
248netsessenum
249.RS 4
250Enumerate Sessions
251.RE
252.PP
253netdiskenum
254.RS 4
255Enumerate Disks
256.RE
257.PP
258netconnenum
259.RS 4
260Enumerate Connections
261.RE
262.PP
263netshareadd
264.RS 4
265Add share
266.RE
267.PP
268netsharedel
269.RS 4
270Delete share
271.RE
272.SS "SAMR"
273.PP
274queryuser
275.RS 4
276Query user info
277.RE
278.PP
279querygroup
280.RS 4
281Query group info
282.RE
283.PP
284queryusergroups
285.RS 4
286Query user groups
287.RE
288.PP
289querygroupmem
290.RS 4
291Query group membership
292.RE
293.PP
294queryaliasmem
295.RS 4
296Query alias membership
297.RE
298.PP
299querydispinfo
300.RS 4
301Query display info
302.RE
303.PP
304querydominfo
305.RS 4
306Query domain info
307.RE
308.PP
309enumdomusers
310.RS 4
311Enumerate domain users
312.RE
313.PP
314enumdomgroups
315.RS 4
316Enumerate domain groups
317.RE
318.PP
319enumalsgroups
320.RS 4
321Enumerate alias groups
322.RE
323.PP
324createdomuser
325.RS 4
326Create domain user
327.RE
328.PP
329samlookupnames
330.RS 4
331Look up names
332.RE
333.PP
334samlookuprids
335.RS 4
336Look up names
337.RE
338.PP
339deletedomuser
340.RS 4
341Delete domain user
342.RE
343.PP
344samquerysecobj
345.RS 4
346Query SAMR security object
347.RE
348.PP
349getdompwinfo
350.RS 4
351Retrieve domain password info
352.RE
353.PP
354lookupdomain
355.RS 4
356Look up domain
357.RE
358.SS "SPOOLSS"
359.PP
360adddriver <arch> <config> [<version>]
361.RS 4
362Execute 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
363getdriverdir\&. Possible values for
364\fIarch\fR
365are the same as those for the
366getdriverdir
367command\&. The
368\fIconfig\fR
369parameter is defined as follows:
370.sp
371.if n \{\
372.RS 4
373.\}
374.nf
375Long Driver Name:\e
376Driver File Name:\e
377Data File Name:\e
378Config File Name:\e
379Help File Name:\e
380Language Monitor Name:\e
381Default Data Type:\e
382Comma Separated list of Files
383.fi
384.if n \{\
385.RE
386.\}
387.sp
388Any empty fields should be enter as the string "NULL"\&.
389.sp
390Samba 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\&.
391.sp
392The
393\fIversion\fR
394parameter 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\&.
395.RE
396.PP
397addprinter <printername> <sharename> <drivername> <port>
398.RS 4
399Add 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
400adddriver) and the
401\fIport\fRmust be a valid port name (see
402enumports\&.
403.RE
404.PP
405deldriver <driver>
406.RS 4
407Delete the specified printer driver for all architectures\&. This does not delete the actual driver files from the server, only the entry from the server\*(Aqs list of drivers\&.
408.RE
409.PP
410deldriverex <driver> [architecture] [version] [flags]
411.RS 4
412Delete the specified printer driver and optionally files associated with the driver\&. You can limit this action to a specific architecture and a specific version\&. If no architecture is given, all driver files of that driver will be deleted\&.
413\fIflags\fR
414correspond to numeric DPD_* values, i\&.e\&. a value of 3 requests (DPD_DELETE_UNUSED_FILES | DPD_DELETE_SPECIFIC_VERSION)\&.
415.RE
416.PP
417enumdata
418.RS 4
419Enumerate 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)\&.
420.RE
421.PP
422enumdataex
423.RS 4
424Enumerate printer data for a key
425.RE
426.PP
427enumjobs <printer>
428.RS 4
429List the jobs and status of a given printer\&. This command corresponds to the MS Platform SDK EnumJobs() function
430.RE
431.PP
432enumkey
433.RS 4
434Enumerate printer keys
435.RE
436.PP
437enumports [level]
438.RS 4
439Executes an EnumPorts() call using the specified info level\&. Currently only info levels 1 and 2 are supported\&.
440.RE
441.PP
442enumdrivers [level]
443.RS 4
444Execute 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\&.
445.RE
446.PP
447enumprinters [level]
448.RS 4
449Execute 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 1, 2 and 5\&.
450.RE
451.PP
452getdata <printername> <valuename;>
453.RS 4
454Retrieve the data for a given printer setting\&. See the
455enumdata
456command for more information\&. This command corresponds to the GetPrinterData() MS Platform SDK function\&.
457.RE
458.PP
459getdataex
460.RS 4
461Get printer driver data with keyname
462.RE
463.PP
464getdriver <printername>
465.RS 4
466Retrieve 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\&.
467.RE
468.PP
469getdriverdir <arch>
470.RS 4
471Execute a GetPrinterDriverDirectory() RPC to retrieve the SMB share name and subdirectory for storing printer driver files for a given architecture\&. Possible values for
472\fIarch\fR
473are "Windows 4\&.0" (for Windows 95/98), "Windows NT x86", "Windows NT PowerPC", "Windows Alpha_AXP", and "Windows NT R4000"\&.
474.RE
475.PP
476getprinter <printername>
477.RS 4
478Retrieve the current printer information\&. This command corresponds to the GetPrinter() MS Platform SDK function\&.
479.RE
480.PP
481getprintprocdir
482.RS 4
483Get print processor directory
484.RE
485.PP
486openprinter <printername>
487.RS 4
488Execute an OpenPrinterEx() and ClosePrinter() RPC against a given printer\&.
489.RE
490.PP
491setdriver <printername> <drivername>
492.RS 4
493Execute 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\&.
494.sp
495See also the
496enumprinters
497and
498enumdrivers
499commands for obtaining a list of of installed printers and drivers\&.
500.RE
501.PP
502addform
503.RS 4
504Add form
505.RE
506.PP
507setform
508.RS 4
509Set form
510.RE
511.PP
512getform
513.RS 4
514Get form
515.RE
516.PP
517deleteform
518.RS 4
519Delete form
520.RE
521.PP
522enumforms
523.RS 4
524Enumerate form
525.RE
526.PP
527setprinter
528.RS 4
529Set printer comment
530.RE
531.PP
532setprinterdata
533.RS 4
534Set REG_SZ printer data
535.RE
536.PP
537setprintername <printername> <newprintername>
538.RS 4
539Set printer name
540.RE
541.PP
542rffpcnex
543.RS 4
544Rffpcnex test
545.RE
546.SS "NETLOGON"
547.PP
548logonctrl2
549.RS 4
550Logon Control 2
551.RE
552.PP
553logonctrl
554.RS 4
555Logon Control
556.RE
557.PP
558samsync
559.RS 4
560Sam Synchronisation
561.RE
562.PP
563samdeltas
564.RS 4
565Query Sam Deltas
566.RE
567.PP
568samlogon
569.RS 4
570Sam Logon
571.RE
572.SS "FSRVP"
573.PP
574fss_is_path_sup <share>
575.RS 4
576Check whether a share supports shadow\-copy requests
577.RE
578.PP
579fss_get_sup_version
580.RS 4
581Get supported FSRVP version from server
582.RE
583.PP
584fss_create_expose <context> <[ro|rw]> <share1> [share2] \&.\&.\&. [shareN]
585.RS 4
586Request shadow\-copy creation and exposure as a new share
587.RE
588.PP
589fss_delete <base_share> <shadow_copy_set_id> <shadow_copy_id>
590.RS 4
591Request shadow\-copy share deletion
592.RE
593.PP
594fss_has_shadow_copy <base_share>
595.RS 4
596Check for an associated share shadow\-copy
597.RE
598.PP
599fss_get_mapping <base_share> <shadow_copy_set_id> <shadow_copy_id>
600.RS 4
601Get shadow\-copy share mapping information
602.RE
603.PP
604fss_recovery_complete <shadow_copy_set_id>
605.RS 4
606Flag read\-write shadow\-copy as recovery complete, allowing further shadow\-copy requests
607.RE
608.SS "GENERAL COMMANDS"
609.PP
610debuglevel
611.RS 4
612Set the current debug level used to log information\&.
613.RE
614.PP
615help (?)
616.RS 4
617Print a listing of all known commands or extended help on a particular command\&.
618.RE
619.PP
620quit (exit)
621.RS 4
622Exit
623rpcclient\&.
624.RE
625.SH "BUGS"
626.PP
627rpcclient
628is designed as a developer testing tool and may not be robust in certain areas (such as command line parsing)\&. It has been known to generate a core dump upon failures when invalid parameters where passed to the interpreter\&.
629.PP
630From Luke Leighton\*(Aqs original rpcclient man page:
631.PP
632\fIWARNING!\fR
633The 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\*(Aqs implementation of these services has been demonstrated (and reported) to be\&.\&.\&. a bit flaky in places\&.
634.PP
635The development of Samba\*(Aqs implementation is also a bit rough, and as more of the services are understood, it can even result in versions of
636\fBsmbd\fR(8)
637and
638\fBrpcclient\fR(1)
639that 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\&.
640.SH "VERSION"
641.PP
642This man page is correct for version 3 of the Samba suite\&.
643.SH "AUTHOR"
644.PP
645The 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\&.
646.PP
647The 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\&.
Note: See TracBrowser for help on using the repository browser.