65517c84fb9f953c63240da16cdc59b274797f30
[bbaumbach/samba-autobuild/.git] / docs / manpages / rpcclient.1
1 .TH "rpcclient " "1" "23 Oct 1998" "Samba" "SAMBA" 
2 .PP 
3 .SH "NAME" 
4 rpcclient \- utility to manage MSRPC resources on servers
5 .PP 
6 .SH "SYNOPSIS" 
7 .PP 
8 \fBrpcclient\fP
9 [password]
10 -S servername
11 [-U [username][%][password]]
12 [-W domain]
13 [-l log basename]
14 [-d debuglevel]
15 [-O socket options]
16 [-i scope]
17 [-N]
18 [-n NetBIOS name]
19 [-h]
20 [-I dest IP]
21 [-E]
22 [-t terminal code]
23 [-c command string]
24 [-B IP addr]
25 [-s smb\&.conf]
26 [-m max protocol]
27 .PP 
28 .SH "DESCRIPTION" 
29 .PP 
30 This program is part of the \fBSamba\fP suite\&.
31 .PP 
32 \fBrpcclient\fP is a client that can \'talk\' to an SMB/CIFS MSRPC server\&.
33 Operations include things like managing a SAM Database (users, groups
34 and aliases) in the same way as the Windows NT programs
35 \fBUser Manager for Domains\fP and \fBServer Manager for Domains\fP;
36 managing a remote registry in the same way as the Windows NT programs
37 \fBREGEDT32\&.EXE\fP and \fBREGEDIT\&.EXE\fP; viewing a remote event log (same
38 as \fBEVENTVWR\&.EXE\fP) etc\&.
39 .PP 
40 Typical usage is like this: 
41 .br 
42 \f(CWrpcclient -I 192\&.168\&.32\&.1 -S "*SMBSERVER" -U fred%secret -l log\fP
43 .br 
44 .PP 
45 .SH "OPTIONS" 
46 .PP 
47 .IP 
48 .IP "\fBservername\fP" 
49 servername is the name of the server you want
50 to use on the server\&.  This should be the NetBIOS name of the SMB/CIFS
51 server, which can be \fB*SMBSERVER\fP on Windows NT 4\&.0 or Samba Servers\&.
52 .IP 
53 Note that the server name required is NOT necessarily the IP (DNS)
54 host name of the server! The name required is a NetBIOS server name,
55 which may or may not be the same as the IP hostname of the machine
56 running the server\&.  Also, remember that having a period in a NetBIOS
57 name (such as an IP hostname) may cause connectivity problems on your
58 network: NT tends to strip NetBIOS names from the leading period
59 onwards\&.
60 .IP 
61 The server name is looked up according to either the
62 \fB-R\fP parameter to \fBrpcclient\fP or using the
63 \fBname resolve order\fP
64 parameter in the smb\&.conf file, allowing an administrator to change
65 the order and methods by which server names are looked up\&.
66 .IP 
67 .IP "\fBpassword\fP" 
68 password is the password required to access the
69 specified service on the specified server\&. If this parameter is
70 supplied, the \fB-N\fP option (suppress password prompt) is assumed\&.
71 .IP 
72 There is no default password\&. If no password is supplied on the
73 command line (either by using this parameter or adding a password to
74 the \fB-U\fP option (see below)) and the \fB-N\fP option is not specified,
75 the client will prompt for a password, even if the desired service
76 does not require one\&. (If no password is required, simply press ENTER
77 to provide a null password\&.)
78 .IP 
79 Note: Some servers (including OS/2 and Windows for Workgroups) insist
80 on an uppercase password\&. Lowercase or mixed case passwords may be
81 rejected by these servers\&.
82 .IP 
83 Be cautious about including passwords in scripts\&.
84 .IP 
85 .IP "\fB-s smb\&.conf\fP" 
86 This parameter specifies the pathname to the
87 Samba configuration file, smb\&.conf\&. This file controls all aspects of
88 the Samba setup on the machine and rpcclient also needs to read this
89 file\&.
90 .IP 
91 .IP "\fB-B IP addr\fP" 
92 The IP address to use when sending a broadcast packet\&.
93 .IP 
94 .IP "\fB-O socket options\fP" 
95 TCP socket options to set on the client
96 socket\&. See the socket options
97 parameter in the \fBsmb\&.conf (5)\fP manpage for
98 the list of valid options\&.
99 .IP 
100 .IP "\fB-R name resolve order\fP" 
101 This option allows the user of
102 rpcclient to determine what name resolution services to use when
103 looking up the NetBIOS name of the host being connected to\&.
104 .IP 
105 The options are :"lmhosts", "host", "wins" and "bcast"\&. They cause
106 names to be resolved as follows :
107 .IP 
108 .IP 
109 .IP o 
110 \fBlmhosts\fP : Lookup an IP address in the Samba lmhosts file\&.
111 The lmhosts file is stored in the same directory as the
112 \fBsmb\&.conf\fP file\&.
113 .IP 
114 .IP o 
115 \fBhost\fP : Do a standard host name to IP address resolution,
116 using the system /etc/hosts, NIS, or DNS lookups\&. This method of name
117 resolution is operating system depended for instance on IRIX or
118 Solaris this may be controlled by the \fI/etc/nsswitch\&.conf\fP file)\&.  
119 .IP 
120 .IP o 
121 \fBwins\fP : Query a name with the IP address listed in the \fBwins
122 server\fP parameter in the smb\&.conf file\&. If 
123 no WINS server has been specified this method will be ignored\&.
124 .IP 
125 .IP o 
126 \fBbcast\fP : Do a broadcast on each of the known local interfaces
127 listed in the \fBinterfaces\fP parameter
128 in the smb\&.conf file\&. This is the least reliable of the name resolution
129 methods as it depends on the target host being on a locally connected
130 subnet\&. To specify a particular broadcast address the \fB-B\fP option 
131 may be used\&.
132 .IP 
133 .IP 
134 If this parameter is not set then the name resolve order defined
135 in the \fBsmb\&.conf\fP file parameter 
136 (\fBname resolve order\fP)
137 will be used\&.
138 .IP 
139 The default order is lmhosts, host, wins, bcast and without this
140 parameter or any entry in the \fB"name resolve
141 order"\fP parameter of the
142 \fBsmb\&.conf\fP file the name resolution methods
143 will be attempted in this order\&.
144 .IP 
145 .IP "\fB-i scope\fP" 
146 This specifies a NetBIOS scope that rpcclient will use
147 to communicate with when generating NetBIOS names\&. For details on the
148 use of NetBIOS scopes, see rfc1001\&.txt and rfc1002\&.txt\&. NetBIOS scopes
149 are \fIvery\fP rarely used, only set this parameter if you are the
150 system administrator in charge of all the NetBIOS systems you
151 communicate with\&.
152 .IP 
153 .IP "\fB-N\fP" 
154 If specified, this parameter suppresses the normal
155 password prompt from the client to the user\&. This is useful when
156 accessing a service that does not require a password\&.
157 .IP 
158 Unless a password is specified on the command line or this parameter
159 is specified, the client will request a password\&.
160 .IP 
161 .IP "\fB-n NetBIOS name\fP" 
162 By default, the client will use the local
163 machine\'s hostname (in uppercase) as its NetBIOS name\&. This parameter
164 allows you to override the host name and use whatever NetBIOS name you
165 wish\&.
166 .IP 
167 .IP "\fB-d debuglevel\fP" 
168 debuglevel is an integer from 0 to 10, or the
169 letter \'A\'\&.
170 .IP 
171 The default value if this parameter is not specified is zero\&.
172 .IP 
173 The higher this value, the more detail will be logged to the log files
174 about the activities of the client\&. At level 0, only critical errors
175 and serious warnings will be logged\&. Level 1 is a reasonable level for
176 day to day running - it generates a small amount of information about
177 operations carried out\&.
178 .IP 
179 Levels above 1 will generate considerable amounts of log data, and
180 should only be used when investigating a problem\&. Levels above 3 are
181 designed for use only by developers and generate HUGE amounts of log
182 data, most of which is extremely cryptic\&. If debuglevel is set to the
183 letter \'A\', then \fIall\fP debug messages will be printed\&. This setting
184 is for developers only (and people who \fIreally\fP want to know how the
185 code works internally)\&.
186 .IP 
187 Note that specifying this parameter here will override the \fBlog
188 level\fP parameter in the \fBsmb\&.conf
189 (5)\fP file\&.
190 .IP 
191 .IP "\fB-p port\fP" 
192 This number is the TCP port number that will be used
193 when making connections to the server\&. The standard (well-known) TCP
194 port number for an SMB/CIFS server is 139, which is the default\&.
195 .IP 
196 .IP "\fB-l logfilename\fP" 
197 If specified, logfilename specifies a base
198 filename into which operational data from the running client will be
199 logged\&.
200 .IP 
201 The default base name is specified at compile time\&.
202 .IP 
203 The base name is used to generate actual log file names\&. For example,
204 if the name specified was "log", the debug file would be
205 \f(CWlog\&.client\fP\&.
206 .IP 
207 The log file generated is never removed by the client\&.
208 .IP 
209 .IP "\fB-h\fP" 
210 Print the usage message for the client\&.
211 .IP 
212 .IP "\fB-I IP address\fP" 
213 IP address is the address of the server to
214 connect to\&. It should be specified in standard "a\&.b\&.c\&.d" notation\&.
215 .IP 
216 Normally the client would attempt to locate a named SMB/CIFS server by
217 looking it up via the NetBIOS name resolution mechanism described
218 above in the \fBname resolve order\fP parameter
219 above\&. Using this parameter will force the client to assume that the
220 server is on the machine with the specified IP address and the NetBIOS
221 name component of the resource being connected to will be ignored\&.
222 .IP 
223 There is no default for this parameter\&. If not supplied, it will be
224 determined automatically by the client as described above\&.
225 .IP 
226 .IP "\fB-E\fP" 
227 This parameter causes the client to write messages to the
228 standard error stream (stderr) rather than to the standard output
229 stream\&.
230 .IP 
231 By default, the client writes messages to standard output - typically
232 the user\'s tty\&.
233 .IP 
234 Note that by default, debug information is always sent to stderr\&.
235 Debug information can instead be sent to a file, using the
236 -l log basename option\&.
237 .IP 
238 .IP "\fB-U username\fP" 
239 This specifies the user name that will be used by
240 the client to make a connection, assuming your server is not a downlevel
241 server that is running a protocol level that uses passwords on shares,
242 not on usernames\&.
243 .IP 
244 Some servers are fussy about the case of this name, and some insist
245 that it must be a valid NetBIOS name\&.
246 .IP 
247 If no username is supplied, it will default to an uppercase version of
248 the environment variable \f(CWUSER\fP or \f(CWLOGNAME\fP in that order\&.  If no
249 username is supplied and neither environment variable exists the
250 username "GUEST" will be used\&.
251 .IP 
252 If the \f(CWUSER\fP environment variable contains a \'%\' character,
253 everything after that will be treated as a password\&. This allows you
254 to set the environment variable to be \f(CWUSER=username%password\fP so
255 that a password is not passed on the command line (where it may be
256 seen by the ps command)\&.
257 .IP 
258 If the service you are connecting to requires a password, it can be
259 supplied using the \fB-U\fP option, by appending a percent symbol ("%")
260 then the password to username\&.  For example, to attach to a service as
261 user \f(CW"fred"\fP with password \f(CW"secret"\fP, you would specify\&. 
262 .br 
263 .IP 
264 \f(CW-U fred%secret\fP 
265 .br 
266 .IP 
267 on the command line\&. Note that there are no spaces around the percent
268 symbol\&.
269 .IP 
270 If you specify the password as part of username then the \fB-N\fP option
271 (suppress password prompt) is assumed\&.
272 .IP 
273 If you specify the password as a parameter \fIAND\fP as part of username
274 then the password as part of username will take precedence\&. Putting
275 nothing before or nothing after the percent symbol will cause an empty
276 username or an empty password to be used, respectively\&.
277 .IP 
278 The password may also be specified by setting up an environment
279 variable called \f(CWPASSWORD\fP that contains the users password\&. Note
280 that this may be very insecure on some systems but on others allows
281 users to script rpcclient commands without having a password appear in
282 the command line of a process listing\&.
283 .IP 
284 Note: Some servers (including OS/2 and Windows for Workgroups) insist
285 on an uppercase password\&. Lowercase or mixed case passwords may be
286 rejected by these servers\&.
287 .IP 
288 Be cautious about including passwords in scripts or in the
289 \f(CWPASSWORD\fP environment variable\&. Also, on many systems the command
290 line of a running process may be seen via the \f(CWps\fP command to be
291 safe always allow rpcclient to prompt for a password and type it in
292 directly\&.
293 .IP 
294 .IP "\fB-t terminal code\fP" 
295 This option tells rpcclient how to interpret
296 filenames coming from the remote server\&. Usually Asian language
297 multibyte UNIX implementations use different character sets than
298 SMB/CIFS servers (\fIEUC\fP instead of \fISJIS\fP for example)\&. Setting
299 this parameter will let rpcclient convert between the UNIX filenames
300 and the SMB filenames correctly\&. This option has not been seriously
301 tested and may have some problems\&.
302 .IP 
303 The terminal codes include \f(CWsjis\fP, \f(CWeuc\fP, \f(CWjis7\fP, \f(CWjis8\fP,
304 \f(CWjunet\fP, \f(CWhex\fP, \f(CWcap\fP\&. This is not a complete list, check the
305 Samba source code for the complete list\&.
306 .IP 
307 .IP "\fB-m max protocol level\fP" 
308 With the new code in Samba2\&.0,
309 \fBrpcclient\fP always attempts to connect at the maximum
310 protocols level the server supports\&. This parameter is
311 preserved for backwards compatibility, but any string
312 following the \fB-m\fP will be ignored\&.
313 .IP 
314 .IP "\fB-W Domain\fP" 
315 Override the default Domain, which is the remote server\'s
316 Domain\&.  This option may be needed to connect to some servers\&.  It is also
317 possible to specify the remote server name as the Domain, which will
318 force the username and password to be authenticated against the remote
319 server\'s local SAM instead of the Domain SAM\&.
320 .IP 
321 .IP "\fB-c command string\fP" 
322 command string is a semicolon separated
323 list of commands to be executed instead of prompting from stdin\&.
324 \fB-N\fP is implied by \fB-c\fP\&.
325 .IP 
326 This is particularly useful in scripts, e\&.g\&. \f(CW-c \'lsaquery; enumusers -u\'\fP\&.
327 .IP 
328 .PP 
329 .SH "OPERATIONS" 
330 .PP 
331 Once the client is running, the user is presented with a prompt :
332 .PP 
333 \f(CWsmb:\e>\fP
334 .PP 
335 The prompt indicates that the client is ready and waiting to carry out
336 a user command\&. Each command is a single word, optionally followed by
337 parameters specific to that command\&. Command and parameters are
338 space-delimited unless these notes specifically state otherwise\&. All
339 commands are case-insensitive\&.  Parameters to commands may or may not
340 be case sensitive, depending on the command\&.
341 .PP 
342 You can specify names (e\&.g registry keys; user or group names;
343 service names) which have spaces in them by quoting the
344 name with double quotes, for example "dRMON SmartAgent"\&.
345 .PP 
346 Parameters shown in square brackets (e\&.g\&., "[parameter]") are
347 optional\&. If not given, the command will use suitable
348 defaults\&. Parameters shown in angle brackets (e\&.g\&., "<parameter>") are
349 required\&.
350 .PP 
351 Note that all commands operating on the server are actually performed
352 by issuing a request to the server\&. Thus the behavior may vary from
353 server to server, depending on how the server was implemented\&.
354 .PP 
355 The commands available are listed in groups relating to different services:
356 .PP 
357 .IP 
358 .IP "Misccellaneous" 
359 .IP 
360 .IP 
361 .IP "\fB? [command]\fP" 
362 If "command" is specified,
363 the \fB?\fP command will display a brief informative message about the
364 specified command\&.  If no command is specified, a list of available
365 commands will be displayed\&.
366 .IP 
367 .IP "\fB! [shell command]\fP" 
368 If "shell command"
369 is specified, the \fB!\fP  command will execute a shell locally and run
370 the specified shell command\&. If no command is specified, a local shell
371 will be run\&.
372 .IP 
373 .IP "\fBexit\fP" 
374 Terminate the connection with the server and
375 exit from the program\&.
376 .IP 
377 .IP "\fBhelp [command]\fP" 
378 See the \fB?\fP
379 command above\&.
380 .IP 
381 .IP "\fBquit\fP" 
382 See the \fBexit\fP command\&.
383 .IP 
384 .IP 
385 .IP "Event Log" 
386 .IP 
387 .IP 
388 .IP "\fBeventlog\fP" 
389 list the events
390 .IP 
391 .IP 
392 .IP "Service Control" 
393 .IP 
394 These commands provide functionality similar to the Windows
395 NT Service Control Manager\&.
396 .IP 
397 It is possible to use command-line completion (if you have
398 the GNU readline library) for Service names, by pressing the
399 tab key\&.
400 .IP 
401 .IP 
402 .IP "\fBsvcenum\fP" 
403 [-i] Lists Services\&.
404 .IP 
405 .IP "\fBsvcinfo\fP" 
406 <service> Service Information
407 .IP 
408 .IP "\fBsvcstart\fP" 
409 <service> [arg 0] [arg 1] \&.\&.\&. Start Service
410 .IP 
411 .IP "\fBsvcstop\fP" 
412 <service> Stop Service
413 .IP 
414 .IP 
415 .IP "Scheduler" 
416 .IP 
417 .IP 
418 .IP "\fBat\fP" 
419 Scheduler control (at /? for syntax)
420 .IP 
421 .IP 
422 .IP "Registry" 
423 .IP 
424 It is possible to use command-line completion (if you have
425 the GNU readline library) for registry key and value names,
426 by pressing the tab key\&.
427 .IP 
428 .IP 
429 .IP "\fBregenum\fP" 
430 <keyname> Registry Enumeration (keys, values)
431 .IP 
432 .IP "\fBregdeletekey\fP" 
433 <keyname> Registry Key Delete
434 .IP 
435 .IP "\fBregcreatekey\fP" 
436 <keyname> [keyclass] Registry Key Create
437 .IP 
438 .IP "\fBshutdown\fP" 
439 [-m message] [-t timeout] [-r or --reboot] Server Shutdown
440 .IP 
441 .IP "\fBregqueryval\fP" 
442 <valname> Registry Value Query
443 .IP 
444 .IP "\fBregquerykey\fP" 
445 <keyname> Registry Key Query
446 .IP 
447 .IP "\fBregdeleteval\fP" 
448 <valname> Registry Value Delete
449 .IP 
450 .IP "\fBregcreateval\fP" 
451 <valname> <valtype> <value> Registry Key Create
452 .IP 
453 .IP "\fBreggetsec\fP" 
454 <keyname> Registry Key Security
455 .IP 
456 .IP "\fBregtestsec\fP" 
457 <keyname> Test Registry Key Security
458 .IP 
459 .IP 
460 .IP "Printing" 
461 .IP 
462 It is possible to use command-line completion (if you have
463 the GNU readline library) for Printer and job names, by
464 pressing the tab key\&.
465 .IP 
466 .IP 
467 .IP "\fBspoolenum\fP" 
468 Enumerate Printers\&.  This experimental command lists
469 all printers available on a remote spooler service\&.
470 .IP 
471 .IP "\fBspooljobs\fP" 
472 <printer name> Enumerate Printer Jobs\&.  This
473 experimental command lists all jobs, and their
474 status, currently queued on a remote spooler
475 service\&.
476 .IP 
477 .IP "\fBspoolopen\fP" 
478 <printer name> Spool Printer Open Test\&.  Experimental\&.
479 .IP 
480 .IP 
481 .IP "Server" 
482 .IP 
483 .IP 
484 .IP "\fBtime\fP" 
485 Display remote time
486 .IP 
487 .IP "\fBbrsinfo\fP" 
488 Browser Query Info
489 .IP 
490 .IP "\fBwksinfo\fP" 
491 Workstation Query Info
492 .IP 
493 .IP "\fBsrvinfo\fP" 
494 Server Query Info
495 .IP 
496 .IP "\fBsrvsessions\fP" 
497 List sessions on a server
498 .IP 
499 .IP "\fBsrvshares\fP" 
500 List shares on a server
501 .IP 
502 .IP "\fBsrvtransports\fP" 
503 List transports on a server
504 .IP 
505 .IP "\fBsrvconnections\fP" 
506 List connections on a server
507 .IP 
508 .IP "\fBsrvfiles\fP" 
509 List files on a server
510 .IP 
511 .IP 
512 .IP "Local Security Authority" 
513 .IP 
514 .IP 
515 .IP "\fBlsaquery\fP" 
516 Query Info Policy (domain member or server)\&.  Obtains
517 the SID and name of the SAM database that a server
518 is responsible for (i\&.e a workstation\'s local SAM
519 database or the PDC SAM database)\&.  Also obtains the
520 SID and name of the SAM database that a server is
521 a member of\&.
522 .IP 
523 .IP "\fBlsaenumdomains\fP" 
524 Enumerate Trusted Domains\&.  Lists all Trusted and
525 Trusting Domains with which the remote PDC has
526 trust relationships established\&.
527 .IP 
528 .IP "\fBlookupsids\fP" 
529 <rid1 or sid1> <rid1 or sid2> \&.\&.\&. Resolve names from SIDs\&.
530 Mostly to be used by developers or for troubleshooting,
531 this command can take either Security Identifiers or Relative
532 Identifiers, and look them up in the local SAM database
533 (or look them up in a remote Trusting or Trusted PDC\'s SAM
534 database if there is an appropriate Trust Relationship
535 established)\&.  The result is a list of names, of the
536 format: 
537 .br 
538 \f(CW[TRUST_DOMAIN\e]name\fP\&. 
539 .br 
540 the \fBlsaquery\fP command must have been
541 issued first if you wish to use lookupsids to resolve
542 RIDs\&.  The only RIDs that will be resolved will be those
543 in the SAM database of the server to which you are connected\&.
544 .IP 
545 .IP "\fBlookupnames\fP" 
546 <name1> <name2> \&.\&.\&. Resolve SIDs from names\&.
547 Mostly to be used by developers or for troubleshooting,
548 this command can take names of the following format: 
549 .br 
550 \f(CW[DOMAIN_NAME\e]name\fP\&. 
551 .br 
552 The names, which can be user, group or alias names, will
553 either be looked up in the local SAM database or in a remote
554 Trusting or Trusted PDC\'s SAM database, if there is an
555 appropriate Trust Relationship established\&.  The optional
556 Domain name component is the name of a SAM database, which
557 can include a workstation\'s local SAM database or a Trusted
558 Domain\&.
559 Example Usage: 
560 .br 
561 \f(CWlookupnames WKSTANAME\eAdministrator "Domain Guests"\fP 
562 .br 
563 .IP 
564 .IP "\fBquerysecret\fP" 
565 LSA Query Secret (developer use)\&.  This command only appears
566 to work against NT4 SP3 and below\&.  Due to its potential
567 for misuse, it looks like Microsoft modified their
568 implementation of the LsaRetrievePrivateData call to
569 always return NT_STATUS_ACCESS_DENIED\&.
570 .IP 
571 .IP 
572 .IP "NETLOGON" 
573 .IP 
574 .IP 
575 .IP "\fBntlogin\fP" 
576 [username] [password] NT Domain login test\&.  Demonstrates
577 how NT-style logins work\&.  Mainly for developer usage,
578 it can also be used to verify that a user can log in
579 from a workstation\&.  If you cannot ever get pam_ntdom
580 to work, try this command first\&.
581 .IP 
582 .IP "\fBdomtrust\fP" 
583 <domain> NT Inter-Domain test\&.  Demonstrates how NT-style
584 Inter-Domain Trust relationships work\&.  Mainly for
585 developer usage, it can also be used to verify that a
586 Trust Relationship is correctly established with a
587 remote PDC\&.
588 .IP 
589 .IP "\fBsamsync\fP" 
590 SAM Synchronisation Test (experimental)\&.  This command
591 is used to manually synchronise a SAM database from a
592 remote PDC, when Samba is set up as a Backup Domain
593 Controller\&.
594 .IP 
595 .IP 
596 .IP "SAM Database" 
597 .IP 
598 It is possible to use command-line completion (if you have
599 the GNU readline library) for user, group, alias and domain
600 names, by pressing the tab key\&.
601 .IP 
602 .IP 
603 .IP "\fBlookupdomain\fP" 
604 Obtain SID for a local domain
605 .IP 
606 .IP "\fBenumusers\fP" 
607 SAM User Database Query (experimental!)
608 .IP 
609 .IP "\fBaddgroupmem\fP" 
610 <group rid> [user] [user] \&.\&.\&. SAM Add Domain Group Member
611 .IP 
612 .IP "\fBaddaliasmem\fP" 
613 <alias rid> [member sid1] [member sid2] \&.\&.\&. SAM Add Domain Alias Member
614 .IP 
615 .IP "\fBdelgroupmem\fP" 
616 <group rid> [user] [user] \&.\&.\&. SAM Delete Domain Group Member
617 .IP 
618 .IP "\fBdelaliasmem\fP" 
619 <alias rid> [member sid1] [member sid2] \&.\&.\&. SAM Delete Domain Alias Member
620 .IP 
621 .IP "\fBcreategroup\fP" 
622 SAM Create Domain Group
623 .IP 
624 .IP "\fBcreatealias\fP" 
625 SAM Create Domain Alias
626 .IP 
627 .IP "\fBcreateuser\fP" 
628 <username> SAM Create Domain User
629 .IP 
630 .IP "\fBdelgroup\fP" 
631 SAM Delete Domain Group
632 .IP 
633 .IP "\fBdelalias\fP" 
634 SAM Delete Domain Alias
635 .IP 
636 .IP "\fBntpass\fP" 
637 NT SAM Password Change
638 .IP 
639 .IP "\fBsamuserset2\fP" 
640 <username> [-s acb_bits] SAM User Set Info 2 (experimental!)
641 .IP 
642 .IP "\fBsamuserset\fP" 
643 <username> [-p password] SAM User Set Info (experimental!)
644 .IP 
645 .IP "\fBsamuser\fP" 
646 <username> SAM User Query (experimental!)
647 .IP 
648 .IP "\fBsamgroup\fP" 
649 <groupname> SAM Group Query (experimental!)
650 .IP 
651 .IP "\fBsamalias\fP" 
652 <aliasname> SAM Alias Query
653 .IP 
654 .IP "\fBsamaliasmem\fP" 
655 <aliasname> SAM Alias Members
656 .IP 
657 .IP "\fBsamgroupmem\fP" 
658 SAM Group Members
659 .IP 
660 .IP "\fBsamtest\fP" 
661 SAM User Encrypted RPC test (experimental!)
662 .IP 
663 .IP "\fBenumaliases\fP" 
664 SAM Aliases Database Query (experimental!)
665 .IP 
666 .IP "\fBenumdomains\fP" 
667 SAM Domains Database Query (experimental!)
668 .IP 
669 .IP "\fBenumgroups\fP" 
670 SAM Group Database Query (experimental!)
671 .IP 
672 .IP "\fBdominfo\fP" 
673 SAM Query Domain Info
674 .IP 
675 .IP "\fBdispinfo\fP" 
676 SAM Query Display Info
677 .IP 
678 .IP 
679 .PP 
680 .SH "NOTES" 
681 .PP 
682 Some servers are fussy about the case of supplied usernames,
683 passwords, share names (AKA service names) and machine names\&. If you
684 fail to connect try giving all parameters in uppercase\&.
685 .PP 
686 It is often necessary to use the \fB-n\fP option when connecting
687 to some types of servers\&. For example OS/2 LanManager insists on a valid
688 NetBIOS name being used, so you need to supply a valid name that would
689 be known to the server\&.
690 .PP 
691 rpcclient only works on servers that support MSRPC over SMB\&.  This includes
692 all versions of Windows NT, including the ports to Unix such as AS/U and
693 AFPS\&.  Support for MSRPC over SMB in other servers is currently rare and
694 patchy, for example Samba 2\&.0 only supports a limited set of MSRPC commands,
695 and some of those are not supported very well\&.
696 .PP 
697 .SH "ENVIRONMENT VARIABLES" 
698 .PP 
699 The variable \fBUSER\fP may contain the username of the person using the
700 client\&.  This information is used only if the protocol level is high
701 enough to support session-level passwords\&.
702 .PP 
703 The variable \fBPASSWORD\fP may contain the password of the person using
704 the client\&.  This information is used only if the protocol level is
705 high enough to support session-level passwords\&.
706 .PP 
707 .SH "INSTALLATION" 
708 .PP 
709 The location of the client program is a matter for individual system
710 administrators\&. The following are thus suggestions only\&.
711 .PP 
712 It is recommended that the rpcclient software be installed in the
713 /usr/local/samba/bin or /usr/samba/bin directory, this directory
714 readable by all, writeable only by root\&. The client program itself
715 should be executable by all\&. The client should \fINOT\fP be setuid or
716 setgid!
717 .PP 
718 The client log files should be put in a directory readable and
719 writeable only by the user\&.
720 .PP 
721 To test the client, you will need to know the name of a running
722 SMB/CIFS server\&. It is possible to run \fBsmbd (8)\fP
723 an ordinary user - running that server as a daemon on a
724 user-accessible port (typically any port number over 1024) would
725 provide a suitable test server\&.
726 .PP 
727 .SH "DIAGNOSTICS" 
728 .PP 
729 Most diagnostics issued by the client are logged in a specified log
730 file\&. The log file name is specified at compile time, but may be
731 overridden on the command line\&.
732 .PP 
733 The number and nature of diagnostics available depends on the debug
734 level used by the client\&. If you have problems, set the debug level to
735 3 and peruse the log files\&.
736 .PP 
737 .SH "VERSION" 
738 .PP 
739 This man page is correct for version 2\&.0 of the Samba suite\&.
740 .PP 
741 .SH "BUGS" 
742 .PP 
743 .IP "WARNING!" 
744 The MSPRC over SMB code has been developed from examining Network traces\&.
745 No documentation is available from the original creators (Microsoft) on
746 how MSRPC over SMB works, or how the individual MSRPC services work\&.
747 Microsoft\'s implementation of these services has been demonstrated (and
748 reported) to be\&.\&.\&. a bit flakey in places\&.
749 .IP 
750 The development of Samba\'s implementation of these services is \fIalso\fP
751 a bit rough, and as more of the services are understood, it can even result
752 in versions of \fBsmbd (8)\fP and rpcclient that are
753 incompatible for some commands or services\&.  Additionally, the developers
754 are sending reports to Microsoft, and problems found by or reported to
755 Microsoft are fixed in Service Packs, which may also result in
756 incompatibilities\&.
757 .IP 
758 It is therefore not guaranteed that the execution of an rpcclient command will
759 work\&.  It is also not guaranteed that the target server will continue to
760 operate, i\&.e the execution of an MSRPC command may cause a remote service to
761 fail, or even cause the remote server to fail\&.  Usual rules apply, of course:
762 the developers bear absolutely no responsibility for the use, misuse, or
763 lack of use of rpcclient, by any person or persons, whether legal,
764 illegal, accidental, deliberate, intentional, malicious, curious, etc\&.
765 .IP 
766 .IP "Command Completion" 
767 Command-completion (available if you have the GNU readline library) used on
768 certain commands may not operate correctly if the word being completed (such as a registry key) contains a space\&.  Typically, the name will be completed, but
769 you will have to go back and put quotes round it, yourself\&.  
770 .IP 
771 .IP "SAM Database command-completion" 
772 Command-completion (available if you have the GNU readline library) of user,
773 group and alias names does not work on remote Domains, which would normally
774 be specified like this: 
775 .br 
776 \f(CWDOMAIN_name\euser_name\fP\&. 
777 .br 
778 The only names that can be completed in this fashion are the local names
779 in the SAM database of the target server\&.
780 .IP 
781 .IP "\fBspoolenum\fP" 
782 Due to current limitations in the rpcclient MSRPC / SMB code, and due to
783 the extremely poor MSRPC implementation (by Microsoft) of the spooler
784 service, if there are a large number of printers (or the names / comment
785 fields associated with the printers), this command will fail\&.  The
786 limitations require further research to be carried out; we\'re stuck with
787 the poor \ePIPE\espoolss design\&.
788 .IP 
789 .PP 
790 .SH "AUTHOR" 
791 .PP 
792 The original Samba software and related utilities were created by
793 Andrew Tridgell \fIsamba-bugs@samba\&.org\fP\&. Samba is now developed
794 by the Samba Team as an Open Source project similar to the way the
795 Linux kernel is developed\&.
796 .PP 
797 The original Samba man pages were written by Karl Auer\&. The man page
798 sources were converted to YODL format (another excellent piece of Open
799 Source software, available at
800 \fBftp://ftp\&.icce\&.rug\&.nl/pub/unix/\fP)
801 and updated for the Samba2\&.0 release by Jeremy Allison\&.  This man page
802 was developed cut-and-paste style from the smbclient man page, by
803 Luke Kenneth Casson Leighton\&.
804 \fIsamba-bugs@samba\&.org\fP\&.
805 .PP 
806 See \fBsamba (7)\fP to find out how to get a full
807 list of contributors and details on how to submit bug reports,
808 comments etc\&.
809 .PP