This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[ira/wip.git] / docs / docbook / manpages / rpcclient.1.xml
1 <?xml version="1.0" encoding="iso8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3                   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4
5 <!ENTITY % globalentities SYSTEM './../global.ent'> %globalentities;
6 ]>
7 <refentry id="rpcclient.1">
8
9 <refmeta>
10         <refentrytitle>rpcclient</refentrytitle>
11         <manvolnum>1</manvolnum>
12 </refmeta>
13
14
15 <refnamediv>
16         <refname>rpcclient</refname>
17         <refpurpose>tool for executing client side 
18         MS-RPC functions</refpurpose>
19 </refnamediv>
20
21 <refsynopsisdiv>
22         <cmdsynopsis>
23                 <command>rpcclient</command>
24                 <arg choice="opt">-A authfile</arg>
25                 <arg choice="opt">-c &lt;command string&gt;</arg>
26                 <arg choice="opt">-d debuglevel</arg>
27                 <arg choice="opt">-h</arg>
28                 <arg choice="opt">-l logfile</arg>
29                 <arg choice="opt">-N</arg>
30                 <arg choice="opt">-s &lt;smb config file&gt;</arg>
31                 <arg choice="opt">-U username[%password]</arg>
32                 <arg choice="opt">-W workgroup</arg>
33                 <arg choice="opt">-N</arg>
34                 <arg choice="opt">-I destinationIP</arg>
35                 <arg choice="req">server</arg>
36         </cmdsynopsis>
37 </refsynopsisdiv>
38
39 <refsect1>
40         <title>DESCRIPTION</title>
41
42         <para>This tool is part of the <citerefentry><refentrytitle>Samba</refentrytitle>
43         <manvolnum>7</manvolnum></citerefentry> suite.</para>
44
45         <para><command>rpcclient</command> is a utility initially developed
46         to test MS-RPC functionality in Samba itself.  It has undergone 
47         several stages of development and stability.  Many system administrators
48         have now written scripts around it to manage Windows NT clients from 
49         their UNIX workstation. </para>
50 </refsect1>
51
52
53 <refsect1>
54         <title>OPTIONS</title>
55
56         <variablelist>
57                 <varlistentry>
58                 <term>server</term>
59                 <listitem><para>NetBIOS name of Server to which to connect. 
60                 The server can be  any SMB/CIFS server.  The name is 
61                 resolved using the <ulink url="smb.conf.5.html#NAMERESOLVEORDER">
62                 <parameter>name resolve order</parameter></ulink> line from <citerefentry><refentrytitle>smb.conf</refentrytitle>
63         <manvolnum>5</manvolnum></citerefentry>.</para></listitem>
64         </varlistentry>
65
66
67                 <varlistentry>
68                 <term>-c|--command='command string'</term>
69                 <listitem><para>execute semicolon separated commands (listed 
70                 below)) </para></listitem>
71                 </varlistentry>
72
73                 
74                 <varlistentry>
75                 <term>-I IP-address</term>
76                 <listitem><para><replaceable>IP address</replaceable> is the address of the server to connect to. 
77                 It should be specified in standard "a.b.c.d" notation. </para>
78
79                 <para>Normally the client would attempt to locate a named 
80                 SMB/CIFS server by looking it up via the NetBIOS name resolution 
81                 mechanism described above in the <parameter>name resolve order</parameter> 
82                 parameter above. Using this parameter will force the client
83                 to assume that the server is on the machine with the specified IP 
84                 address and the NetBIOS name component of the resource being 
85                 connected to will be ignored. </para>
86
87                 <para>There is no default for this parameter. If not supplied, 
88                 it will be determined automatically by the client as described 
89                 above. </para></listitem>
90                 </varlistentry>
91
92                 &popt.common.samba;
93                 &popt.common.credentials;               
94                 &popt.common.connection;
95                 &stdarg.help;
96         </variablelist>
97 </refsect1>
98
99
100 <refsect1>
101         <title>COMMANDS</title>
102
103         <refsect2>
104         <title>LSARPC</title>
105
106         <variablelist>
107                 <varlistentry><term>lsaquery</term><listitem><para>Query info policy</para></listitem></varlistentry>
108                 
109                 <varlistentry><term>lookupsids</term><listitem><para>Resolve a list 
110                 of SIDs to usernames.
111                 </para></listitem></varlistentry>
112                 
113                 <varlistentry><term>lookupnames</term><listitem><para>Resolve a list 
114                 of usernames to SIDs.
115                 </para></listitem></varlistentry>
116                 
117                 <varlistentry><term>enumtrusts</term><listitem><para>Enumerate trusted domains</para></listitem></varlistentry>
118
119                 <varlistentry><term>enumprivs</term><listitem><para>Enumerate privileges</para></listitem></varlistentry>
120
121                 <varlistentry><term>getdispname</term><listitem><para>Get the privilege name</para></listitem></varlistentry>
122
123                 <varlistentry><term>lsaenumsid</term><listitem><para>Enumerate the LSA SIDS</para></listitem></varlistentry>
124
125                 <varlistentry><term>lsaenumprivsaccount</term><listitem><para>Enumerate the privileges of an SID</para></listitem></varlistentry>
126
127                 <varlistentry><term>lsaenumacctrights</term><listitem><para>Enumerate the rights of an SID</para></listitem></varlistentry>
128
129                 <varlistentry><term>lsaenumacctwithright</term><listitem><para>Enumerate accounts with a right</para></listitem></varlistentry>
130
131                 <varlistentry><term>lsaaddacctrights</term><listitem><para>Add rights to an account</para></listitem></varlistentry>
132
133                 <varlistentry><term>lsaremoveacctrights</term><listitem><para>Remove rights from an account</para></listitem></varlistentry>
134
135                 <varlistentry><term>lsalookupprivvalue</term><listitem><para>Get a privilege value given its name</para></listitem></varlistentry>
136
137                 <varlistentry><term>lsaquerysecobj</term><listitem><para>Query LSA security object</para></listitem></varlistentry>
138
139         </variablelist> 
140         </refsect2>
141         
142         <refsect2>
143         <title>LSARPC-DS</title>
144         
145         <variablelist>
146                 <varlistentry><term>dsroledominfo</term><listitem><para>Get Primary Domain Information</para></listitem></varlistentry>
147         </variablelist>
148
149         <para> </para>
150
151         <para><emphasis>DFS</emphasis></para>
152         <variablelist>
153                 <varlistentry><term>dfsexist</term><listitem><para>Query DFS support</para></listitem></varlistentry>
154                 <varlistentry><term>dfsadd</term><listitem><para>Add a DFS share</para></listitem></varlistentry>
155                 <varlistentry><term>dfsremove</term><listitem><para>Remove a DFS share</para></listitem></varlistentry>
156                 <varlistentry><term>dfsgetinfo</term><listitem><para>Query DFS share info</para></listitem></varlistentry>
157                 <varlistentry><term>dfsenum</term><listitem><para>Enumerate dfs shares</para></listitem></varlistentry>
158         </variablelist>
159
160         </refsect2>
161
162         <refsect2>
163         <title>REG</title>
164         <variablelist>
165                 <varlistentry><term>shutdown</term><listitem><para>Remote Shutdown</para></listitem></varlistentry>
166                 <varlistentry><term>abortshutdown</term><listitem><para>Abort Shutdown</para></listitem></varlistentry>
167         </variablelist>
168
169         </refsect2>
170
171         <refsect2>
172         <title>SRVSVC</title>
173
174         <variablelist>
175                 <varlistentry><term>srvinfo</term><listitem><para>Server query info</para></listitem></varlistentry>
176                 
177                 <varlistentry><term>netshareenum</term><listitem><para>Enumerate shares</para></listitem></varlistentry>
178
179                 <varlistentry><term>netfileenum</term><listitem><para>Enumerate open files</para></listitem></varlistentry>
180                 
181                 <varlistentry><term>netremotetod</term><listitem><para>Fetch remote time of day</para></listitem></varlistentry>
182                 
183         </variablelist>
184
185         </refsect2>
186
187         <refsect2>
188         <title>SAMR</title>
189
190         <variablelist>
191                 <varlistentry><term>queryuser</term><listitem><para>Query user info</para></listitem></varlistentry>
192                 <varlistentry><term>querygroup</term><listitem><para>Query group info</para></listitem></varlistentry>
193                 <varlistentry><term>queryusergroups</term><listitem><para>Query user groups</para></listitem></varlistentry>
194                 <varlistentry><term>querygroupmem</term><listitem><para>Query group membership</para></listitem></varlistentry>
195                 <varlistentry><term>queryaliasmem</term><listitem><para>Query alias membership</para></listitem></varlistentry>
196                 <varlistentry><term>querydispinfo</term><listitem><para>Query display info</para></listitem></varlistentry>
197                 <varlistentry><term>querydominfo</term><listitem><para>Query domain info</para></listitem></varlistentry>
198                 <varlistentry><term>enumdomusers</term><listitem><para>Enumerate domain users</para></listitem></varlistentry>
199                 <varlistentry><term>enumdomgroups</term><listitem><para>Enumerate domain groups</para></listitem></varlistentry>
200                 <varlistentry><term>enumalsgroups</term><listitem><para>Enumerate alias groups</para></listitem></varlistentry>
201                 <varlistentry><term>createdomuser</term><listitem><para>Create domain user</para></listitem></varlistentry>
202                 <varlistentry><term>samlookupnames</term><listitem><para>Look up names</para></listitem></varlistentry>
203                 <varlistentry><term>samlookuprids</term><listitem><para>Look up names</para></listitem></varlistentry>
204                 <varlistentry><term>deletedomuser</term><listitem><para>Delete domain user</para></listitem></varlistentry>
205                 <varlistentry><term>samquerysecobj</term><listitem><para>Query SAMR security object</para></listitem></varlistentry>
206                 <varlistentry><term>getdompwinfo</term><listitem><para>Retrieve domain password info</para></listitem></varlistentry>
207                 <varlistentry><term>lookupdomain</term><listitem><para>Look up domain</para></listitem></varlistentry>
208         </variablelist>
209
210         </refsect2>
211
212         <refsect2>
213         <title>SPOOLSS</title>
214
215         <variablelist>
216                 <varlistentry><term>adddriver &lt;arch&gt; &lt;config&gt;</term> 
217                 <listitem><para>
218                 Execute an AddPrinterDriver() RPC to install the printer driver 
219                 information on the server.  Note that the driver files should 
220                 already exist in the directory returned by  
221                 <command>getdriverdir</command>.  Possible values for 
222                 <parameter>arch</parameter> are the same as those for 
223                 the <command>getdriverdir</command> command.
224                 The <parameter>config</parameter> parameter is defined as 
225                 follows: </para>
226                 
227 <para><programlisting>
228 Long Printer Name:\
229 Driver File Name:\
230 Data File Name:\
231 Config File Name:\
232 Help File Name:\
233 Language Monitor Name:\
234 Default Data Type:\
235 Comma Separated list of Files
236 </programlisting></para>
237
238                 <para>Any empty fields should be enter as the string "NULL". </para>
239                 
240                 <para>Samba does not need to support the concept of Print Monitors
241                 since these only apply to local printers whose driver can make
242                 use of a bi-directional link for communication.  This field should 
243                 be "NULL".   On a remote NT print server, the Print Monitor for a 
244                 driver must already be installed prior to adding the driver or 
245                 else the RPC will fail. </para></listitem></varlistentry>
246         
247                 <varlistentry><term>addprinter &lt;printername&gt; 
248                 &lt;sharename&gt; &lt;drivername&gt; &lt;port&gt;</term>
249                 <listitem><para>
250                 Add a printer on the remote server.  This printer 
251                 will be automatically shared.  Be aware that the printer driver 
252                 must already be installed on the server (see <command>adddriver</command>) 
253                 and the <parameter>port</parameter>must be a valid port name (see
254                 <command>enumports</command>.</para>
255                 </listitem></varlistentry>
256
257
258                 <varlistentry><term>deldriver</term><listitem><para>Delete the 
259                 specified printer driver for all architectures.  This
260                 does not delete the actual driver files from the server,
261                 only the entry from the server's list of drivers.
262                 </para></listitem></varlistentry>
263
264                 <varlistentry><term>enumdata</term><listitem><para>Enumerate all 
265                 printer setting data stored on the server. On Windows NT  clients, 
266                 these values are stored  in the registry, while Samba servers 
267                 store them in the printers TDB.  This command corresponds
268                 to the MS Platform SDK GetPrinterData() function (* This
269                 command is currently unimplemented).</para></listitem></varlistentry>
270
271                 <varlistentry><term>enumdataex</term><listitem><para>Enumerate printer data for a key</para></listitem></varlistentry>
272
273                 <varlistentry><term>enumjobs &lt;printer&gt;</term>
274                 <listitem><para>List the jobs and status of a given printer. 
275                 This command corresponds to the MS Platform SDK EnumJobs() 
276                 function</para></listitem></varlistentry>
277
278                 <varlistentry><term>enumkey</term><listitem><para>Enumerate
279                 printer keys</para></listitem></varlistentry>
280                 
281                 <varlistentry><term>enumports [level]</term>
282                 <listitem><para>
283                 Executes an EnumPorts() call using the specified 
284                 info level. Currently only info levels 1 and 2 are supported. 
285                 </para></listitem></varlistentry>
286
287
288
289                 <varlistentry><term>enumdrivers [level]</term> 
290                 <listitem><para>
291                 Execute an EnumPrinterDrivers() call.  This lists the various installed 
292                 printer drivers for all architectures.  Refer to the MS Platform SDK 
293                 documentation for more details of the various flags and calling 
294                 options. Currently supported info levels are 1, 2, and 3.</para></listitem></varlistentry>
295
296
297
298                 <varlistentry><term>enumprinters [level]</term>
299                 <listitem><para>Execute an EnumPrinters() call.  This lists the various installed 
300                 and share printers.  Refer to the MS Platform SDK documentation for 
301                 more details of the various flags and calling options. Currently
302                 supported info levels are 0, 1, and 2.</para></listitem></varlistentry>
303
304
305
306
307                 <varlistentry><term>getdata &lt;printername&gt; &lt;valuename;&gt;</term> 
308                 <listitem><para>Retrieve the data for a given printer setting.  See 
309                 the  <command>enumdata</command> command for more information.  
310                 This command corresponds to the GetPrinterData() MS Platform 
311                 SDK function. </para></listitem></varlistentry>
312
313                 <varlistentry><term>getdataex</term><listitem><para>Get
314                 printer driver data with
315                 keyname</para></listitem></varlistentry>
316
317                 
318                 <varlistentry><term>getdriver &lt;printername&gt;</term>
319                 <listitem><para>
320                 Retrieve the printer driver information (such as driver file, 
321                 config file, dependent files, etc...) for 
322                 the given printer. This command corresponds to the GetPrinterDriver()
323                 MS Platform  SDK function. Currently info level 1, 2, and 3 are supported.
324                 </para></listitem></varlistentry>
325         
326
327                 <varlistentry><term>getdriverdir &lt;arch&gt;</term>
328                 <listitem><para>
329                 Execute a GetPrinterDriverDirectory()
330                 RPC to retrieve the SMB share name and subdirectory for 
331                 storing printer driver files for a given architecture.  Possible 
332                 values for <parameter>arch</parameter> are "Windows 4.0" 
333                 (for Windows 95/98), "Windows NT x86", "Windows NT PowerPC", "Windows
334                 Alpha_AXP", and "Windows NT R4000". </para></listitem></varlistentry>
335
336
337
338                 <varlistentry><term>getprinter &lt;printername&gt;</term> 
339                 <listitem><para>Retrieve the current printer information.  This command 
340                 corresponds to the GetPrinter() MS Platform SDK function. 
341                 </para></listitem></varlistentry>
342
343                 <varlistentry><term>getprintprocdir</term><listitem><para>Get
344                 print processor
345                 directory</para></listitem></varlistentry>
346                 
347                 <varlistentry><term>openprinter &lt;printername&gt;</term> 
348                 <listitem><para>Execute an OpenPrinterEx() and ClosePrinter() RPC 
349                 against a given printer. </para></listitem></varlistentry>
350
351                 <varlistentry><term>setdriver &lt;printername&gt;
352                 &lt;drivername&gt;</term>
353                 <listitem><para>Execute a SetPrinter() command to update the printer driver
354                 associated with an installed printer.  The printer driver must
355                 already be correctly installed on the print server.  </para>
356
357                 <para>See also the <command>enumprinters</command> and 
358                 <command>enumdrivers</command> commands for obtaining a list of
359                 of installed printers and drivers.</para></listitem></varlistentry>
360
361                 <varlistentry><term>addform</term><listitem><para>Add form</para></listitem></varlistentry>
362                 <varlistentry><term>setform</term><listitem><para>Set form</para></listitem></varlistentry>
363                 <varlistentry><term>getform</term><listitem><para>Get form</para></listitem></varlistentry>
364                 <varlistentry><term>deleteform</term><listitem><para>Delete form</para></listitem></varlistentry>
365                 <varlistentry><term>enumforms</term><listitem><para>Enumerate form</para></listitem></varlistentry>
366                 <varlistentry><term>setprinter</term><listitem><para>Set printer comment</para></listitem></varlistentry>
367                 <varlistentry><term>setprinterdata</term><listitem><para>Set REG_SZ printer data</para></listitem></varlistentry>
368                 <varlistentry><term>rffpcnex</term><listitem><para>Rffpcnex test</para></listitem></varlistentry>
369                 
370
371         </variablelist>
372
373         </refsect2>
374
375         <refsect2>
376         <title>NETLOGON</title>
377
378         <variablelist>
379
380         <varlistentry><term>logonctrl2</term>
381         <listitem><para>Logon Control 2</para></listitem>
382         </varlistentry>
383
384         <varlistentry><term>logonctrl</term>
385         <listitem><para>Logon Control</para></listitem>
386         </varlistentry>
387
388         <varlistentry><term>samsync</term>
389         <listitem><para>Sam Synchronisation</para></listitem>
390         </varlistentry>
391
392         <varlistentry><term>samdeltas</term>
393         <listitem><para>Query Sam Deltas</para></listitem>
394         </varlistentry>
395
396         <varlistentry><term>samlogon</term>
397         <listitem><para>Sam Logon</para></listitem>
398         </varlistentry>
399
400         </variablelist>
401         </refsect2>
402
403         <refsect2>
404         <title>GENERAL COMMANDS</title>
405
406         <variablelist>
407                 <varlistentry><term>debuglevel</term><listitem><para>Set the current
408                 debug level used to log information.</para></listitem></varlistentry>
409
410                 <varlistentry><term>help (?)</term><listitem><para>Print a listing of all 
411                 known commands or extended help  on a particular command. 
412                 </para></listitem></varlistentry>
413                 
414                 <varlistentry><term>quit (exit)</term><listitem><para>Exit <command>rpcclient
415                 </command>.</para></listitem></varlistentry>
416         </variablelist>
417         </refsect2>
418
419 </refsect1>
420
421 <refsect1>
422         <title>BUGS</title>
423         
424         <para><command>rpcclient</command> is designed as a developer testing tool 
425         and may not be robust in certain areas (such as command line parsing).  
426         It has been known to  generate a core dump upon failures when invalid 
427         parameters where passed to the interpreter. </para>
428
429         <para>From Luke Leighton's original rpcclient man page:</para>
430         
431         <para><emphasis>WARNING!</emphasis> The MSRPC over SMB code has 
432         been developed from examining  Network traces. No documentation is 
433         available from the original creators  (Microsoft) on how MSRPC over 
434         SMB works, or how the individual MSRPC services  work. Microsoft's 
435         implementation of these services has been demonstrated  (and reported) 
436         to be... a bit flaky in places. </para>
437
438         <para>The development of Samba's implementation is also a bit rough, 
439         and as more of the services are understood, it can even result in 
440         versions of <citerefentry><refentrytitle>smbd</refentrytitle>
441         <manvolnum>8</manvolnum></citerefentry> and <citerefentry><refentrytitle>rpcclient</refentrytitle>
442         <manvolnum>1</manvolnum></citerefentry> that are incompatible for some commands or  services. Additionally, 
443         the developers are sending reports to Microsoft,  and problems found 
444         or reported to Microsoft are fixed in Service Packs,  which may 
445         result in incompatibilities.</para>
446 </refsect1>
447
448
449 <refsect1>
450         <title>VERSION</title>
451
452         <para>This man page is correct for version 3.0 of the Samba 
453         suite.</para>
454 </refsect1>
455
456 <refsect1>
457         <title>AUTHOR</title>
458         
459         <para>The original Samba software and related utilities 
460         were created by Andrew Tridgell. Samba is now developed
461         by the Samba Team as an Open Source project similar 
462         to the way the Linux kernel is developed.</para>
463         
464         <para>The original rpcclient man page was written by Matthew 
465         Geddes, Luke Kenneth Casson Leighton, and rewritten by Gerald Carter.  
466         The conversion to DocBook for Samba 2.2 was done by Gerald 
467         Carter. The conversion to DocBook XML 4.2 for Samba 3.0 was
468         done by Alexander Bokovoy.</para>
469 </refsect1>
470
471 </refentry>