preparing for release of 2.2.0a
[Samba.git] / docs / manpages / rpcclient.1
blobab1639732ab9f1d13d5ebbd71f7495544d4c0f86
1 .\" This manpage has been automatically generated by docbook2man-spec
2 .\" from a DocBook document.  docbook2man-spec can be found at:
3 .\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
4 .\" Please send any bug reports, improvements, comments, patches, 
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH RPCCLIENT 1 "23 Jun 2001" "rpcclient 2.2.0a"
7 .SH NAME
8 rpcclient \- tool for executing client side  MS-RPC functions
9 .SH SYNOPSIS
10 .sp
11 \fBrpcclient\fR \fBserver\fR [ \fB-A authfile\fR ]  [ \fB-c <command string>\fR ]  [ \fB-d debuglevel\fR ]  [ \fB-h\fR ]  [ \fB-l logfile\fR ]  [ \fB-N\fR ]  [ \fB-s <smb config file>\fR ]  [ \fB-U username[%password]\fR ]  [ \fB-W workgroup\fR ]  [ \fB-N\fR ] 
12 .SH "DESCRIPTION"
13 .PP
14 This tool is part of the  Sambasuite.
15 .PP
16 \fBrpcclient\fR is a utility initially developed
17 to test MS-RPC functionality in Samba itself. It has undergone 
18 several stages of development and stability. Many system administrators
19 have now written scripts around it to manage Windows NT clients from 
20 their UNIX workstation. 
21 .SH "OPTIONS"
22 .TP
23 \fBserver\fR
24 NetBIOS name of Server to which to connect. 
25 The server can be any SMB/CIFS server. The name is 
26 resolved using the  \fIname resolve order\fRline from 
27 \fIsmb.conf(5)\fR.
28 .TP
29 \fB-A filename\fR
30 This option allows 
31 you to specify a file from which to read the username and 
32 password used in the connection. The format of the file is 
34 .sp
35 .nf
36                 username = <value> 
37                 password = <value>
38                 domain   = <value>
39                 
40 .sp
41 .fi
43 Make certain that the permissions on the file restrict 
44 access from unwanted users. 
45 .TP
46 \fB-c 'command string'\fR
47 execute semicolon separated commands (listed 
48 below)) 
49 .TP
50 \fB-d debuglevel\fR
51 set the debuglevel. Debug level 0 is the lowest 
52 and 100 being the highest. This should be set to 100 if you are
53 planning on submitting a bug report to the Samba team (see BUGS.txt). 
54 .TP
55 \fB-h\fR
56 Print a summary of command line options.
57 .TP
58 \fB-l logbasename\fR
59 File name for log/debug files. .client will be 
60 appended. The log file is never removed by the client.
61 .TP
62 \fB-N\fR
63 instruct \fBrpcclient\fR not to ask 
64 for a password. By default, \fBrpcclient\fR will prompt 
65 for a password. See also the \fI-U\fR option.
66 .TP
67 \fB-s smb.conf\fR
68 Specifies the location of the all important 
69 \fIsmb.conf\fR file. 
70 .TP
71 \fB-U username[%password]\fR
72 Sets the SMB username or username and password. 
74 If %password is not specified, The user will be prompted. The 
75 client will first check the \fBUSER\fR environment variable, then the 
76 \fBLOGNAME\fR variable and if either exist, the 
77 string is uppercased. If these environmental variables are not 
78 found, the username GUEST is used. 
80 A third option is to use a credentials file which 
81 contains the plaintext of the username and password. This 
82 option is mainly provided for scripts where the admin doesn't 
83 desire to pass the credentials on the command line or via environment 
84 variables. If this method is used, make certain that the permissions 
85 on the file restrict access from unwanted users. See the 
86 \fI-A\fR for more details. 
88 Be cautious about including passwords in scripts. Also, on 
89 many systems the command line of a running process may be seen 
90 via the \fBps\fR command. To be safe always allow 
91 \fBrpcclient\fR to prompt for a password and type 
92 it in directly. 
93 .TP
94 \fB-W domain\fR
95 Set the SMB domain of the username. This 
96 overrides the default domain which is the domain of the 
97 server specified with the \fI-S\fR option. 
98 If the domain specified is the same as the server's NetBIOS name, 
99 it causes the client to log on using the server's local SAM (as 
100 opposed to the Domain SAM). 
101 .SH "COMMANDS"
103 \fBLSARPC\fR
104 .TP 0.2i
105 \(bu
106 \fBlsaquery\fR
107 .TP 0.2i
108 \(bu
109 \fBlookupsids\fR
110 .TP 0.2i
111 \(bu
112 \fBlookupnames\fR
113 .TP 0.2i
114 \(bu
115 \fBenumtrusts\fR
119 \fBSAMR\fR
121 .TP 0.2i
122 \(bu
123 \fBqueryuser\fR
124 .TP 0.2i
125 \(bu
126 \fBquerygroup\fR
127 .TP 0.2i
128 \(bu
129 \fBqueryusergroups\fR
130 .TP 0.2i
131 \(bu
132 \fBquerygroupmem\fR
136 \fBSPOOLSS\fR
138 .TP 0.2i
139 \(bu
140 \fBadddriver <arch> <config>\fR 
141 - Execute an AddPrinterDriver() RPC to install the printer driver 
142 information on the server. Note that the driver files should 
143 already exist in the directory returned by 
144 \fBgetdriverdir\fR. Possible values for 
145 \fIarch\fR are the same as those for 
146 the \fBgetdriverdir\fR command.
147 The \fIconfig\fR parameter is defined as 
148 follows: 
152                 Long Printer Name:\\
153                 Driver File Name:\\
154                 Data File Name:\\
155                 Config File Name:\\
156                 Help File Name:\\
157                 Language Monitor Name:\\
158                 Default Data Type:\\
159                 Comma Separated list of Files
160                 
164 Any empty fields should be enter as the string "NULL". 
166 Samba does not need to support the concept of Print Monitors
167 since these only apply to local printers whose driver can make
168 use of a bi-directional link for communication. This field should 
169 be "NULL". On a remote NT print server, the Print Monitor for a 
170 driver must already be installed prior to adding the driver or 
171 else the RPC will fail. 
172 .TP 0.2i
173 \(bu
174 \fBaddprinter <printername> 
175 <sharename> <drivername> <port>\fR 
176 - Add a printer on the remote server. This printer 
177 will be automatically shared. Be aware that the printer driver 
178 must already be installed on the server (see \fBadddriver\fR) 
179 and the \fIport\fRmust be a valid port name (see
180 \fBenumports\fR.
181 .TP 0.2i
182 \(bu
183 \fBenumdata\fR - Enumerate all 
184 printer setting data stored on the server. On Windows NT clients, 
185 these values are stored in the registry, while Samba servers 
186 store them in the printers TDB. This command corresponds
187 to the MS Platform SDK GetPrinterData() function (* This
188 command is currently unimplemented).
189 .TP 0.2i
190 \(bu
191 \fBenumjobs <printer>\fR 
192 - List the jobs and status of a given printer. 
193 This command corresponds to the MS Platform SDK EnumJobs() 
194 function (* This command is currently unimplemented).
195 .TP 0.2i
196 \(bu
197 \fBenumports [level]\fR 
198 - Executes an EnumPorts() call using the specified 
199 info level. Currently only info levels 1 and 2 are supported. 
200 .TP 0.2i
201 \(bu
202 \fBenumdrivers [level]\fR 
203 - Execute an EnumPrinterDrivers() call. This lists the various installed 
204 printer drivers for all architectures. Refer to the MS Platform SDK 
205 documentation for more details of the various flags and calling 
206 options. Currently supported info levels are 1, 2, and 3.
207 .TP 0.2i
208 \(bu
209 \fBenumprinters [level]\fR 
210 - Execute an EnumPrinters() call. This lists the various installed 
211 and share printers. Refer to the MS Platform SDK documentation for 
212 more details of the various flags and calling options. Currently
213 supported info levels are 0, 1, and 2.
214 .TP 0.2i
215 \(bu
216 \fBgetdata <printername>\fR 
217 - Retrieve the data for a given printer setting. See 
218 the \fBenumdata\fR command for more information. 
219 This command corresponds to the GetPrinterData() MS Platform 
220 SDK function (* This command is currently unimplemented). 
221 .TP 0.2i
222 \(bu
223 \fBgetdriver <printername>\fR 
224 - Retrieve the printer driver information (such as driver file, 
225 config file, dependent files, etc...) for 
226 the given printer. This command corresponds to the GetPrinterDriver()
227 MS Platform SDK function. Currently info level 1, 2, and 3 are supported.
228 .TP 0.2i
229 \(bu
230 \fBgetdriverdir <arch>\fR 
231 - Execute a GetPrinterDriverDirectory()
232 RPC to retreive the SMB share name and subdirectory for 
233 storing printer driver files for a given architecture. Possible 
234 values for \fIarch\fR are "Windows 4.0" 
235 (for Windows 95/98), "Windows NT x86", "Windows NT PowerPC", "Windows
236 Alpha_AXP", and "Windows NT R4000". 
237 .TP 0.2i
238 \(bu
239 \fBgetprinter <printername>\fR 
240 - Retrieve the current printer information. This command 
241 corresponds to the GetPrinter() MS Platform SDK function. 
242 .TP 0.2i
243 \(bu
244 \fBopenprinter <printername>\fR 
245 - Execute an OpenPrinterEx() and ClosePrinter() RPC 
246 against a given printer. 
247 .TP 0.2i
248 \(bu
249 \fBsetdriver <printername> <drivername>\fR 
250 - Execute a SetPrinter() command to update the printer driver associated
251 with an installed printer. The printer driver must already be correctly
252 installed on the print server. 
254 See also the \fBenumprinters\fR and 
255 \fBenumdrivers\fR commands for obtaining a list of
256 of installed printers and drivers.
258 \fBGENERAL OPTIONS\fR
260 .TP 0.2i
261 \(bu
262 \fBdebuglevel\fR - Set the current debug level
263 used to log information.
264 .TP 0.2i
265 \(bu
266 \fBhelp (?)\fR - Print a listing of all 
267 known commands or extended help on a particular command. 
268 .TP 0.2i
269 \(bu
270 \fBquit (exit)\fR - Exit \fBrpcclient
271 \fR\&.
272 .SH "BUGS"
274 \fBrpcclient\fR is designed as a developer testing tool 
275 and may not be robust in certain areas (such as command line parsing). 
276 It has been known to generate a core dump upon failures when invalid 
277 parameters where passed to the interpreter. 
279 From Luke Leighton's original rpcclient man page:
281 \fB"WARNING!\fR The MSRPC over SMB code has 
282 been developed from examining Network traces. No documentation is 
283 available from the original creators (Microsoft) on how MSRPC over 
284 SMB works, or how the individual MSRPC services work. Microsoft's 
285 implementation of these services has been demonstrated (and reported) 
286 to be... a bit flakey in places. 
288 The development of Samba's implementation is also a bit rough, 
289 and as more of the services are understood, it can even result in 
290 versions of \fBsmbd(8)\fR and \fBrpcclient(1)\fR 
291 that are incompatible for some commands or services. Additionally, 
292 the developers are sending reports to Microsoft, and problems found 
293 or reported to Microsoft are fixed in Service Packs, which may 
294 result in incompatibilities." 
295 .SH "VERSION"
297 This man page is correct for version 2.2 of the Samba 
298 suite.
299 .SH "AUTHOR"
301 The original Samba software and related utilities 
302 were created by Andrew Tridgell. Samba is now developed
303 by the Samba Team as an Open Source project similar 
304 to the way the Linux kernel is developed.
306 The original rpcclient man page was written by Matthew 
307 Geddes, Luke Kenneth Casson, and rewriten by Gerald Carter. 
308 The conversion to DocBook for Samba 2.2 was done by Gerald 
309 Carter.