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