source: branches/samba-3.0/docs/manpages/rpcclient.1@ 114

Last change on this file since 114 was 44, checked in by Paul Smedley, 18 years ago

Update source to 3.0.25b

File size: 16.4 KB
Line 
1.\"Generated by db2man.xsl. Don't modify this, modify the source.
2.de Sh \" Subsection
3.br
4.if t .Sp
5.ne 5
6.PP
7\fB\\$1\fR
8.PP
9..
10.de Sp \" Vertical space (when we can't use .PP)
11.if t .sp .5v
12.if n .sp
13..
14.de Ip \" List item
15.br
16.ie \\n(.$>=3 .ne \\$3
17.el .ne 3
18.IP "\\$1" \\$2
19..
20.TH "RPCCLIENT" 1 "" "" ""
21.SH "NAME"
22rpcclient - tool for executing client side MS-RPC functions
23.SH "SYNOPSIS"
24.HP 1
25rpcclient [-A authfile] [-c <command string>] [-d debuglevel] [-h] [-l logdir] [-N] [-s <smb config file>] [-U username[%password]] [-W workgroup] [-N] [-I destinationIP] {server}
26.SH "DESCRIPTION"
27.PP
28This tool is part of the
29\fBsamba\fR(7)
30suite.
31.PP
32rpcclient
33is 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.
34.SH "OPTIONS"
35.PP
36server
37.RS 3n
38NetBIOS name of Server to which to connect. The server can be any SMB/CIFS server. The name is resolved using the
39name resolve order line from
40\fBsmb.conf\fR(5).
41.RE
42.PP
43-c|--command='command string'
44.RS 3n
45execute semicolon separated commands (listed below))
46.RE
47.PP
48-I IP-address
49.RS 3n
50\fIIP address\fR
51is the address of the server to connect to. It should be specified in standard "a.b.c.d" notation.
52.sp
53Normally 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
54\fIname resolve order\fR
55parameter 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.
56.sp
57There is no default for this parameter. If not supplied, it will be determined automatically by the client as described above.
58.RE
59.PP
60-V
61.RS 3n
62Prints the program version number.
63.RE
64.PP
65-s <configuration file>
66.RS 3n
67The file specified contains the configuration details required by the server. The information in this file includes server-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide. See
68\fIsmb.conf\fR
69for more information. The default configuration file name is determined at compile time.
70.RE
71.PP
72-d|--debuglevel=level
73.RS 3n
74\fIlevel\fR
75is an integer from 0 to 10. The default value if this parameter is not specified is zero.
76.sp
77The 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.
78.sp
79Levels 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.
80.sp
81Note that specifying this parameter here will override the
82
83parameter in the
84\fIsmb.conf\fR
85file.
86.RE
87.PP
88-l|--logfile=logdirectory
89.RS 3n
90Base directory name for log/debug files. The extension
91\fB".progname"\fR
92will be appended (e.g. log.smbclient, log.smbd, etc...). The log file is never removed by the client.
93.RE
94.PP
95-N
96.RS 3n
97If specified, this parameter suppresses the normal password prompt from the client to the user. This is useful when accessing a service that does not require a password.
98.sp
99Unless a password is specified on the command line or this parameter is specified, the client will request a password.
100.sp
101If a password is specified on the command line and this option is also defined the password on the command line will be silently ingnored and no password will be used.
102.RE
103.PP
104-k
105.RS 3n
106Try to authenticate with kerberos. Only useful in an Active Directory environment.
107.RE
108.PP
109-A|--authentication-file=filename
110.RS 3n
111This 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
112.sp
113
114.sp
115
116.nf
117
118username = <value>
119password = <value>
120domain = <value>
121
122.fi
123
124.sp
125Make certain that the permissions on the file restrict access from unwanted users.
126.RE
127.PP
128-U|--user=username[%password]
129.RS 3n
130Sets the SMB username or username and password.
131.sp
132If %password is not specified, the user will be prompted. The client will first check the
133\fBUSER\fR
134environment variable, then the
135\fBLOGNAME\fR
136variable and if either exists, the string is uppercased. If these environmental variables are not found, the username
137\fBGUEST\fR
138is used.
139.sp
140A 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 does not wish to pass the credentials on the command line or via environment variables. If this method is used, make certain that the permissions on the file restrict access from unwanted users. See the
141\fI-A\fR
142for more details.
143.sp
144Be cautious about including passwords in scripts. Also, on many systems the command line of a running process may be seen via the
145ps
146command. To be safe always allow
147rpcclient
148to prompt for a password and type it in directly.
149.RE
150.PP
151-n <primary NetBIOS name>
152.RS 3n
153This option allows you to override the NetBIOS name that Samba uses for itself. This is identical to setting the
154
155parameter in the
156\fIsmb.conf\fR
157file. However, a command line setting will take precedence over settings in
158\fIsmb.conf\fR.
159.RE
160.PP
161-i <scope>
162.RS 3n
163This specifies a NetBIOS scope that
164nmblookup
165will use to communicate with when generating NetBIOS names. For details on the use of NetBIOS scopes, see rfc1001.txt and rfc1002.txt. NetBIOS scopes are
166\fBvery\fR
167rarely used, only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with.
168.RE
169.PP
170-W|--workgroup=domain
171.RS 3n
172Set 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 servers NetBIOS name, it causes the client to log on using the servers local SAM (as opposed to the Domain SAM).
173.RE
174.PP
175-O socket options
176.RS 3n
177TCP socket options to set on the client socket. See the socket options parameter in the
178\fIsmb.conf\fR
179manual page for the list of valid options.
180.RE
181.PP
182-h|--help
183.RS 3n
184Print a summary of command line options.
185.RE
186.SH "COMMANDS"
187.SS "LSARPC"
188.PP
189lsaquery
190.RS 3n
191Query info policy
192.RE
193.PP
194lookupsids
195.RS 3n
196Resolve a list of SIDs to usernames.
197.RE
198.PP
199lookupnames
200.RS 3n
201Resolve a list of usernames to SIDs.
202.RE
203.PP
204enumtrusts
205.RS 3n
206Enumerate trusted domains
207.RE
208.PP
209enumprivs
210.RS 3n
211Enumerate privileges
212.RE
213.PP
214getdispname
215.RS 3n
216Get the privilege name
217.RE
218.PP
219lsaenumsid
220.RS 3n
221Enumerate the LSA SIDS
222.RE
223.PP
224lsaenumprivsaccount
225.RS 3n
226Enumerate the privileges of an SID
227.RE
228.PP
229lsaenumacctrights
230.RS 3n
231Enumerate the rights of an SID
232.RE
233.PP
234lsaenumacctwithright
235.RS 3n
236Enumerate accounts with a right
237.RE
238.PP
239lsaaddacctrights
240.RS 3n
241Add rights to an account
242.RE
243.PP
244lsaremoveacctrights
245.RS 3n
246Remove rights from an account
247.RE
248.PP
249lsalookupprivvalue
250.RS 3n
251Get a privilege value given its name
252.RE
253.PP
254lsaquerysecobj
255.RS 3n
256Query LSA security object
257.RE
258.SS "LSARPC-DS"
259.PP
260dsroledominfo
261.RS 3n
262Get Primary Domain Information
263.RE
264.PP
265
266.PP
267\fBDFS\fR
268.PP
269dfsexist
270.RS 3n
271Query DFS support
272.RE
273.PP
274dfsadd
275.RS 3n
276Add a DFS share
277.RE
278.PP
279dfsremove
280.RS 3n
281Remove a DFS share
282.RE
283.PP
284dfsgetinfo
285.RS 3n
286Query DFS share info
287.RE
288.PP
289dfsenum
290.RS 3n
291Enumerate dfs shares
292.RE
293.SS "REG"
294.PP
295shutdown
296.RS 3n
297Remote Shutdown
298.RE
299.PP
300abortshutdown
301.RS 3n
302Abort Shutdown
303.RE
304.SS "SRVSVC"
305.PP
306srvinfo
307.RS 3n
308Server query info
309.RE
310.PP
311netshareenum
312.RS 3n
313Enumerate shares
314.RE
315.PP
316netfileenum
317.RS 3n
318Enumerate open files
319.RE
320.PP
321netremotetod
322.RS 3n
323Fetch remote time of day
324.RE
325.SS "SAMR"
326.PP
327queryuser
328.RS 3n
329Query user info
330.RE
331.PP
332querygroup
333.RS 3n
334Query group info
335.RE
336.PP
337queryusergroups
338.RS 3n
339Query user groups
340.RE
341.PP
342querygroupmem
343.RS 3n
344Query group membership
345.RE
346.PP
347queryaliasmem
348.RS 3n
349Query alias membership
350.RE
351.PP
352querydispinfo
353.RS 3n
354Query display info
355.RE
356.PP
357querydominfo
358.RS 3n
359Query domain info
360.RE
361.PP
362enumdomusers
363.RS 3n
364Enumerate domain users
365.RE
366.PP
367enumdomgroups
368.RS 3n
369Enumerate domain groups
370.RE
371.PP
372enumalsgroups
373.RS 3n
374Enumerate alias groups
375.RE
376.PP
377createdomuser
378.RS 3n
379Create domain user
380.RE
381.PP
382samlookupnames
383.RS 3n
384Look up names
385.RE
386.PP
387samlookuprids
388.RS 3n
389Look up names
390.RE
391.PP
392deletedomuser
393.RS 3n
394Delete domain user
395.RE
396.PP
397samquerysecobj
398.RS 3n
399Query SAMR security object
400.RE
401.PP
402getdompwinfo
403.RS 3n
404Retrieve domain password info
405.RE
406.PP
407lookupdomain
408.RS 3n
409Look up domain
410.RE
411.SS "SPOOLSS"
412.PP
413adddriver <arch> <config> [<version>]
414.RS 3n
415Execute 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
416getdriverdir. Possible values for
417\fIarch\fR
418are the same as those for the
419getdriverdir
420command. The
421\fIconfig\fR
422parameter is defined as follows:
423.sp
424
425.sp
426
427.nf
428
429Long Printer Name:\
430Driver File Name:\
431Data File Name:\
432Config File Name:\
433Help File Name:\
434Language Monitor Name:\
435Default Data Type:\
436Comma Separated list of Files
437
438.fi
439
440.sp
441Any empty fields should be enter as the string "NULL".
442.sp
443Samba 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.
444.sp
445The
446\fIversion\fR
447parameter 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.
448.RE
449.PP
450addprinter <printername> <sharename> <drivername> <port>
451.RS 3n
452Add 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
453adddriver) and the
454\fIport\fRmust be a valid port name (see
455enumports.
456.RE
457.PP
458deldriver
459.RS 3n
460Delete 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.
461.RE
462.PP
463deldriverex <driver> [architecture] [version]
464.RS 3n
465Delete the specified printer driver including driver files. You can limit this action to a specific architecture and a specific version. If no architecure is given, all driver files of that driver will be deleted.
466.RE
467.PP
468enumdata
469.RS 3n
470Enumerate 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).
471.RE
472.PP
473enumdataex
474.RS 3n
475Enumerate printer data for a key
476.RE
477.PP
478enumjobs <printer>
479.RS 3n
480List the jobs and status of a given printer. This command corresponds to the MS Platform SDK EnumJobs() function
481.RE
482.PP
483enumkey
484.RS 3n
485Enumerate printer keys
486.RE
487.PP
488enumports [level]
489.RS 3n
490Executes an EnumPorts() call using the specified info level. Currently only info levels 1 and 2 are supported.
491.RE
492.PP
493enumdrivers [level]
494.RS 3n
495Execute 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.
496.RE
497.PP
498enumprinters [level]
499.RS 3n
500Execute 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.
501.RE
502.PP
503getdata <printername> <valuename;>
504.RS 3n
505Retrieve the data for a given printer setting. See the
506enumdata
507command for more information. This command corresponds to the GetPrinterData() MS Platform SDK function.
508.RE
509.PP
510getdataex
511.RS 3n
512Get printer driver data with keyname
513.RE
514.PP
515getdriver <printername>
516.RS 3n
517Retrieve 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.
518.RE
519.PP
520getdriverdir <arch>
521.RS 3n
522Execute a GetPrinterDriverDirectory() RPC to retrieve the SMB share name and subdirectory for storing printer driver files for a given architecture. Possible values for
523\fIarch\fR
524are "Windows 4.0" (for Windows 95/98), "Windows NT x86", "Windows NT PowerPC", "Windows Alpha_AXP", and "Windows NT R4000".
525.RE
526.PP
527getprinter <printername>
528.RS 3n
529Retrieve the current printer information. This command corresponds to the GetPrinter() MS Platform SDK function.
530.RE
531.PP
532getprintprocdir
533.RS 3n
534Get print processor directory
535.RE
536.PP
537openprinter <printername>
538.RS 3n
539Execute an OpenPrinterEx() and ClosePrinter() RPC against a given printer.
540.RE
541.PP
542setdriver <printername> <drivername>
543.RS 3n
544Execute 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.
545.sp
546See also the
547enumprinters
548and
549enumdrivers
550commands for obtaining a list of of installed printers and drivers.
551.RE
552.PP
553addform
554.RS 3n
555Add form
556.RE
557.PP
558setform
559.RS 3n
560Set form
561.RE
562.PP
563getform
564.RS 3n
565Get form
566.RE
567.PP
568deleteform
569.RS 3n
570Delete form
571.RE
572.PP
573enumforms
574.RS 3n
575Enumerate form
576.RE
577.PP
578setprinter
579.RS 3n
580Set printer comment
581.RE
582.PP
583setprinterdata
584.RS 3n
585Set REG_SZ printer data
586.RE
587.PP
588setprintername <printername> <newprintername>
589.RS 3n
590Set printer name
591.RE
592.PP
593rffpcnex
594.RS 3n
595Rffpcnex test
596.RE
597.SS "NETLOGON"
598.PP
599logonctrl2
600.RS 3n
601Logon Control 2
602.RE
603.PP
604logonctrl
605.RS 3n
606Logon Control
607.RE
608.PP
609samsync
610.RS 3n
611Sam Synchronisation
612.RE
613.PP
614samdeltas
615.RS 3n
616Query Sam Deltas
617.RE
618.PP
619samlogon
620.RS 3n
621Sam Logon
622.RE
623.SS "GENERAL COMMANDS"
624.PP
625debuglevel
626.RS 3n
627Set the current debug level used to log information.
628.RE
629.PP
630help (?)
631.RS 3n
632Print a listing of all known commands or extended help on a particular command.
633.RE
634.PP
635quit (exit)
636.RS 3n
637Exit
638rpcclient.
639.RE
640.SH "BUGS"
641.PP
642rpcclient
643is 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.
644.PP
645From Luke Leighton's original rpcclient man page:
646.PP
647\fBWARNING!\fR
648The 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.
649.PP
650The 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
651\fBsmbd\fR(8)
652and
653\fBrpcclient\fR(1)
654that 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.
655.SH "VERSION"
656.PP
657This man page is correct for version 3.0 of the Samba suite.
658.SH "AUTHOR"
659.PP
660The 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.
661.PP
662The 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.
663
Note: See TracBrowser for help on using the repository browser.