1<html>
2<body bgcolor="#ffffff">
3
4<img src="samba2_xs.gif" border="0" alt=" " height="100" width="76"
5hspace="10" align="left" />
6
7<h1 class="head0">Appendix C. Summary of Samba Daemons and Commands</h1>
8
9
10<p>This appendix is a reference listing of command-line options and
11other information to help you use the programs that come with the
12Samba distribution.</p>
13
14
15
16<div class="sect1"><a name="samba2-APP-C-SECT-1"/>
17
18<h2 class="head1">Samba Daemons</h2>
19
20<p>The following sections provide information about the command-line
21parameters for <em class="emphasis">smbd</em>, <em class="emphasis">nmbd</em>,
22and <em class="emphasis">winbindd</em>.</p>
23
24</div>
25
26
27<a name="INDEX-1"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbd</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">smbd</em> program provides
28Samba's file and printer services, using one TCP/IP
29stream and one daemon per client. It is controlled from
30<em class="filename">/usr/local/samba/lib/smb.conf</em>, the default
31configuration file, which can be overridden by command-line options.</p><p>The configuration file is automatically reevaluated every minute. If
32it has changed, most new options are immediately effective. You can
33force Samba to reload the configuration file immediately by sending a
34SIGHUP signal to <em class="emphasis">smbd</em>. Reloading the
35configuration file does not affect any clients that are already
36connected. To escape this condition, a client would need to
37disconnect and reconnect, or the server itself would have to be
38restarted, forcing all clients to reconnect.</p>
39<div class="sect1"><a name="appc-5-fm2xml"/>
40
41<h4 class="refsect1">Other Signals</h4>
42<p>To shut down an <em class="emphasis">smbd</em> process, send it the
43termination signal SIGTERM (15), which allows it to die gracefully,
44instead of a SIGKILL (9). With Samba versions prior to 2.2, the
45debugging level could be raised or lowered using SIGUSR1 or SIGUSR2.
46This is no longer supported. Use <em class="emphasis">smbcontrol</em>
47instead.</p>
48
49</div>
50
51<div class="sect1"><a name="appc-6-fm2xml"/>
52
53<h4 class="refsect1">Command synopsis</h4>
54
55<blockquote><pre class="code">smbd <em class="replaceable">[options]</em></pre></blockquote>
56
57
58</div>
59
60<div class="sect1"><a name="appc-7-fm2xml"/>
61
62<h4 class="refsect1">Options</h4>
63
64<dl>
65<dt><b><tt class="literal">-a</tt></b></dt>
66<dd>
67<p>Causes each new connection to the Samba server to append all logging
68messages to the log file. This option is the opposite of
69<tt class="literal">-o</tt> and is the default.</p>
70</dd>
71
72
73
74<dt><b><tt class="literal">-D</tt></b></dt>
75<dd>
76<p>Runs the <em class="emphasis">smbd</em> program as a daemon. This is the
77recommended way to use <em class="emphasis">smbd</em>. It is also the
78default action when <em class="emphasis">smbd</em> is run from an
79interactive command line. In addition, <em class="emphasis">smbd</em> can
80be run from <em class="emphasis">inetd</em>.</p>
81</dd>
82
83
84
85<dt><b><tt class="literal">-d</tt> <em class="replaceable">debug_level</em></b></dt>
86<dd>
87<p>Sets the debug (sometimes called logging) level. The level can range
88from 0 to 10. Specifying the value on the command line overrides the
89value specified in the <em class="filename">smb.conf</em> file. Debug
90level 0 logs only the most important messages; level 1 is normal;
91levels 3 and above are primarily for debugging and slow
92<em class="emphasis">smbd</em> considerably.</p>
93</dd>
94
95
96
97<dt><b><tt class="literal">-h</tt> </b></dt>
98<dd>
99<p>Prints usage information for the <em class="emphasis">smbd</em> command.</p>
100</dd>
101
102
103
104<dt><b><tt class="literal">-i</tt></b></dt>
105<dd>
106<p>Runs <em class="emphasis">smbd</em> interactively, rather than as a
107daemon. This option is used to override the default daemon mode when
108<em class="emphasis">smbd</em> is run from the command line.</p>
109</dd>
110
111
112
113<dt><b><tt class="literal">-l</tt> <em class="replaceable">log_ directory</em></b></dt>
114<dd>
115<p>Sends the log messages to somewhere other than the location compiled
116into the executable or specified in the <em class="filename">smb.conf</em>
117file. The default is often
118<em class="filename">/usr/local/samba/var/</em>,
119<em class="filename">/usr/samba/var/</em>, or
120<em class="filename">/var/log/</em>. The log file is placed in the
121specified directory and named <em class="filename">log.smbd</em>. If the
122directory does not exist, Samba's compiled-in
123default will be used.</p>
124</dd>
125
126
127
128<dt><b><tt class="literal">-O</tt> <em class="replaceable">socket_options</em></b></dt>
129<dd>
130<p>Sets the TCP/IP socket options, using the same parameters as the
131<tt class="literal">socket options</tt> configuration option. Often used
132for performance tuning and testing.</p>
133</dd>
134
135
136
137<dt><b><tt class="literal">-o</tt></b></dt>
138<dd>
139<p>Causes log files to be overwritten when opened (the opposite of
140<tt class="literal">-a</tt>). Using this option saves you from hunting for
141the right log entries if you are performing a series of tests and
142inspecting the log file each time.</p>
143</dd>
144
145
146
147<dt><b><tt class="literal">-p</tt> <em class="replaceable">port_number</em></b></dt>
148<dd>
149<p>Sets the TCP/IP port number from which the server will accept
150requests. All Microsoft clients send to the default port of 139,
151except for Windows 2000/XP, which can use port 445 for SMB
152networking, without the NetBIOS protocol layer.</p>
153</dd>
154
155
156
157<dt><b><tt class="literal">-P</tt></b></dt>
158<dd>
159<p>Causes <em class="emphasis">smbd</em> to run in
160&quot;passive&quot; mode, in which it just
161listens, and does not transmit any network traffic. This is useful
162only for debugging by developers.</p>
163</dd>
164
165
166
167<dt><b><tt class="literal">-s</tt> <em class="replaceable">configuration_ file</em></b></dt>
168<dd>
169<p>Specifies the location of the Samba configuration file. Although the
170file defaults to <em class="filename">/usr/local/samba/lib/smb.conf</em>,
171you can override it on the command line. Typically used for
172debugging.</p>
173</dd>
174
175
176
177<dt><b><tt class="literal">-v</tt></b></dt>
178<dd>
179<p>Prints the current version of Samba.</p>
180</dd>
181
182</dl>
183
184
185</div>
186</div>
187
188<a name="INDEX-2"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>nmbd</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">nmbd</em> program is Samba's
189NetBIOS name service and browsing daemon. It replies to NetBIOS over
190TCP/IP (also called NetBT or NBT) name-service requests broadcast
191from SMB clients, and optionally to Microsoft's
192Windows Internet Name Service (WINS) requests. Both are versions of
193the name-to-address lookup required by SMB clients. The broadcast
194version uses UDP broadcast on the local subnet only, while WINS uses
195TCP, which can be routed. If running as a WINS server,
196<em class="emphasis">nmbd</em> keeps a current name and address database
197in the file <em class="filename">/usr/local/samba/var/locks/wins.dat</em>.</p><p>An active <em class="emphasis">nmbd</em> daemon also responds to browsing
198protocol requests used by the Windows Network Neighborhood. This
199protocol provides a dynamic directory of servers, as well as the
200disks and printers that the servers are providing. As with WINS, this
201was initially done by making UDP broadcasts on the local subnet. With
202the addition of the local master browser to the network architecture,
203it is done by making TCP connections to a server. If
204<em class="emphasis">nmbd</em> is acting as a local master browser, it
205stores the browsing database in the file
206<em class="filename">/usr/local/samba/var/locks/browse.dat</em>.</p><p>Some clients (especially older ones) cannot use the WINS protocol. To
207support these clients, <em class="emphasis">nmbd</em> can act as a WINS
208proxy, accepting broadcast requests from the non-WINS clients,
209contacting a WINS server on their behalf, and returning the WINS
210server's response to them.</p>
211<div class="sect1"><a name="appc-9-fm2xml"/>
212
213<h4 class="refsect1">Signals</h4>
214<p>Like <em class="emphasis">smbd</em>, the <em class="emphasis">nmbd</em> program
215responds to several Unix signals. Sending <em class="emphasis">nmbd</em> a
216SIGHUP signal causes it to dump the names it knows about to the
217<em class="filename">/usr/local/samba/var/locks/namelist.debug</em> file.
218To shut down an <em class="emphasis">nmbd</em> process and allow it to die
219gracefully, send it a SIGTERM (15) signal, rather than a SIGKILL (9).
220With Samba versions prior to 2.2, the debugging level could be raised
221or lowered using SIGUSR1 or SIGUSR2. This is no longer supported. Use
222<em class="emphasis">smbcontrol</em> instead.</p>
223
224</div>
225
226<div class="sect1"><a name="appc-10-fm2xml"/>
227
228<h4 class="refsect1">Command synopsis</h4>
229
230<blockquote><pre class="code">nmbd <em class="replaceable">[options]</em></pre></blockquote>
231
232
233</div>
234
235<div class="sect1"><a name="appc-11-fm2xml"/>
236
237<h4 class="refsect1">Options</h4>
238
239<dl>
240<dt><b><tt class="literal">-a</tt></b></dt>
241<dd>
242<p>Causes each new connection to the Samba server to append all logging
243messages to the log file. This option is the opposite of
244<tt class="literal">-o</tt> and is the default.</p>
245</dd>
246
247
248
249<dt><b><tt class="literal">-d</tt> <em class="replaceable">debug_level</em></b></dt>
250<dd>
251<p>Sets the debug (sometimes called logging) level. The level can range
252from 0 to 10. Specifying the value on the command line overrides the
253value specified in the <em class="filename">smb.conf</em> file. Debug
254level 0 logs only the most important messages; level 1 is normal;
255levels 3 and above are primarily for debugging and slow
256<em class="emphasis">nmbd</em> considerably.</p>
257</dd>
258
259
260
261<dt><b><tt class="literal">-D</tt></b></dt>
262<dd>
263<p>Instructs the <em class="emphasis">nmbd</em> program to run as a daemon.
264This is the recommended way to use <em class="emphasis">nmbd</em> and is
265the default when <em class="emphasis">nmbd</em> is run from an interactive
266shell. In addition, <em class="emphasis">nmbd</em> can be run from
267<em class="emphasis">inetd</em>.</p>
268</dd>
269
270
271
272<dt><b><tt class="literal">-h</tt> </b></dt>
273<dd>
274<p>Prints usage information for the <em class="emphasis">nmbd</em> command.</p>
275</dd>
276
277
278
279<dt><b><tt class="literal">-H</tt> <em class="replaceable">lmhosts_  file</em></b></dt>
280<dd>
281<p>Specifies the location of the <em class="emphasis">lmhosts</em> file for
282name resolution. This file is used only to resolve names for the
283local server, and not to answer queries from remote systems. The
284compiled-in default is commonly
285<em class="filename">/usr/local/samba/lib/lmhosts</em>,
286<em class="filename">/usr/samba/lib/lmhosts</em>, or
287<em class="filename">/etc/lmhosts</em>.</p>
288</dd>
289
290
291
292<dt><b><tt class="literal">-i</tt></b></dt>
293<dd>
294<p>Runs <em class="emphasis">nmbd</em> interactively, rather than as a
295daemon. This option is used to override the default daemon mode when
296<em class="emphasis">nmbd</em> is run from the command line.</p>
297</dd>
298
299
300
301<dt><b><tt class="literal">-l</tt> <em class="replaceable">log_ file</em></b></dt>
302<dd>
303<p>Sends the log messages to somewhere other than the location compiled
304into the executable or specified in the <em class="filename">smb.conf</em>
305file. The default is often
306<em class="filename">/usr/local/samba/var/log.nmbd</em>,
307<em class="emphasis">/usr/samba/var/log.nmbd</em>, or <em class="emphasis">/var/log
308/log.nmbd</em>.</p>
309</dd>
310
311
312
313<dt><b><tt class="literal">-n</tt> <em class="replaceable">NetBIOS_name</em></b></dt>
314<dd>
315<p>Allows you to override the NetBIOS name by which the daemon
316advertises itself. Specifying this option on the command line
317overrides the <tt class="literal">netbios name</tt> option in the Samba
318configuration file.</p>
319</dd>
320
321
322
323<dt><b><tt class="literal">-O</tt> <em class="replaceable">socket_options</em></b></dt>
324<dd>
325<p>Sets the TCP/IP socket options, using the same parameters as the
326<tt class="literal">socket options</tt> configuration option. Often used
327for performance tuning and testing.</p>
328</dd>
329
330
331
332<dt><b><tt class="literal">-o</tt></b></dt>
333<dd>
334<p>Causes log files to be overwritten when opened (the opposite of
335<tt class="literal">-a</tt>). This option saves you from hunting for the
336right log entries if you are performing a series of tests and
337inspecting the log file each time.</p>
338</dd>
339
340
341
342<dt><b><tt class="literal">-p</tt> <em class="replaceable">port_number</em></b></dt>
343<dd>
344<p>Sets the UDP port number from which the server accepts requests.
345Currently, all Microsoft clients use only the default port, 137.</p>
346</dd>
347
348
349
350<dt><b><tt class="literal">-s</tt> <em class="replaceable">configuration_ file</em></b></dt>
351<dd>
352<p>Specifies the location of the Samba configuration file. Although the
353file defaults to <em class="filename">/usr/local/samba/lib/smb.conf</em>,
354you can override it here on the command line. Typically used for
355debugging.</p>
356</dd>
357
358
359
360<dt><b><tt class="literal">-v</tt></b></dt>
361<dd>
362<p>Prints the current version of Samba.</p>
363</dd>
364
365</dl>
366
367
368</div>
369</div>
370
371<a name="INDEX-3"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>winbindd</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">winbindd</em> daemon is part of the winbind
372service and is used to allow Unix systems to obtain user and group
373information from a Windows NT/2000 server. Winbind maps Windows
374relative IDs (RIDs) to Unix UIDs and GIDs and allows accounts stored
375on the Windows server to be used for Unix authentication. Its purpose
376is to ease integration of Microsoft and Unix networks when a
377preexisting Windows domain controller is set up to handle user and
378computer accounts.</p><p>The daemon is accessed by users via the name service switch and PAM.
379The name service switch calls a library
380(<em class="filename">/lib/libnss_winbind.so</em>), which calls the
381daemon, which in turn calls the Windows NT/2000 server using
382Microsoft RPC. The PAM module for winbind can call the daemon
383similarly, allowing users whose accounts are stored on the Windows
384server to log in to the Unix system and run an interactive shell,
385FTP, or any other program that authenticates users through PAM.</p><p>The winbind subsystem is currently available only for the Linux
386operating system and a few other systems that use shared libraries,
387nsswitch and PAM.</p>
388<div class="sect1"><a name="appc-13-fm2xml"/>
389
390<h4 class="refsect1">Command synopsis</h4>
391
392<blockquote><pre class="code">winbindd <em class="replaceable">[options]</em></pre></blockquote>
393
394
395</div>
396
397<div class="sect1"><a name="appc-14-fm2xml"/>
398
399<h4 class="refsect1">Options</h4>
400
401<dl>
402<dt><b><tt class="literal">-d</tt> <em class="replaceable">debuglevel</em></b></dt>
403<dd>
404<p>Sets the debug (sometimes called logging) level. The level can range
405from 0 to 10. Specifying the value on the command line overrides the
406value specified in the <em class="filename">smb.conf</em> file. Debug
407level 0 logs only the most important messages; level 1 is normal;
408levels 3 and above are primarily for debugging.</p>
409</dd>
410
411
412
413<dt><b><tt class="literal">-i</tt></b></dt>
414<dd>
415<p>Runs <em class="emphasis">winbindd</em> interactively. This option is used
416to override the default, which is for winbindd to detach and run as a
417daemon.</p>
418</dd>
419
420</dl>
421
422</div>
423</div>
424
425
426
427
428
429<div class="sect1"><a name="samba2-APP-C-SECT-2"/>
430
431<h2 class="head1">Samba Distribution Programs</h2>
432
433<p>This section lists the command-line options and subcommands provided
434by each nondaemon program in the Samba distribution.</p>
435
436</div>
437
438
439
440<a name="INDEX-4"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>findsmb</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This Perl script reports information about systems on the subnet that
441respond to SMB name-query requests. The report includes the IP
442address, NetBIOS name, workgroup/domain, and operating system of each
443system.</p>
444<div class="sect1"><a name="appc-17-fm2xml"/>
445
446<h4 class="refsect1">Command synopsis</h4>
447
448<blockquote><pre class="code">findsmb <em class="replaceable">[subnet_broadcast_address]</em></pre></blockquote>
449<p>If a different subnet's broadcast address is
450provided, it will find SMB servers on that subnet. If no subnet
451broadcast address is supplied, <em class="emphasis">findsmb</em> will look
452on the local subnet.</p>
453
454<p>The output from <em class="emphasis">findsmb</em> looks like this:</p>
455<blockquote><pre class="code">$ <tt class="userinput"><b>findsmb</b></tt>
456                                *=DMB
457                                +=LMB
458IP ADDR         NETBIOS NAME     WORKGROUP/OS/VERSION
459---------------------------------------------------------------------
460172.16.1.1      TOLTEC         *[METRAN] [Unix] [Samba 2.2.6]
461172.16.1.3      MIXTEC         +[METRAN] [Unix] [Samba 2.2.6]
462172.16.1.4      ZAPOTEC         [METRAN] [Windows 5.0] [Windows 2000 LAN Manager]
463172.16.1.5      HUASTEC         [       METRAN        ]
464172.16.1.6      MAYA            [       METRAN        ]
465172.16.1.7      OLMEC           [METRAN] [Windows 5.1] [Windows 2000 LAN Manager]
466172.16.1.10     UTE             [       METRAN        ]
467172.16.1.13     DINE            [METRAN] [Windows NT 4.0] [NT LAN Manager 4.0]</pre></blockquote>
468<p>The system with an asterisk (<tt class="literal">*</tt>) in front of its
469workgroup name is the domain master browser for the workgroup/domain,
470and the system with a plus sign (+) preceding its workgroup name is
471the local master browser.</p>
472
473<p>The <em class="emphasis">findsmb</em> command was introduced during the
474development of Samba 2.2 and is installed by default in Samba
475Versions 2.2.5 and later.</p>
476
477</div>
478</div>
479
480<a name="INDEX-5"/><a name="INDEX-6"/><a name="INDEX-7"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>make_smbcodepage</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This program is part of the
481<a name="INDEX-6"/>internationalization features of
482Samba 2.2 and is obsolete in Samba 3.0, which supports
483<a name="INDEX-7"/>Unicode
484automatically. The <em class="emphasis">make_smbcodepage</em> program
485compiles a binary codepage file from a text-format codepage
486definition. It can also perform the reverse operation, decompiling a
487binary codepage file into a text version. Examples of text-format
488codepage files can be found in the Samba distribution in the
489<em class="filename">source/codepages</em> directory. After Samba has been
490installed, examples of binary codepages can be found in the directory
491<em class="filename">/usr/local/samba/lib/codepages</em>.</p>
492<div class="sect1"><a name="appc-19-fm2xml"/>
493
494<h4 class="refsect1">Command synopsis</h4>
495
496<blockquote><pre class="code">make_smbcodepage <em class="replaceable">c|d codepage_number input_file output_file</em></pre></blockquote>
497<p>For the first argument, use <tt class="literal">c</tt> to compile a
498codepage and <tt class="literal">d</tt> to decompile a codepage file. The
499<em class="replaceable">codepage_number</em> argument is the number of
500the codepage being processed (e.g., 850). The
501<em class="replaceable">input_file</em> and
502<em class="replaceable">output_file</em> are the text- and
503binary-format codepages, with the types dependent on the operation
504(compiling or decompiling) that is being performed.</p>
505
506</div>
507</div>
508
509<a name="INDEX-8"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>make_unicodemap</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This program is part of the internationalization features of Samba
5102.2 and is obsolete in Samba 3.0, which supports Unicode
511automatically. The <em class="emphasis">make_unicodemap</em> command
512compiles binary Unicode maps from text files, so Samba can display
513non-ASCII characters in file and directory names via the Unicode
514international alphabets. Examples of input mapping files can be found
515in the directory <em class="filename">source/codepages</em> in the Samba
516source distribution.</p>
517<div class="sect1"><a name="appc-21-fm2xml"/>
518
519<h4 class="refsect1">Command synopsis</h4>
520
521<blockquote><pre class="code">make_unicodemap <em class="replaceable">codepage_number inputfile outputfile</em></pre></blockquote>
522<p>The input file is an ASCII map; the output file is a binary file
523loadable by Samba. The codepage is the number of the DOS codepage
524(e.g., 850) for the map.</p>
525
526</div>
527</div>
528
529<a name="INDEX-9"/><a name="INDEX-10"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>net</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">net</em> command, new to Samba 3.0, is a program
530with a syntax similar to the MS-DOS/Windows command of the same name.
531It is used for performing various administrative functions related to
532Windows networking, which can be executed either locally or on a
533remote system.</p>
534<div class="sect1"><a name="appc-23-fm2xml"/>
535
536<h4 class="refsect1">Command synopsis</h4>
537
538<blockquote><pre class="code">net <em class="replaceable">[method] function [misc_options] [target_options]</em></pre></blockquote>
539<p>The <em class="replaceable">function</em> argument is made up of one or
540more space-separated words. In Windows terminology, it is sometimes
541referred to as a function with options. Here we list every function
542in its complete form, including multiple words.</p>
543
544<p>By default, the action is performed on the local system. The
545<em class="replaceable">target_options</em> argument can be used to
546specify a remote system (either by hostname or IP address), a domain,
547or a workgroup.</p>
548
549<p>Depending on the function, the <em class="replaceable">method</em>
550argument can be optional, required, or disallowed. It specifies one
551of three methods for performing the operation specified by the rest
552of the command. It can be <tt class="literal">ads</tt> (Active Directory),
553<tt class="literal">rpc</tt> (Microsoft's DCE/RPC), or
554<tt class="literal">rap</tt> (Microsoft's original SMB
555remote procedure call). To determine which methods (if any) can be
556used with a function, the <tt class="literal">net help ads</tt>,
557<tt class="literal">net help rap</tt>, and <tt class="literal">net help rpc</tt>
558commands can be used to list the functions for each method.</p>
559
560</div>
561
562<div class="sect1"><a name="appc-24-fm2xml"/>
563
564<h4 class="refsect1">Miscellaneous options</h4>
565
566<dl>
567<dt><b><tt class="literal">-d</tt> <em class="replaceable">level</em></b></dt>
568<dt><b><tt class="literal">--debug=l</tt><em class="replaceable">evel</em></b></dt>
569<dd>
570<p>Sets the debug (sometimes called logging) level. The level can range
571from 0 to 10.</p>
572</dd>
573
574
575
576<dt><b><tt class="literal">-l</tt></b></dt>
577<dt><b><tt class="literal">--long</tt></b></dt>
578<dd>
579<p><tt class="literal">S</tt>pecifies the long listing mode. This is provided
580for functions that print informational listings.</p>
581</dd>
582
583
584
585<dt><b><tt class="literal">-n</tt> <em class="replaceable">name</em></b></dt>
586<dt><b><tt class="literal">--myname</tt><em class="emphasis">=</em><em class="replaceable">name</em></b></dt>
587<dd>
588<p>Specifies the NetBIOS name for the client.</p>
589</dd>
590
591
592
593<dt><b><tt class="literal">-p</tt> <em class="replaceable">port</em></b></dt>
594<dt><b><tt class="literal">--port</tt><em class="emphasis">=</em><em class="replaceable">port</em></b></dt>
595<dd>
596<p>Specifies the port number to use.</p>
597</dd>
598
599
600
601<dt><b><tt class="literal">-s</tt> <em class="replaceable">filename</em></b></dt>
602<dt><b><tt class="literal">--conf</tt><em class="emphasis">=</em><em class="replaceable">filename</em></b></dt>
603<dd>
604<p>Specifies the name of the Samba configuration file, overriding the
605compiled-in default.</p>
606</dd>
607
608
609
610<dt><b><tt class="literal">-U</tt> <em class="replaceable">username[</em><tt class="literal">%</tt><em class="replaceable">password]</em></b></dt>
611<dt><b><tt class="literal">--user</tt><em class="emphasis">=</em><em class="replaceable">username[</em><tt class="literal">%</tt><em class="replaceable">password]</em></b></dt>
612<dd>
613<p>Specifies the username and, optionally, the password to use for
614functions that require authentication.</p>
615</dd>
616
617
618
619<dt><b><tt class="literal">-W</tt> <em class="replaceable">name</em></b></dt>
620<dt><b><tt class="literal">--myworkgroup</tt>=<em class="replaceable">name</em></b></dt>
621<dd>
622<p>Specifies the name of the client's workgroup,
623overriding the definition of the <tt class="literal">workgroup</tt>
624parameter in the Samba configuration file.</p>
625</dd>
626
627</dl>
628
629
630</div>
631
632<div class="sect1"><a name="appc-25-fm2xml"/>
633
634<h4 class="refsect1">Target options</h4>
635
636<dl>
637<dt><b><tt class="literal">-S</tt> <em class="replaceable">hostname</em></b></dt>
638<dd>
639<p>Specifies the remote system using a hostname or NetBIOS name.</p>
640</dd>
641
642
643
644<dt><b><tt class="literal">-I</tt> <em class="replaceable">ip_address</em></b></dt>
645<dd>
646<p>Specifies the remote system using its IP address.</p>
647</dd>
648
649
650
651<dt><b><tt class="literal">-w</tt> <em class="replaceable">workgroup</em></b></dt>
652<dd>
653<p>Specifies the name of the target domain or workgroup.</p>
654</dd>
655
656</dl>
657
658
659</div>
660
661<div class="sect1"><a name="appc-26-fm2xml"/>
662
663<h4 class="refsect1">Functions</h4>
664
665<dl>
666<dt><b><tt class="literal">abortshutdown</tt></b></dt>
667<dd>
668<p>See the <tt class="literal">rpc</tt> <tt class="literal">abortshutdown</tt>
669function.</p>
670</dd>
671
672
673
674<dt><b><tt class="literal">ads</tt> <tt class="literal">info</tt></b></dt>
675<dd>
676<p>Prints information about the Active Directory server. The method
677(<tt class="literal">ads</tt>) must be specified to differentiate this
678function from the <tt class="literal">rpc info</tt> function.</p>
679</dd>
680
681
682
683<dt><b><tt class="literal">ads</tt> <tt class="literal">join</tt> <em class="replaceable">OU</em></b></dt>
684<dd>
685<p>Joins the local system to the Active Directory realm (organizational
686unit) specified by OU. The method (<tt class="literal">ads</tt>) must be
687specified to differentiate this function from the <tt class="literal">rpc
688join</tt> function.</p>
689</dd>
690
691
692
693<dt><b><tt class="literal">ads</tt> <tt class="literal">leave</tt></b></dt>
694<dd>
695<p>Removes the local system from the Active Directory realm.</p>
696</dd>
697
698
699
700<dt><b><tt class="literal">ads password</tt> <em class="replaceable">username</em><tt class="literal">@</tt><em class="replaceable">REALM</em> <tt class="literal">-U</tt><em class="replaceable">admin_username</em><tt class="literal">@</tt><em class="replaceable">REALM</em><tt class="literal">%admin_</tt><em class="replaceable">password</em></b></dt>
701<dd>
702<p>Changes the Active Directory password for the user specified by
703<em class="replaceable">username</em><tt class="literal">@</tt><em class="replaceable">REALM</em>.
704The administrative account authentication information is specified
705with the <tt class="literal">-U</tt> option. The Active Directory realm
706must be supplied in all uppercase.</p>
707</dd>
708
709
710
711<dt><b><tt class="literal">ads printer info</tt> <em class="replaceable">[printer] [server]</em></b></dt>
712<dd>
713<p>Prints information on the specified printer on the specified server.
714The <em class="replaceable">printer</em> argument defaults to an
715asterisk (<tt class="literal">*</tt>), meaning all printers, and the
716<em class="replaceable">server</em> argument defaults to
717<tt class="literal">localhost</tt>.</p>
718</dd>
719
720
721
722<dt><b><tt class="literal">ads printer publish</tt> <em class="replaceable">printer_name</em></b></dt>
723<dd>
724<p>Publishes the specified printer in Active Directory.</p>
725</dd>
726
727
728
729<dt><b><tt class="literal">ads printer remove</tt> <em class="replaceable">printer_name</em></b></dt>
730<dd>
731<p>Removes the specified printer from Active Directory.</p>
732</dd>
733
734
735
736<dt><b><tt class="literal">ads search</tt> <em class="replaceable">expr attrib</em></b></dt>
737<dd>
738<p>Performs a raw Active Directory search, using the standard LDAP
739search expression and attributes specified by the
740<em class="replaceable">expr</em> and <em class="replaceable">attrib</em>
741arguments, respectively.</p>
742</dd>
743
744
745
746<dt><b><tt class="literal">ads status</tt></b></dt>
747<dd>
748<p>Prints details about the Active Directory computer account of the
749system.</p>
750</dd>
751
752
753
754<dt><b><tt class="literal">change localhost pass</tt></b></dt>
755<dd>
756<p>Changes the Active Directory password for the local
757system's computer trust account.</p>
758</dd>
759
760
761
762<dt><b><tt class="literal">domain</tt></b></dt>
763<dd>
764<p>Lists the domains or workgroups on the network.</p>
765</dd>
766
767
768
769<dt><b><tt class="literal">file</tt></b></dt>
770<dd>
771<p>Lists open files on the server.</p>
772</dd>
773
774
775
776<dt><b><tt class="literal">file close</tt> <em class="replaceable">file_id</em></b></dt>
777<dd>
778<p>Closes the specified file.</p>
779</dd>
780
781
782
783<dt><b><tt class="literal">file info</tt> <em class="replaceable">file_id</em></b></dt>
784<dd>
785<p>Prints information about the specified file, which must be open.</p>
786</dd>
787
788
789
790<dt><b><tt class="literal">file user</tt> <em class="replaceable">username</em></b></dt>
791<dd>
792<p>Lists all files opened on the server by the user specified by
793<em class="replaceable">username</em>.</p>
794</dd>
795
796
797
798<dt><b><tt class="literal">group add</tt> <em class="replaceable">group_name</em></b></dt>
799<dd>
800<p>Adds the specified group. This function accepts the miscellaneous
801option <tt class="literal">-C</tt> <em class="replaceable">comment</em>
802(which can also be specified as <tt class="literal">-
803-comment=</tt><em class="replaceable">string</em>) to set the
804descriptive comment for the group.</p>
805</dd>
806
807
808
809<dt><b><tt class="literal">group delete</tt> <em class="replaceable">group_name</em></b></dt>
810<dd>
811<p>Deletes the specified group.</p>
812</dd>
813
814
815
816<dt><b><tt class="literal">groupmember add</tt> <em class="replaceable">group_name username</em></b></dt>
817<dd>
818<p>Adds the user specified by <em class="replaceable">username</em> to the
819group specified by <em class="replaceable">group_name</em>.</p>
820</dd>
821
822
823
824<dt><b><tt class="literal">groupmember delete</tt> <em class="replaceable">group_name username</em></b></dt>
825<dd>
826<p>Deletes the user specified by <em class="replaceable">username</em>
827from the group specified by <em class="replaceable">group_name</em>.</p>
828</dd>
829
830
831
832<dt><b><tt class="literal">groupmember list</tt> <em class="replaceable">group_name</em></b></dt>
833<dd>
834<p>Lists the users who are members of the specified group.</p>
835</dd>
836
837
838
839<dt><b><tt class="literal">help</tt></b></dt>
840<dd>
841<p>Prints a help message for the <em class="emphasis">net</em> command.</p>
842</dd>
843
844
845
846<dt><b><tt class="literal">help</tt> <em class="replaceable">method</em></b></dt>
847<dd>
848<p>Prints a help message for <em class="replaceable">method</em>, which
849can be <tt class="literal">ads</tt>, <tt class="literal">rap</tt>, or
850<tt class="literal">rpc</tt>. This lists the functions that can use the
851method, along with a brief description.</p>
852</dd>
853
854
855
856<dt><b><tt class="literal">help</tt> <em class="replaceable">function</em></b></dt>
857<dd>
858<p>Prints a help message for the specified function, which can be more
859than one word.</p>
860</dd>
861
862
863
864<dt><b><tt class="literal">info</tt></b></dt>
865<dd>
866<p>Must be preceded by a method. See the <tt class="literal">ads</tt>
867<tt class="literal">info</tt> and <tt class="literal">rpc</tt>
868<tt class="literal">info</tt> functions.</p>
869</dd>
870
871
872
873<dt><b><tt class="literal">join</tt></b></dt>
874<dd>
875<p>Joins the computer to a Windows NT domain or Active Directory realm.
876If the method argument is not specified, a check is made to determine
877if Active Directory is in use, and if so, <tt class="literal">ads join</tt>
878is performed. Otherwise, <tt class="literal">rpc join</tt> is run. See also
879the <tt class="literal">ads join</tt> and <tt class="literal">rpc join</tt>
880functions.</p>
881</dd>
882
883
884
885<dt><b><tt class="literal">leave</tt></b></dt>
886<dd>
887<p>Must be preceded by a method. See the <tt class="literal">ads</tt>
888<tt class="literal">leave</tt> function.</p>
889</dd>
890
891
892
893<dt><b><tt class="literal">lookup dc</tt> <em class="replaceable">[domain]</em></b></dt>
894<dd>
895<p>Prints the IP address of the specified domain's
896domain controllers. The domain defaults to the value of the
897<tt class="literal">workgroup</tt> parameter in the Samba configuration
898file.</p>
899</dd>
900
901
902
903<dt><b><tt class="literal">lookup host</tt> <em class="replaceable">hostname [type]</em></b></dt>
904<dd>
905<p>Prints the IP address of the specified host.</p>
906</dd>
907
908
909
910<dt><b><tt class="literal">lookup kdc</tt> <em class="replaceable">[realm]</em></b></dt>
911<dd>
912<p>Prints the IP address of the specified realm's
913Kerberos domain controller. If <em class="replaceable">realm</em> is
914not specified, it defaults to the value of the
915<tt class="literal">realm</tt> parameter in the Samba configuration file.</p>
916</dd>
917
918
919
920<dt><b><tt class="literal">lookup ldap</tt> <em class="replaceable">[domain]</em></b></dt>
921<dd>
922<p>Prints the IP address of the specified domain's LDAP
923server. If <em class="replaceable">domain</em> is not specified, it
924defaults to the value of the <tt class="literal">workgroup</tt> parameter
925in the Samba configuration file.</p>
926</dd>
927
928
929
930<dt><b><tt class="literal">lookup master</tt> <em class="replaceable">[domain]</em></b></dt>
931<dd>
932<p>Prints the IP address of the master browser of the specified domain
933or workgroup. If <em class="replaceable">domain</em> is not specified,
934it defaults to the value of the <tt class="literal">workgroup</tt>
935parameter in the Samba configuration file.</p>
936</dd>
937
938
939
940<dt><b><tt class="literal">password</tt> <em class="replaceable">username old_password new_password</em></b></dt>
941<dd>
942<p>Changes the password for the user specified by the
943<em class="replaceable">username</em> argument. The
944user's old and new passwords are provided in plain
945text as part of the command. Be careful regarding security issues.
946See also the <tt class="literal">ads password</tt> function.</p>
947</dd>
948
949
950
951<dt><b><tt class="literal">printer info</tt></b></dt>
952<dd>
953<p>See the <tt class="literal">ads printer info</tt> function.</p>
954</dd>
955
956
957
958<dt><b><tt class="literal">printer publish</tt></b></dt>
959<dd>
960<p>See the <tt class="literal">ads printer publish</tt> function.</p>
961</dd>
962
963
964
965<dt><b><tt class="literal">printer remove</tt></b></dt>
966<dd>
967<p>See the <tt class="literal">ads printer remove</tt> function.</p>
968</dd>
969
970
971
972<dt><b><tt class="literal">printq</tt></b></dt>
973<dd>
974<p>Prints information (including the job IDs) about printer queues on
975the server.</p>
976</dd>
977
978
979
980<dt><b><tt class="literal">printq delete</tt> <em class="replaceable">queue_name</em></b></dt>
981<dd>
982<p>Deletes the specified printer queue. The
983<tt class="literal">-j</tt>
984<em class="replaceable">job_id</em> (which can also be
985specified as
986<tt class="literal">--jobid</tt><em class="emphasis">=</em><em class="replaceable">job_id</em>
987) option may be used to specify the job ID of the queue.</p>
988</dd>
989
990
991
992<dt><b><tt class="literal">rpc abortshutdown</tt></b></dt>
993<dd>
994<p>Aborts the shutdown of a remote server.</p>
995</dd>
996
997
998
999<dt><b><tt class="literal">rpc info</tt></b></dt>
1000<dd>
1001<p>Prints information about the server's domain. The
1002method (<tt class="literal">rpc</tt>) must be specified to differentiate
1003this function from the <tt class="literal">ads</tt> <tt class="literal">info</tt>
1004function.</p>
1005</dd>
1006
1007
1008
1009<dt><b><tt class="literal">rpc join</tt> </b></dt>
1010<dd>
1011<p>Joins a computer to a Windows NT domain. If the <tt class="literal">-U</tt>
1012<em class="replaceable">username</em><tt class="literal">%</tt><em class="replaceable">password</em>
1013option is included, the specified username and password will be used
1014as the administrative account required for authenticating with the
1015PDC. If the <tt class="literal">-U</tt> option is not included, this
1016function can be used only to join the computer to the domain after
1017the computer account has been created using the Server Manager. The
1018method (<tt class="literal">rpc</tt>) must be specified to differentiate
1019this function from the <tt class="literal">ads</tt> <tt class="literal">join</tt>
1020function.</p>
1021</dd>
1022
1023
1024
1025<dt><b><tt class="literal">rpc shutdown</tt></b></dt>
1026<dd>
1027<p>Shuts down a server. This function accepts the <tt class="literal">-r</tt>,
1028<tt class="literal">-f</tt>, <tt class="literal">-t</tt>, and
1029<tt class="literal">-c</tt> miscellaneous options. The
1030<tt class="literal">-r</tt> option (which can also be specified as
1031<tt class="literal">--reboot</tt>) requests that the system reboot after
1032shutting down. The <tt class="literal">-f</tt> option (which can also be
1033specified as <tt class="literal">--force</tt>) forces a shutdown. The
1034<tt class="literal">-t</tt> <em class="replaceable">timeout</em> option
1035(which can also be specified as <tt class="literal">-
1036-timeout=</tt><em class="replaceable">number</em>) specifies the
1037number of seconds to wait before shutting down, and the
1038<tt class="literal">-c</tt> <em class="replaceable">comment</em> option
1039(which can also be specified as <tt class="literal">-
1040-comment=</tt><em class="replaceable">string</em>) can be used to
1041specify a message to the client user. On Windows, the comment appears
1042in the Message area in the System Shutdown dialog box.</p>
1043</dd>
1044
1045
1046
1047<dt><b><tt class="literal">rpc trustdom add</tt> <em class="replaceable">domain_name</em></b></dt>
1048<dd>
1049<p>Adds an account for the trust relationship with the specified Windows
1050NT domain.</p>
1051</dd>
1052
1053
1054
1055<dt><b><tt class="literal">rpc trustdom establish</tt> <em class="replaceable">domain_name</em></b></dt>
1056<dd>
1057<p>Establishes a trust relationship with the specified Windows NT domain.</p>
1058</dd>
1059
1060
1061
1062<dt><b><tt class="literal">rpc trustdom revoke</tt> <em class="replaceable">domain_name</em></b></dt>
1063<dd>
1064<p>Revokes the trust relationship with the specified Windows NT domain.</p>
1065</dd>
1066
1067
1068
1069<dt><b><tt class="literal">search</tt></b></dt>
1070<dd>
1071<p>See the <tt class="literal">ads search</tt> function.</p>
1072</dd>
1073
1074
1075
1076<dt><b><tt class="literal">server</tt></b></dt>
1077<dd>
1078<p>Lists servers in the domain or workgroup, which defaults to the value
1079of the <tt class="literal">workgroup</tt> parameter in the Samba
1080configuration file.</p>
1081</dd>
1082
1083
1084
1085<dt><b><tt class="literal">session</tt></b></dt>
1086<dd>
1087<p>Lists clients with open sessions to the server.</p>
1088</dd>
1089
1090
1091
1092<dt><b><tt class="literal">session delete NetBIOS_</tt><em class="replaceable">name</em></b></dt>
1093<dd>
1094<p>Closes the session to the server from the specified client. A synonym
1095is <tt class="literal">session</tt> <tt class="literal">close</tt>.</p>
1096</dd>
1097
1098
1099
1100<dt><b><tt class="literal">session close</tt></b></dt>
1101<dd>
1102<p>A synonym for <tt class="literal">session delete</tt>.</p>
1103</dd>
1104
1105
1106
1107<dt><b><tt class="literal">share</tt></b></dt>
1108<dd>
1109<p>Lists the shares offered by the server. When a Windows 95/98/Me
1110server is the target system, it might be necessary to specify the
1111method as <tt class="literal">rap</tt> for this to work properly.</p>
1112</dd>
1113
1114
1115
1116<dt><b><tt class="literal">share add</tt> <em class="replaceable">share_name</em><tt class="literal">=</tt><em class="replaceable">server_path</em></b></dt>
1117<dd>
1118<p>Adds a share on the target server. The name of the share and the
1119folder to be shared are specified by the
1120<em class="replaceable">share_name</em><tt class="literal">=</tt><em class="replaceable">server_path</em>
1121argument, with <em class="replaceable">server_path</em> the Windows
1122directory name, with spaces and other special characters (if any)
1123quoted and with the backslashes escaped (e.g.,
1124&quot;<tt class="literal">data=C:\\Documents</tt> <tt class="literal">and</tt>
1125<tt class="literal">Settings\\jay\\Desktop\\data</tt>&quot;). The
1126<tt class="literal">-C</tt> <em class="replaceable">comment</em> option
1127(which can also be specified as <tt class="literal">-
1128-comment=</tt><em class="replaceable">string</em>) can be used to
1129define a description for the share. The <tt class="literal">-M</tt>
1130<em class="replaceable">number</em> option (which can also be specified
1131as <tt class="literal">--maxusers=</tt><em class="replaceable">number</em>)
1132can be used to set the maximum number of users that can connect to
1133the share. The method (<tt class="literal">rap</tt> or
1134<tt class="literal">rpc</tt>) might need to be specified for this function
1135to work. The regular folder icon cannot change into a
1136&quot;shared folder&quot; icon in Windows
1137Explorer until the display is refreshed.</p>
1138</dd>
1139
1140
1141
1142<dt><b><tt class="literal">share delete</tt> <em class="replaceable">share_name</em></b></dt>
1143<dd>
1144<p>Deletes a share from the target server. The
1145<em class="replaceable">share_name</em> argument is simply the name of
1146the share on the target server, not a UNC. The method
1147(<tt class="literal">rap</tt> or <tt class="literal">rpc</tt>) might need to be
1148specified for this function to work. The &quot;shared
1149folder&quot; icon in Windows Explorer cannot change back
1150to the regular folder icon until the display is refreshed.</p>
1151</dd>
1152
1153
1154
1155<dt><b><tt class="literal">shutdown</tt></b></dt>
1156<dd>
1157<p>See the <tt class="literal">rpc shutdown</tt> function.</p>
1158</dd>
1159
1160
1161
1162<dt><b><tt class="literal">status</tt></b></dt>
1163<dd>
1164<p>See the <tt class="literal">ads status</tt> function.</p>
1165</dd>
1166
1167
1168
1169<dt><b><tt class="literal">time</tt></b></dt>
1170<dd>
1171<p>Displays the system time&mdash;in Unix <em class="emphasis">date</em>
1172command format&mdash;on the target system.</p>
1173</dd>
1174
1175
1176
1177<dt><b><tt class="literal">time set</tt></b></dt>
1178<dd>
1179<p>Sets the local system's hardware clock using the
1180time obtained from the operating system.</p>
1181</dd>
1182
1183
1184
1185<dt><b><tt class="literal">time system</tt></b></dt>
1186<dd>
1187<p>Sets the time on the local system using the time obtained from the
1188remote system.</p>
1189</dd>
1190
1191
1192
1193<dt><b><tt class="literal">time zone</tt></b></dt>
1194<dd>
1195<p>Prints the time zone (in hours from GMT) in use on the system.</p>
1196</dd>
1197
1198
1199
1200<dt><b><tt class="literal">trustdom add</tt></b></dt>
1201<dd>
1202<p>See the <tt class="literal">rpc trustdom add</tt> function.</p>
1203</dd>
1204
1205
1206
1207<dt><b><tt class="literal">trustdom establish</tt></b></dt>
1208<dd>
1209<p>See the <tt class="literal">rpc trustdom establish</tt> function.</p>
1210</dd>
1211
1212
1213
1214<dt><b><tt class="literal">trustdom revoke</tt></b></dt>
1215<dd>
1216<p>See the <tt class="literal">rpc trustdom revoke</tt> function.</p>
1217</dd>
1218
1219
1220
1221<dt><b><tt class="literal">user</tt></b></dt>
1222<dd>
1223<p>Lists user accounts. The method can be specified as
1224<tt class="literal">ads</tt>, <tt class="literal">rap</tt>, or
1225<tt class="literal">rpc</tt>.</p>
1226</dd>
1227
1228
1229
1230<dt><b><tt class="literal">user add</tt> <em class="replaceable">username [password]</em></b></dt>
1231<dd>
1232<p>Adds a user account for the user specified by
1233<em class="replaceable">username</em>. The <tt class="literal">-c</tt>
1234<em class="replaceable">comment</em> option (which can also be
1235specified as <tt class="literal">-
1236-comment=</tt><em class="replaceable">string</em>) can be used to
1237set a comment for the account. The <tt class="literal">-F</tt>
1238<em class="replaceable">user_flags</em> option can be used to set flags
1239(specified in numeric format) for the account. The method can be
1240specified as <tt class="literal">ads</tt>, <tt class="literal">rap</tt>, or
1241<tt class="literal">rpc</tt>.</p>
1242</dd>
1243
1244
1245
1246<dt><b><tt class="literal">user delete</tt> <em class="replaceable">username</em></b></dt>
1247<dd>
1248<p>Deletes the specified user's account. The method can
1249be specified as <tt class="literal">ads</tt>, <tt class="literal">rap</tt>, or
1250<tt class="literal">rpc</tt>.</p>
1251</dd>
1252
1253
1254
1255<dt><b><tt class="literal">user info</tt> <em class="replaceable">username</em></b></dt>
1256<dd>
1257<p>Lists the domain groups to which the specified user belongs. The
1258method can be specified as <tt class="literal">ads</tt>,
1259<tt class="literal">rap</tt>, or <tt class="literal">rpc</tt>. <a name="INDEX-10"/></p>
1260</dd>
1261
1262</dl>
1263
1264
1265</div>
1266</div>
1267
1268<a name="INDEX-11"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>nmblookup</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">nmblookup</em> program is a client program that
1269allows command-line access to NetBIOS name service for resolving
1270NetBIOS computer names into IP addresses. The program works by
1271broadcasting its queries on the local subnet until a machine with the
1272specified name responds. You can think of it as a Windows analog of
1273<em class="emphasis">nslookup</em> or <em class="emphasis">dig</em>. This is
1274useful for looking up regular computer names, as well as
1275special-purpose names, such as _ _MSBROWSE_ _ . If you wish to query
1276for a particular type of NetBIOS name, add the NetBIOS type to the
1277end of the name, using the format
1278<em class="replaceable">netbios_name</em><tt class="literal">#&lt;</tt><em class="replaceable">dd</em><tt class="literal">&gt;</tt>.</p>
1279<div class="sect1"><a name="appc-28-fm2xml"/>
1280
1281<h4 class="refsect1">Command synopsis</h4>
1282
1283<blockquote><pre class="code">nmblookup <em class="replaceable">[options] netbios_name</em></pre></blockquote>
1284
1285
1286</div>
1287
1288<div class="sect1"><a name="appc-29-fm2xml"/>
1289
1290<h4 class="refsect1">Options</h4>
1291
1292<dl>
1293<dt><b><tt class="literal">-A</tt></b></dt>
1294<dd>
1295<p>Interprets <em class="replaceable">netbios_name</em> as an IP address
1296and does a node status query on it.</p>
1297</dd>
1298
1299
1300
1301<dt><b><tt class="literal">-B</tt> <em class="replaceable">broadcast_address</em></b></dt>
1302<dd>
1303<p>Sends the query to the given broadcast address. The default is to
1304send the query to the broadcast address of the primary network
1305interface.</p>
1306</dd>
1307
1308
1309
1310<dt><b><tt class="literal">-d</tt> <em class="replaceable">debug_level</em></b></dt>
1311<dd>
1312<p>Sets the debug (sometimes called logging) level. The level can range
1313from 0 to 10. Debug level 0 logs only the most important messages.
1314Level 1 is normal; levels 3 and above are primarily used by
1315developers for debugging the <em class="emphasis">nmblookup</em> program
1316itself and slow the program considerably.</p>
1317</dd>
1318
1319
1320
1321<dt><b><tt class="literal">-f</tt></b></dt>
1322<dd>
1323<p>Prints the flags in the packet headers.</p>
1324</dd>
1325
1326
1327
1328<dt><b><tt class="literal">-h</tt></b></dt>
1329<dd>
1330<p>Prints command-line usage information for the program.</p>
1331</dd>
1332
1333
1334
1335<dt><b><tt class="literal">-i</tt> <em class="replaceable">scope</em></b></dt>
1336<dd>
1337<p>Sets a NetBIOS scope identifier. NetBIOS scope is a rarely used
1338precursor to workgroups.</p>
1339</dd>
1340
1341
1342
1343<dt><b><tt class="literal">-M</tt></b></dt>
1344<dd>
1345<p>Searches for a local master browser by looking up
1346<em class="replaceable">netbios_name</em><tt class="literal">&lt;1d&gt;</tt>.
1347If <em class="replaceable">netbios_name</em> is specified as a dash
1348(<tt class="literal">-</tt>), a lookup is done on the special name _
1349_MSBROWSE_ _ .</p>
1350</dd>
1351
1352
1353
1354<dt><b><tt class="literal">-R</tt></b></dt>
1355<dd>
1356<p>Sets the &quot;recursion desired&quot; bit in
1357the packet. This causes the system that responds to try a WINS lookup
1358and return the address and any other information the WINS server has
1359saved.</p>
1360</dd>
1361
1362
1363
1364<dt><b><tt class="literal">-r</tt></b></dt>
1365<dd>
1366<p>Uses the <tt class="literal">root</tt> port of 137. This option exists as a
1367bug workaround for Windows 95. This option might require the user to
1368be superuser.</p>
1369</dd>
1370
1371
1372
1373<dt><b><tt class="literal">-S</tt></b></dt>
1374<dd>
1375<p>Performs a node status query once the name query has returned an IP
1376address. This returns all the resource types that the system knows
1377about, including their numeric attributes. For example:</p>
1378
1379
1380<blockquote><pre class="code">$ <tt class="userinput"><b>nmblookup -S toltec</b></tt>
1381querying toltec on 172.16.1.255
1382172.16.1.1 toltec&lt;00&gt;
1383Looking up status of 172.16.1.1
1384    TOLTEC          &lt;00&gt; -         M &lt;ACTIVE&gt;
1385    TOLTEC          &lt;03&gt; -         M &lt;ACTIVE&gt;
1386    TOLTEC          &lt;20&gt; -         M &lt;ACTIVE&gt;
1387    ..__MSBROWSE__. &lt;01&gt; - &lt;GROUP&gt; M &lt;ACTIVE&gt;
1388    METRAN          &lt;00&gt; - &lt;GROUP&gt; M &lt;ACTIVE&gt;
1389    METRAN          &lt;1b&gt; -         M &lt;ACTIVE&gt;
1390    METRAN          &lt;1c&gt; - &lt;GROUP&gt; M &lt;ACTIVE&gt;
1391    METRAN          &lt;1d&gt; -         M &lt;ACTIVE&gt;
1392    METRAN          &lt;1e&gt; - &lt;GROUP&gt; M &lt;ACTIVE&gt;</pre></blockquote>
1393</dd>
1394
1395
1396<dt><b><tt class="literal">-s</tt> <em class="replaceable">configuration_ file</em></b></dt>
1397<dd>
1398<p>Specifies the location of the Samba configuration file. Although the
1399file defaults to <em class="filename">/usr/local/samba/lib/smb.conf</em>,
1400you can override it here on the command line. Normally used for
1401debugging.</p>
1402</dd>
1403
1404
1405
1406<dt><b><tt class="literal">-T</tt></b></dt>
1407<dd>
1408<p>Translates IP addresses into resolved names.</p>
1409</dd>
1410
1411
1412
1413<dt><b><tt class="literal">-U</tt> <em class="replaceable">unicast_address</em></b></dt>
1414<dd>
1415<p>Performs a unicast query to the specified address. Used with
1416<tt class="literal">-R</tt> to query WINS servers.</p>
1417</dd>
1418
1419</dl>
1420
1421
1422<p>Note that <em class="emphasis">nmblookup</em> has no option for setting
1423the workgroup. You can get around this by putting
1424<tt class="literal">workgroup</tt> <tt class="literal">=</tt>
1425<em class="replaceable">workgroup_name</em> in a file and passing it to
1426<em class="emphasis">nmblookup</em> with the
1427<tt class="literal">-s</tt> option.</p>
1428
1429</div>
1430</div>
1431
1432<a name="INDEX-12"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>pdbedit</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This program, new to Samba 3.0, can be used to manage accounts that
1433are held in a SAM database. The implementation of the database can be
1434any of the types supported by Samba, including the
1435<em class="filename">smbpasswd</em> file, LDAP, NIS+ and the
1436<em class="filename">tdb</em> database library. The user must be the
1437superuser to use this tool.</p>
1438<div class="sect1"><a name="appc-31-fm2xml"/>
1439
1440<h4 class="refsect1">Command synopsis</h4>
1441
1442<blockquote><pre class="code">pdbedit <em class="replaceable">[options]</em></pre></blockquote>
1443
1444
1445</div>
1446
1447<div class="sect1"><a name="appc-32-fm2xml"/>
1448
1449<h4 class="refsect1">Options</h4>
1450
1451<dl>
1452<dt><b><tt class="literal">-a</tt></b></dt>
1453<dd>
1454<p>Adds the user specified by the <tt class="literal">-u</tt> option to the
1455SAM database. The command issues a prompt for the
1456user's password.</p>
1457</dd>
1458
1459
1460
1461<dt><b><tt class="literal">-d</tt> <em class="replaceable">drive_letter</em></b></dt>
1462<dd>
1463<p>Sets the Windows drive letter to which to map the
1464user's home directory. The drive letter should be
1465specified as a letter followed by a colon&mdash;e.g.,
1466<tt class="literal">H</tt>:.</p>
1467</dd>
1468
1469
1470
1471<dt><b><tt class="literal">-D</tt> <em class="replaceable">debug_level</em></b></dt>
1472<dd>
1473<p>Sets the debug (sometimes called logging) level. The level can range
1474from 0 to 10. Debug level 0 logs only the most important messages.
1475Level 1 is normal, and levels 3 and above are primarily for
1476debugging.</p>
1477</dd>
1478
1479
1480
1481<dt><b><tt class="literal">-e</tt> <em class="replaceable">pwdb_backend</em></b></dt>
1482<dd>
1483<p>Exports the user account database to another format, written to the
1484specified location. Used for migrating from one type of account
1485database to another. The <em class="replaceable">pwdb_backend</em>
1486argument is specified in the format of a database type, followed by a
1487colon, then the location of the database. For example, to export the
1488existing account database to an <em class="filename">smbpasswd</em>
1489database in the file
1490<em class="filename">/usr/local/samba/private/smbpw</em>,
1491<em class="replaceable">pwdb_backend</em> would be specified as
1492<tt class="literal">smbpasswd:/usr/local/samba/private/smbpw</tt>. The
1493allowable database types are <tt class="literal">smbpasswd</tt>,
1494<tt class="literal">smbpasswd nua</tt>, <tt class="literal">tdbsam</tt>,
1495<tt class="literal">tdbsam nua</tt>, <tt class="literal">ldapsam</tt>,
1496<tt class="literal">ldapsam_nua</tt>, and <tt class="literal">plugin</tt>.</p>
1497</dd>
1498
1499
1500
1501<dt><b><tt class="literal">-f</tt> <em class="replaceable">full_name</em></b></dt>
1502<dd>
1503<p>Sets the full name of the user specified with the
1504<tt class="literal">-u</tt> option.</p>
1505</dd>
1506
1507
1508
1509<dt><b><tt class="literal">-h</tt> <em class="replaceable">unc</em></b></dt>
1510<dd>
1511<p>Sets the home directory path (as a UNC) for the user specified with
1512the <tt class="literal">-u</tt> option.</p>
1513</dd>
1514
1515
1516
1517<dt><b><tt class="literal">-i</tt> <em class="replaceable">pwdb_backend</em></b></dt>
1518<dd>
1519<p>Specifies a password database backend from which to retrieve account
1520information, overriding the one specified by the <tt class="literal">passdb
1521backend</tt> parameter in the Samba configuration file. This,
1522along with the <tt class="literal">-e</tt> option, is useful for migrating
1523user accounts from one type of account database to another. See the
1524<tt class="literal">-e</tt> option regarding how to specify the
1525<em class="replaceable">pwdb_backend</em> argument.</p>
1526</dd>
1527
1528
1529
1530<dt><b><tt class="literal">-l</tt></b></dt>
1531<dd>
1532<p>Lists the user accounts in the database. See also the
1533<tt class="literal">-v</tt> option.</p>
1534</dd>
1535
1536
1537
1538<dt><b><tt class="literal">-m</tt></b></dt>
1539<dd>
1540<p>Indicates that the account is a computer account rather than a user
1541account. Used only with the <tt class="literal">-a</tt> option when
1542creating the account. In this case, the <tt class="literal">-u</tt> option
1543specifies the computer name rather than a username.</p>
1544</dd>
1545
1546
1547
1548<dt><b><tt class="literal">-p</tt> <em class="replaceable">unc</em></b></dt>
1549<dd>
1550<p>Sets the directory in which the user's profile is
1551kept. The directory is specified as a UNC.</p>
1552</dd>
1553
1554
1555
1556<dt><b><tt class="literal">-s</tt> <em class="replaceable">unc</em></b></dt>
1557<dd>
1558<p>Specifies the UNC of the user's logon script.</p>
1559</dd>
1560
1561
1562
1563<dt><b><tt class="literal">-u</tt> <em class="replaceable">username</em></b></dt>
1564<dd>
1565<p>Specifies the username of the account to add (with the
1566<tt class="literal">-a</tt> option), delete (with the <tt class="literal">-x</tt>
1567option), or modify.</p>
1568</dd>
1569
1570
1571
1572<dt><b><tt class="literal">-v</tt></b></dt>
1573<dd>
1574<p>Selects verbose mode when listing accounts with the
1575<tt class="literal">-l</tt> option. The account fields will be printed.</p>
1576</dd>
1577
1578
1579
1580<dt><b><tt class="literal">-w</tt></b></dt>
1581<dd>
1582<p>Selects the <tt class="literal">smbpasswd</tt> listing mode, for use with
1583the <tt class="literal">-l</tt> option, which prints information in the
1584same format as it would appear in an <em class="filename">smbpasswd</em>
1585file.</p>
1586</dd>
1587
1588
1589
1590<dt><b><tt class="literal">-x</tt></b></dt>
1591<dd>
1592<p>Deletes the user (specified with the <tt class="literal">-u</tt> option)
1593from the account database.</p>
1594</dd>
1595
1596</dl>
1597
1598
1599</div>
1600</div>
1601
1602<a name="INDEX-13"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>rpcclient</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This is a program for issuing administrative commands that are
1603implemented using Microsoft RPCs. It provides access to the RPCs that
1604Windows administrative GUIs use for system management. The
1605<em class="emphasis">rpcclient</em> command is mainly for use by advanced
1606users who understand the RPCs. More information on these can be found
1607in Microsoft's Platform Software Development Kit
1608(SDK), available for download from the Microsoft web site at
1609<a href="http://www.microsoft.com">http://www.microsoft.com</a>.</p><p>You can run a single <em class="emphasis">rpcclient</em> command by using
1610the <tt class="literal">-c command string</tt> option, or interactively
1611with <em class="emphasis">rpcclient</em> prompting for commands.</p>
1612<div class="sect1"><a name="appc-34-fm2xml"/>
1613
1614<h4 class="refsect1">Command Synopsis</h4>
1615
1616<p>rpcclient <em class="replaceable">server [options]</em></p>
1617
1618
1619</div>
1620
1621<div class="sect1"><a name="appc-35-fm2xml"/>
1622
1623<h4 class="refsect1">Options</h4>
1624
1625<dl>
1626<dt><b><tt class="literal">-A</tt> <em class="replaceable">filename</em></b></dt>
1627<dd>
1628<p>Specifies a file from which to read the authentication values used in
1629the connection. The format of the file is as follows:</p>
1630
1631<blockquote><pre class="code">username = <em class="replaceable">value</em>
1632password = <em class="replaceable">value</em>
1633domain   = <em class="replaceable">value</em></pre></blockquote>
1634
1635<p>This option is used to avoid password prompts or to have the password
1636appear in plain text inside scripts. The permissions on the file
1637should be very restrictive (0600, for example) to prevent access from
1638unwanted users.</p>
1639</dd>
1640
1641
1642
1643<dt><b><tt class="literal">-c</tt> <em class="replaceable">command_string</em></b></dt>
1644<dd>
1645<p>Executes a sequence of semicolon-separated commands. Commands are
1646listed in the following section.</p>
1647</dd>
1648
1649
1650
1651<dt><b><tt class="literal">-d</tt> <em class="replaceable">debuglevel</em></b></dt>
1652<dd>
1653<p>Sets the debug (sometimes called logging) level. The level can range
1654from 0 to 10. Specifying the value on the command line overrides the
1655value specified in the <em class="filename">smb.conf</em> file. Debug
1656level 0 logs only the most important messages; level 1 is normal;
1657levels 3 and above are primarily for debugging and slow the program
1658considerably.</p>
1659</dd>
1660
1661
1662
1663<dt><b><tt class="literal">-h</tt></b></dt>
1664<dd>
1665<p>Prints a summary of options.</p>
1666</dd>
1667
1668
1669
1670<dt><b><tt class="literal">-l</tt> <em class="replaceable">logbasename</em></b></dt>
1671<dd>
1672<p>Sets the filename for log/debug files. The extension
1673<em class="filename">.client</em> is appended to the filename.</p>
1674</dd>
1675
1676
1677
1678<dt><b><tt class="literal">-N</tt></b></dt>
1679<dd>
1680<p>Does not prompt for a password. This is used when Samba is configured
1681for share-mode security and a service with no password is being
1682accessed.</p>
1683</dd>
1684
1685
1686
1687<dt><b><tt class="literal">-s</tt> <em class="replaceable">filename</em></b></dt>
1688<dd>
1689<p>Specifies the location of the Samba configuration file, which by
1690default is usually
1691<em class="filename">/usr/local/samba/lib/smb.conf</em>.</p>
1692</dd>
1693
1694
1695
1696<dt><b><tt class="literal">-U</tt> <em class="replaceable">username[</em><tt class="literal">%</tt><em class="replaceable">password]</em></b></dt>
1697<dd>
1698<p>Sets the SMB username or username and password to use. Be careful
1699when specifying the password with
1700<tt class="literal">%</tt><em class="replaceable">password</em>; this is a
1701major security risk. If
1702<tt class="literal">%</tt><em class="replaceable">password</em> is not
1703specified, the user will be prompted for the password, which will not
1704be echoed. Normally the user is set from the USER or LOGNAME
1705environment variable. The <tt class="literal">-U</tt> option by itself
1706means to use the guest account. See also <tt class="literal">-A</tt>.</p>
1707</dd>
1708
1709
1710
1711<dt><b><tt class="literal">-W</tt> <em class="replaceable">domain</em></b></dt>
1712<dd>
1713<p>Sets the domain, overriding the <tt class="literal">workgroup</tt>
1714parameter in the Samba configuration file. If the domain is the
1715server's NetBIOS name, it causes the client to log
1716on using the server's local SAM database rather than
1717the SAM of the domain.</p>
1718</dd>
1719
1720</dl>
1721
1722
1723</div>
1724</div>
1725
1726<a name="INDEX-14"/><a name="INDEX-15"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>rpcclient commands</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>Aside from a few miscellaneous commands, the
1727<em class="emphasis">rpclient</em> commands fall into three groups:
1728LSARPC, SAMR, and SPOOLSS. The function names mentioned in some of
1729the commands are those documented in the Microsoft Platform SDK.</p>
1730<div class="sect1"><a name="appc-37-fm2xml"/>
1731
1732<h4 class="refsect1">General commands</h4>
1733
1734<dl>
1735<dt><b><tt class="literal">debuglevel</tt> <em class="replaceable">level</em></b></dt>
1736<dd>
1737<p>Sets the debugging level to <em class="replaceable">level</em>. With no
1738argument, the current debugging level is printed.</p>
1739</dd>
1740
1741
1742
1743<dt><b><tt class="literal">help</tt></b></dt>
1744<dd>
1745<p>Prints help on the commands.</p>
1746</dd>
1747
1748
1749
1750<dt><b><tt class="literal">quit</tt></b></dt>
1751<dd>
1752<p>Exits <em class="emphasis">rpcclient</em>. A synonym is
1753<tt class="literal">exit</tt>.</p>
1754</dd>
1755
1756</dl>
1757
1758
1759</div>
1760
1761<div class="sect1"><a name="appc-38-fm2xml"/>
1762
1763<h4 class="refsect1">Local Security Authority Remote Procedure Calls (LSARPC) commands</h4>
1764
1765<dl>
1766<dt><b><tt class="literal">enumprivs</tt></b></dt>
1767<dd>
1768<p>Lists the types of privileges known to this domain.</p>
1769</dd>
1770
1771
1772
1773<dt><b><tt class="literal">enumtrust</tt></b></dt>
1774<dd>
1775<p>Lists the domains trusted by this domain.</p>
1776</dd>
1777
1778
1779
1780<dt><b><tt class="literal">getdispname</tt> <em class="replaceable">priv_name</em></b></dt>
1781<dd>
1782<p>Prints information on the privilege named
1783<em class="replaceable">priv_name</em>.</p>
1784</dd>
1785
1786
1787
1788<dt><b><tt class="literal">lookupsids</tt> <em class="replaceable">name</em></b></dt>
1789<dd>
1790<p>Finds a name that corresponds to a security identifier (SID).</p>
1791</dd>
1792
1793
1794
1795<dt><b><tt class="literal">lookupnames</tt> <em class="replaceable">sid</em></b></dt>
1796<dd>
1797<p>Finds the SID for one or more names.</p>
1798</dd>
1799
1800
1801
1802<dt><b><tt class="literal">lsaquery</tt></b></dt>
1803<dd>
1804<p>Queries the LSA object.</p>
1805</dd>
1806
1807
1808
1809<dt><b><tt class="literal">lsaenumsid</tt></b></dt>
1810<dd>
1811<p>Lists SIDs for the local LSA.</p>
1812</dd>
1813
1814
1815
1816<dt><b><tt class="literal">lsaquerysecobj</tt></b></dt>
1817<dd>
1818<p>Prints information on security objects for the LSA.</p>
1819</dd>
1820
1821</dl>
1822
1823
1824</div>
1825
1826<div class="sect1"><a name="appc-39-fm2xml"/>
1827
1828<h4 class="refsect1">Security Access Manager RPC (SAMR) commands</h4>
1829
1830<dl>
1831<dt><b><tt class="literal">createdomuser</tt> <em class="replaceable">username</em></b></dt>
1832<dd>
1833<p>Adds a new user in the domain.</p>
1834</dd>
1835
1836
1837
1838<dt><b><tt class="literal">deletedomuser</tt> <em class="replaceable">username</em></b></dt>
1839<dd>
1840<p>Removes a user from the domain.</p>
1841</dd>
1842
1843
1844
1845<dt><b><tt class="literal">enumalsgroups</tt> <em class="replaceable">type</em></b></dt>
1846<dd>
1847<p>Lists alias groups in the domain, along with their group RIDs. The
1848<em class="replaceable">type</em> argument can be either
1849<tt class="literal">builtin</tt>, to list Windows built-in groups such as
1850<tt class="literal">Administrators</tt> and <tt class="literal">Power</tt>
1851<tt class="literal">Users</tt>, or <tt class="literal">domain</tt>, to list
1852groups in the domain. See also the
1853<em class="emphasis">queryuseraliases</em> command.</p>
1854</dd>
1855
1856
1857
1858<dt><b><tt class="literal">enumdomgroups</tt></b></dt>
1859<dd>
1860<p>Lists the groups in the domain, along with their group RIDs.</p>
1861</dd>
1862
1863
1864
1865<dt><b><tt class="literal">queryaliasmem</tt> <em class="replaceable">user_rid</em></b></dt>
1866<dd>
1867<p>Prints information regarding alias membership. See also the
1868<em class="emphasis">queryuseraliases</em> command.</p>
1869</dd>
1870
1871
1872
1873<dt><b><tt class="literal">querydispinfo</tt></b></dt>
1874<dd>
1875<p>Prints out the account database. The information printed includes the
1876RID, username, and full name of each user. The RID is printed in
1877hexadecimal notation and can be used in this form for commands that
1878take a RID as an argument.</p>
1879</dd>
1880
1881
1882
1883<dt><b><tt class="literal">querydominfo</tt></b></dt>
1884<dd>
1885<p>Prints information regarding the domain. This includes the name of
1886the domain, as well as the number of users, groups, and aliases.</p>
1887</dd>
1888
1889
1890
1891<dt><b><tt class="literal">querygroup</tt> <em class="replaceable">group_rid</em></b></dt>
1892<dd>
1893<p>Given a group RID, prints the group name, description, number of
1894members, and group description.</p>
1895</dd>
1896
1897
1898
1899<dt><b><tt class="literal">queryuser</tt> <em class="replaceable">user_rid</em></b></dt>
1900<dd>
1901<p>Given a user RID, prints the corresponding username, full name, and
1902other information pertaining to the user.</p>
1903</dd>
1904
1905
1906
1907<dt><b><tt class="literal">queryuseraliases</tt> <em class="replaceable">type</em> <em class="replaceable">user_rid</em></b></dt>
1908<dd>
1909<p>Prints aliases for the user. The <em class="replaceable">type</em>
1910argument can be either <tt class="literal">builtin</tt> or
1911<tt class="literal">domain</tt>. Aliases are used with the Windows
1912messaging service and act like usernames, but they can be attached to
1913a computer rather than a user. This allows messages intended for a
1914user to be sent to a computer on which the user is either not logged
1915on, or logged on under another username.</p>
1916</dd>
1917
1918
1919
1920<dt><b><tt class="literal">queryusergroups</tt> <em class="replaceable">user_rid</em></b></dt>
1921<dd>
1922<p>Prints information on each group inhabited by the user.</p>
1923</dd>
1924
1925
1926
1927<dt><b><tt class="literal">querygroupmem</tt> <em class="replaceable">group_rid</em></b></dt>
1928<dd>
1929<p>Prints the RID and attributes for each member of the group.</p>
1930</dd>
1931
1932
1933
1934<dt><b><tt class="literal">samlookupnames</tt> <em class="replaceable">type username</em></b></dt>
1935<dd>
1936<p>Looks up the <em class="replaceable">username</em> in the SAM database
1937and prints its associated RID. The <em class="replaceable">type</em>
1938argument can be either <tt class="literal">builtin</tt>, to look up
1939built-in Windows usernames, or <tt class="literal">domain</tt>, to look up
1940names in the domain.</p>
1941</dd>
1942
1943
1944
1945<dt><b><tt class="literal">samlookuprids</tt> <em class="replaceable">type rid</em></b></dt>
1946<dd>
1947<p>Looks up <em class="replaceable">rid</em> in the SAM database and
1948prints its associated group or username. The
1949<em class="replaceable">type</em> argument can be either
1950<tt class="literal">builtin</tt>, to look up built-in Windows usernames, or
1951<tt class="literal">domain</tt>, to look up names in the domain. The RID
1952argument can be given in either 0xDDD hexadecimal notation or
1953decimal.</p>
1954</dd>
1955
1956
1957
1958<dt><b><tt class="literal">samquerysecobj</tt></b></dt>
1959<dd>
1960<p>Prints information on security objects (such as ACLs) in the SAM
1961database.</p>
1962</dd>
1963
1964</dl>
1965
1966
1967</div>
1968
1969<div class="sect1"><a name="appc-40-fm2xml"/>
1970
1971<h4 class="refsect1">Windows NT/2000/XP Printing Services (SPOOLSS) commands</h4>
1972
1973<dl>
1974<dt><b><tt class="literal">adddriver</tt> <em class="replaceable">arch config_file</em> </b></dt>
1975<dd>
1976<p>Adds a printer driver to the server. The driver files must already
1977exist in the directory returned by <em class="emphasis">getdriverdir</em>.
1978The <em class="replaceable">arch</em> argument can be one of
1979<tt class="literal">Windows 4.0</tt> for Windows 95/98/Me, or
1980<tt class="literal">Windows NT x86</tt>, <tt class="literal">Windows NT
1981PowerPC</tt>, <tt class="literal">Windows Alpha_AXP</tt>, and
1982<tt class="literal">Windows NT R4000</tt>. Others might be introduced in
1983the future.</p>
1984
1985
1986<p>The <em class="replaceable">config_file</em> should contain:</p>
1987
1988<blockquote><pre class="code">Long Printer Name:\
1989Driver File Name:\
1990Data File Name:\
1991Config File Name:\
1992Help File Name:\
1993NULL:\
1994Default Data Type:\</pre></blockquote>
1995
1996<p>followed by a comma-separated list of files. Any empty fields should
1997contain the string <tt class="literal">NULL</tt>.</p>
1998</dd>
1999
2000
2001
2002<dt><b><tt class="literal">addprinter</tt> <em class="replaceable">printername sharename drivername port</em> </b></dt>
2003<dd>
2004<p>Adds a printer on the remote server as
2005<em class="replaceable">sharename</em>. The printer driver must already
2006be installed on the server with <em class="emphasis">adddriver</em>, and
2007the port must be a valid port name returned by
2008<em class="emphasis">enumports</em>.</p>
2009</dd>
2010
2011
2012
2013<dt><b><tt class="literal">deldriver</tt> <em class="replaceable">drivername</em></b></dt>
2014<dd>
2015<p>Deletes a printer driver (for all architectures) from the
2016server's list of printer drivers.</p>
2017</dd>
2018
2019
2020
2021<dt><b><tt class="literal">enumports</tt> <em class="replaceable">[level]</em></b></dt>
2022<dd>
2023<p>Prints information regarding the printer ports on the server. The
2024<em class="replaceable">level</em> argument can be <tt class="literal">1</tt>
2025or <tt class="literal">2</tt>. Level 1 is the default and prints out only
2026the Port Name. Information level 2 is the Port Name, Monitor Name,
2027Description, and Port Type.</p>
2028</dd>
2029
2030
2031
2032<dt><b><tt class="literal">enumdrivers</tt> <em class="replaceable">[level]</em> </b></dt>
2033<dd>
2034<p>Lists all the printer drivers on the system. The
2035<em class="replaceable">level</em> argument specifies the information
2036level. Level 1 is the default and prints the Driver Name(s). Level 2
2037prints the Version, Driver Name, Architecture, Driver Path, Data
2038File, and Config File. Level 3 prints the contents of Level 2, plus
2039the Help File, one or more Dependent Files, Monitor Name, and Default
2040Data Type.</p>
2041</dd>
2042
2043
2044
2045<dt><b><tt class="literal">enumprinters</tt> <em class="replaceable">[level]</em></b></dt>
2046<dd>
2047<p>Lists all installed printers, regardless of whether they are shared.
2048The <em class="replaceable">level</em> argument specifies the
2049information level. Level 1 is the default, and prints Flags, Name,
2050Description, and Comment. Level 2 prints the Server Name, Printer
2051Name, Share Name, Port Name, Driver Name, Comment, Location,
2052Separator File, Print Processor, Data Type, Parameters, Attributes,
2053Priority, Default Priority, Start Time, Until Time, Status, Current
2054Jobs, Average PPM (pages per minute), and a Security Descriptor.</p>
2055</dd>
2056
2057
2058
2059<dt><b><tt class="literal">getdriver</tt> <em class="replaceable">[level] printername</em></b></dt>
2060<dd>
2061<p>Prints the printer driver information for the given printer. The
2062<em class="replaceable">level</em> argument specifies the information
2063level.</p>
2064
2065
2066<p>Level 1 is the default, and prints the Driver Name. Level 2 prints
2067the Version, Driver Name, Architecture, Driver Path, Data File, and
2068Config File. Level 3 prints the contents of level 2, plus the Help
2069File, one or more Dependent Files, Monitor Name, and Default Data
2070Type.</p>
2071</dd>
2072
2073
2074<dt><b><tt class="literal">getdriverdir</tt> <em class="replaceable">arch</em></b></dt>
2075<dd>
2076<p>Retrieves the share name and directory for storing printer driver
2077files for a given architecture. Possible values for
2078<em class="replaceable">arch</em> are &quot;<tt class="literal">Windows</tt>
2079<tt class="literal">4.0</tt>&quot; for Windows 95/98/Me,
2080&quot;<tt class="literal">Windows</tt> <tt class="literal">NT</tt>
2081<tt class="literal">x86</tt>&quot; for Windows NT on Intel,
2082&quot;<tt class="literal">Windows</tt> <tt class="literal">NT</tt>
2083<tt class="literal">PowerPC</tt>&quot; for Windows NT on PowerPC,
2084&quot;<tt class="literal">Windows</tt> <tt class="literal">Alpha</tt>
2085<tt class="literal">AXP</tt>&quot; for Windows NT on Alpha, and
2086&quot;<tt class="literal">Windows</tt> <tt class="literal">NT</tt>
2087<tt class="literal">R4000</tt>&quot; for Windows NT on MIPS. Include the quote
2088marks in the command.</p>
2089</dd>
2090
2091
2092
2093<dt><b><tt class="literal">getprinter</tt> <em class="replaceable">printername</em></b></dt>
2094<dd>
2095<p>Prints the current printer information. The
2096<em class="replaceable">level</em> argument specifies the information
2097level.</p>
2098</dd>
2099
2100
2101
2102<dt><b><tt class="literal">openprinter</tt> <em class="replaceable">printername</em></b></dt>
2103<dd>
2104<p>Attempts to open and close a specified printer and reports whether it
2105was successful.</p>
2106</dd>
2107
2108
2109
2110<dt><b><tt class="literal">setdriver</tt> <em class="replaceable">printername drivername</em></b></dt>
2111<dd>
2112<p>Unconditionally updates the printer driver used by an installed
2113printer. Both the printer and printer driver must already be
2114correctly installed on the print server.</p>
2115</dd>
2116
2117
2118
2119<dt><b><tt class="literal">setprinter</tt> <em class="replaceable">printername comment</em></b></dt>
2120<dd>
2121<p>Assigns a comment string to a printer.<a name="INDEX-15"/></p>
2122</dd>
2123
2124</dl>
2125
2126
2127</div>
2128</div>
2129
2130<a name="INDEX-16"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbcacls</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This program provides a way of modifying Windows NT ACLs on files and
2131directories shared by the Samba server.</p>
2132<div class="sect1"><a name="appc-42-fm2xml"/>
2133
2134<h4 class="refsect1">Command synopsis</h4>
2135
2136<blockquote><pre class="code">smbcacls //<em class="replaceable">server</em>/<em class="replaceable">share filename</em> <em class="replaceable">[options]</em></pre></blockquote>
2137
2138
2139</div>
2140
2141<div class="sect1"><a name="appc-43-fm2xml"/>
2142
2143<h4 class="refsect1">Options</h4>
2144
2145<dl>
2146<dt><b><tt class="literal">-A</tt> <em class="replaceable">acls</em></b></dt>
2147<dd>
2148<p>Adds one or more ACLs to the file or directory. Any ACLs already
2149existing for the file or directory are unchanged.</p>
2150</dd>
2151
2152
2153
2154<dt><b><tt class="literal">-M</tt> <em class="replaceable">acls</em></b></dt>
2155<dd>
2156<p>Modifies the <em class="replaceable">mask</em> of the ACLs specified.
2157Refer to the following section, &quot;Specifying
2158ACLs,&quot; for details.</p>
2159</dd>
2160
2161
2162
2163<dt><b><tt class="literal">-D</tt> <em class="replaceable">acls</em></b></dt>
2164<dd>
2165<p>Deletes the specified ACLs.</p>
2166</dd>
2167
2168
2169
2170<dt><b><tt class="literal">-S</tt> <em class="replaceable">acls</em></b></dt>
2171<dd>
2172<p>Sets the specified ACLs, deleting any ACLs previously set on the file
2173or directory. The ACLs must contain at least a revision, type, owner,
2174and group.</p>
2175</dd>
2176
2177
2178
2179<dt><b><tt class="literal">-U</tt> <em class="replaceable">username</em></b></dt>
2180<dd>
2181<p>Sets the username used to connect to the specified service. The user
2182is prompted for a password unless the argument is specified as
2183<em class="replaceable">username</em><tt class="literal">%</tt><em class="replaceable">password</em>.
2184(Specifying the password on the command line is a security risk.) If
2185<tt class="literal">-U</tt>
2186<em class="replaceable">domain</em><tt class="literal">\\</tt><em class="replaceable">username</em>
2187is specified, the specified domain or workgroup will be used in place
2188of the one specified in the <em class="filename">smb.conf</em> file.</p>
2189</dd>
2190
2191
2192
2193<dt><b><tt class="literal">-C</tt> <em class="replaceable">username</em></b></dt>
2194<dd>
2195<p>Changes the owner of the file or directory. This is a shortcut for
2196<tt class="literal">-M</tt>
2197<tt class="literal">OWNER</tt>:<em class="replaceable">username</em>. The
2198<em class="replaceable">username</em> argument can be given as a
2199username or a SID in the form
2200<tt class="literal">S-1-</tt><em class="replaceable">N-N-D-D-D-R</em>.</p>
2201</dd>
2202
2203
2204
2205<dt><b><tt class="literal">-G</tt> <em class="replaceable">groupname</em></b></dt>
2206<dd>
2207<p>Changes the group of the file or directory. This is a shortcut for
2208<tt class="literal">-M</tt>
2209<tt class="literal">GROUP</tt>:<em class="replaceable">groupname</em>. The
2210<em class="replaceable">groupname</em> argument can be given as a group
2211name or a SID in the form
2212<tt class="literal">S-1-</tt><em class="replaceable">N-N-D-D-D-R</em>.</p>
2213</dd>
2214
2215
2216
2217<dt><b><tt class="literal">-n</tt></b></dt>
2218<dd>
2219<p>Causes all ACL information to be displayed in numeric format rather
2220than in readable strings.</p>
2221</dd>
2222
2223
2224
2225<dt><b><tt class="literal">-h</tt></b></dt>
2226<dd>
2227<p>Prints a help message.</p>
2228</dd>
2229
2230</dl>
2231
2232
2233</div>
2234
2235<div class="sect1"><a name="appc-44-fm2xml"/>
2236
2237<h4 class="refsect1">Specifying ACLs</h4>
2238<p>In the previous options, the same format is always used when
2239specifying ACLs. An ACL is made up of one or more Access Control
2240Entries (ACEs), separated by either commas or escaped newlines. An
2241ACE can be one of the following:</p>
2242
2243<blockquote class="simplelist">
2244
2245<p><tt class="literal">REVISION</tt>:<em class="replaceable">revision_number</em></p>
2246
2247
2248
2249
2250<p><tt class="literal">OWNER</tt>:<em class="replaceable">username_or_SID</em></p>
2251
2252
2253
2254
2255<p><tt class="literal">GROUP</tt>:<em class="replaceable">group_name_or_SID</em></p>
2256
2257
2258
2259
2260<p><tt class="literal">ACL</tt>:<em class="replaceable">name_or_SID</em>:<em class="replaceable">type</em>/<em class="replaceable">flags</em>/<em class="replaceable">mask</em></p>
2261
2262</blockquote>
2263
2264
2265<p>The <em class="replaceable">revision_number</em> should always be 1.
2266The <tt class="literal">OWNER</tt> and <tt class="literal">GROUP</tt> entries can
2267be used to set the owner and group for the file or directory. The
2268names can be the textual ones or SIDs in the form
2269<tt class="literal">S-1-</tt><em class="replaceable">N</em><tt class="literal">-</tt><em class="replaceable">N</em><tt class="literal">-</tt><em class="replaceable">D</em><tt class="literal">-</tt><em class="replaceable">D-D-R</em>.</p>
2270
2271<p>The <tt class="literal">ACL</tt> entry specifies what access rights to
2272apply to the file or directory. The
2273<em class="replaceable">name_or_SID</em> field specifies to which user
2274or group the permissions apply and can be supplied either as a
2275textual name or a SID. An ACE can be used to either allow or deny
2276access. The <em class="replaceable">type</em> field is set to
2277<tt class="literal">1</tt> to specify a permission to be allowed or
2278<tt class="literal">0</tt> for specifying a permission to deny. The
2279<em class="replaceable">mask</em> field is the name of the permission
2280and is one of the following:</p>
2281
2282<dl>
2283<dt><b><tt class="literal">R</tt></b></dt>
2284<dd>
2285<p>Read access.</p>
2286</dd>
2287
2288
2289
2290<dt><b><tt class="literal">W</tt></b></dt>
2291<dd>
2292<p>Write access.</p>
2293</dd>
2294
2295
2296
2297<dt><b><tt class="literal">X</tt></b></dt>
2298<dd>
2299<p>Execute permission.</p>
2300</dd>
2301
2302
2303
2304<dt><b><tt class="literal">D</tt></b></dt>
2305<dd>
2306<p>Permission to delete.</p>
2307</dd>
2308
2309
2310
2311<dt><b><tt class="literal">P</tt></b></dt>
2312<dd>
2313<p>Change permissions on the object.</p>
2314</dd>
2315
2316
2317
2318<dt><b><tt class="literal">O</tt></b></dt>
2319<dd>
2320<p>Take ownership.</p>
2321</dd>
2322
2323</dl>
2324
2325
2326<p>The following combined permissions can also be specified:</p>
2327
2328<dl>
2329<dt><b><tt class="literal">READ</tt></b></dt>
2330<dd>
2331<p>Equivalent to RX permissions</p>
2332</dd>
2333
2334
2335
2336<dt><b><tt class="literal">CHANGE</tt></b></dt>
2337<dd>
2338<p>Equivalent to RWXD permissions</p>
2339</dd>
2340
2341
2342
2343<dt><b><tt class="literal">FULL</tt></b></dt>
2344<dd>
2345<p>Equivalent to RWXDPO permissions</p>
2346</dd>
2347
2348</dl>
2349
2350
2351<p>The <em class="replaceable">flags</em> field is for specifying how
2352objects in directories are to inherit their default permissions from
2353their parent directory. For files, <em class="replaceable">flags</em>
2354is normally set to <tt class="literal">0</tt>. For directories,
2355<em class="replaceable">flags</em> is usually set to either
2356<tt class="literal">9</tt> or <tt class="literal">2</tt>.</p>
2357
2358</div>
2359</div>
2360
2361<a name="INDEX-17"/><a name="INDEX-18"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbclient</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">smbclient</em> program is the
2362&quot;Swiss army knife&quot; of the Samba
2363suite. Initially developed as a testing tool, it has become a command
2364shell capable of acting as a general-purpose Unix client, with a
2365command set very similar to that of <em class="emphasis">ftp</em>. It
2366offers the following set of functions:</p><ul><li>
2367<p>Interactive file transfer, similar to <em class="emphasis">ftp</em></p>
2368</li>
2369<li>
2370<p>Interactive printing to shared SMB printers</p>
2371</li>
2372<li>
2373<p>Interactive tar format archiving</p>
2374</li>
2375<li>
2376<p>Sending messages on the SMB network</p>
2377</li>
2378<li>
2379<p>Batch mode tar format archiving</p>
2380</li>
2381<li>
2382<p>&quot;What services do you have?&quot;
2383querying</p>
2384</li>
2385<li>
2386<p>Debugging</p>
2387</li></ul>
2388<div class="sect1"><a name="appc-45-fm2xml"/>
2389
2390<h4 class="refsect1">Command synopsis</h4>
2391
2392<blockquote><pre class="code">smbclient //<em class="replaceable">server</em>/<em class="replaceable">share</em> <em class="replaceable">[ password] [options]</em></pre></blockquote>
2393<p>It is possible to run <em class="emphasis">smbclient</em>
2394noninteractively, for use in scripts, by specifying the
2395<tt class="literal">-c</tt> option along with a list of commands to
2396execute. Otherwise, <em class="emphasis">smbclient</em> runs in
2397interactive mode, prompting for commands such as this:</p>
2398
2399<blockquote><pre class="code">smb:\&gt;</pre></blockquote>
2400<p>The backslash in the prompt is replaced by the current directory
2401within the share as you change your working directory with
2402<em class="emphasis">smbclient</em>'s
2403<em class="emphasis">cd</em> command.</p>
2404
2405</div>
2406
2407<div class="sect1"><a name="appc-46-fm2xml"/>
2408
2409<h4 class="refsect1">Options</h4>
2410
2411<dl>
2412<dt><b><tt class="literal">-A</tt> <em class="replaceable">authfile</em></b></dt>
2413<dd>
2414<p>Specifies a file from which to read the username and password used
2415for the connection. The format of the file is as follows:</p>
2416
2417
2418<blockquote><pre class="code">username = <em class="replaceable">value</em>
2419password = <em class="replaceable">value</em>
2420domain   = <em class="replaceable">value</em></pre></blockquote>
2421
2422<p>This is to avoid having the password prompted for or have it appear
2423in plain text in scripts. The permissions on the file should be very
2424restrictive (0600, for example) to prevent access by unwanted users.</p>
2425</dd>
2426
2427
2428
2429<dt><b><tt class="literal">-b</tt> <em class="replaceable">buffer_size</em></b></dt>
2430<dd>
2431<p>Sets the size of the buffer used when transferring files. It defaults
2432to 65520 bytes and can be changed as a tuning measure. Generally it
2433should be quite large or set to match the size of the buffer on the
2434remote system. It can be set smaller to work around Windows bugs:
2435some Windows 98 systems work best with a buffer size of 1200.</p>
2436</dd>
2437
2438
2439
2440<dt><b><tt class="literal">-B</tt> <em class="replaceable">IP_addr</em></b></dt>
2441<dd>
2442<p>Sets the broadcast address.</p>
2443</dd>
2444
2445
2446
2447<dt><b><tt class="literal">-c</tt> <em class="replaceable">command_string</em> </b></dt>
2448<dd>
2449<p>Passes a command string to the <em class="emphasis">smbclient</em> command
2450interpreter. The argument consists of a semicolon-separated list of
2451commands to be executed.</p>
2452</dd>
2453
2454
2455
2456<dt><b><em class="emphasis">-d</em> <em class="replaceable">debug_level</em></b></dt>
2457<dd>
2458<p>Sets the debug (logging) level, from 0 to 10, with A for all.
2459Overrides the value in <em class="filename">smb.conf</em>. Debug level 0
2460logs only the most important messages; level 1 is normal; debug
2461levels 3 and above are for debugging and slow
2462<em class="emphasis">smbclient</em> considerably.</p>
2463</dd>
2464
2465
2466
2467<dt><b><tt class="literal">-D</tt> <em class="replaceable">init_dir</em></b></dt>
2468<dd>
2469<p>Upon starting up, causes <em class="emphasis">smbclient</em> to change its
2470working directory to <em class="replaceable">init_dir</em> on the
2471remote host.</p>
2472</dd>
2473
2474
2475
2476<dt><b><tt class="literal">-E</tt></b></dt>
2477<dd>
2478<p>Sends output from commands to <em class="emphasis">stderr</em> instead of
2479<em class="emphasis">stdout</em>.</p>
2480</dd>
2481
2482
2483
2484<dt><b><tt class="literal">-h</tt></b></dt>
2485<dd>
2486<p>Prints the command-line help information (usage) for
2487<em class="emphasis">smbclient</em>.</p>
2488</dd>
2489
2490
2491
2492<dt><b><tt class="literal">-I</tt> <em class="replaceable">IP_address</em></b></dt>
2493<dd>
2494<p>Sets the IP address of the server to which the client connects.</p>
2495</dd>
2496
2497
2498
2499<dt><b><tt class="literal">-i</tt> <em class="replaceable">scope</em></b></dt>
2500<dd>
2501<p>Sets a NetBIOS scope identifier.</p>
2502</dd>
2503
2504
2505
2506<dt><b><tt class="literal">-l</tt> <em class="replaceable">log_ file</em></b></dt>
2507<dd>
2508<p>Sends the log messages to <em class="replaceable">log_file</em> rather
2509than to the log file specified in the Samba configuration file or the
2510compiled-in default.</p>
2511</dd>
2512
2513
2514
2515<dt><b><tt class="literal">-L</tt> <em class="replaceable">server</em></b></dt>
2516<dd>
2517<p>Lists services (shares) offered by the server. This can be used as a
2518quick way to test an SMB server to see if it is working. If there is
2519a name-service problem, use the <tt class="literal">-I</tt> option to
2520specify the server.</p>
2521</dd>
2522
2523
2524
2525<dt><b><tt class="literal">-M</tt> <em class="replaceable">NetBIOS_name</em></b></dt>
2526<dd>
2527<p>Allows you to send messages using the Windows messaging protocol.
2528Once a connection is established, you can type your message, pressing
2529Ctrl-D to end. The <tt class="literal">-U</tt> and <tt class="literal">-I</tt>
2530options can be used to control the
2531&quot;From&quot; and
2532&quot;To&quot; parts of the message.</p>
2533</dd>
2534
2535
2536
2537<dt><b><tt class="literal">-N</tt></b></dt>
2538<dd>
2539<p>Suppresses the password prompt. Useful when using share mode security
2540and accessing a service that has no password.</p>
2541</dd>
2542
2543
2544
2545<dt><b><tt class="literal">-n</tt> <em class="replaceable">NetBIOS_name</em></b></dt>
2546<dd>
2547<p>Allows you to override the NetBIOS name by which
2548<em class="emphasis">smbclient</em> will advertise itself.</p>
2549</dd>
2550
2551
2552
2553<dt><b><tt class="literal">-O</tt> <em class="replaceable">socket_options</em></b></dt>
2554<dd>
2555<p>Sets the TCP/IP socket options using the same parameters as the
2556<tt class="literal">socket options</tt> configuration option. Often used
2557for performance tuning and testing.</p>
2558</dd>
2559
2560
2561
2562<dt><b><tt class="literal">-p</tt> <em class="replaceable">port_number</em></b></dt>
2563<dd>
2564<p>Sets the port number with which <em class="emphasis">smbclient</em> will
2565connect.</p>
2566</dd>
2567
2568
2569
2570<dt><b><tt class="literal">-R</tt> <em class="replaceable">resolve_order</em></b></dt>
2571<dd>
2572<p>Sets the resolve order of the name servers. This option is similar to
2573the <tt class="literal">resolve</tt> <tt class="literal">order</tt> configuration
2574option and can take any of the four parameters
2575<tt class="literal">lmhosts</tt>, <tt class="literal">host</tt>,
2576<tt class="literal">wins</tt>, and <tt class="literal">bcast</tt>, in any order.
2577If more than one is specified, the argument is specified as a
2578space-separated list. This option can be used to test name service by
2579specifying only the name service to be tested.</p>
2580</dd>
2581
2582
2583
2584<dt><b><tt class="literal">-s</tt> <em class="replaceable">filename</em></b></dt>
2585<dd>
2586<p>Specifies the location of the Samba configuration file. Used for
2587debugging.</p>
2588</dd>
2589
2590
2591
2592<dt><b><tt class="literal">-t</tt> <em class="replaceable">terminal_code</em></b></dt>
2593<dd>
2594<p>Sets the terminal code for Asian languages.</p>
2595</dd>
2596
2597
2598
2599<dt><b><tt class="literal">-T</tt> <em class="replaceable">command_string tarfile</em></b></dt>
2600<dd>
2601<p>Runs the tar archiver, which is <em class="emphasis">gtar</em> compatible.
2602The tar file that is written to or read from is specified by
2603<em class="replaceable">tarfile</em>. The two main commands are
2604<tt class="literal">c</tt> (create) and <tt class="literal">x</tt> (extract),
2605which can be followed by any of these:</p>
2606
2607<dl>
2608<dt><b><tt class="literal">a</tt></b></dt>
2609<dd>
2610<p>Resets the archive attribute on files after they have been saved. See
2611also the <tt class="literal">g</tt> option.</p>
2612</dd>
2613
2614
2615
2616<dt><b><tt class="literal">b</tt> <em class="replaceable">size</em></b></dt>
2617<dd>
2618<p>Sets the block size for writing the tar file, in 512-byte units.</p>
2619</dd>
2620
2621
2622
2623<dt><b><tt class="literal">g</tt></b></dt>
2624<dd>
2625<p>Backs up only files that have their archive bit set. See also the
2626<tt class="literal">a</tt> option.</p>
2627</dd>
2628
2629
2630
2631<dt><b><tt class="literal">I</tt> <em class="replaceable">filename</em></b></dt>
2632<dd>
2633<p>Includes files and directories. This is the default, so specifying
2634this is redundant. To perform pattern matching, see also the
2635<tt class="literal">r</tt> option.</p>
2636</dd>
2637
2638
2639
2640<dt><b><tt class="literal">N</tt> <em class="replaceable">filename</em></b></dt>
2641<dd>
2642<p>Backs up only those files newer than <em class="replaceable">file</em>.</p>
2643</dd>
2644
2645
2646
2647<dt><b><tt class="literal">q</tt></b></dt>
2648<dd>
2649<p>Suppresses diagnostics.</p>
2650</dd>
2651
2652
2653
2654<dt><b><tt class="literal">r</tt></b></dt>
2655<dd>
2656<p>Performs regular expression matching, which can be used along with
2657the <tt class="literal">I</tt> or <tt class="literal">E</tt> option to include or
2658exclude files.</p>
2659</dd>
2660
2661
2662
2663<dt><b><tt class="literal">X</tt> <em class="replaceable">filename</em></b></dt>
2664<dd>
2665<p>Excludes files and directories.</p>
2666</dd>
2667
2668</dl>
2669</dd>
2670
2671
2672
2673<dt><b><tt class="literal">-U</tt> <em class="replaceable">username</em></b></dt>
2674<dd>
2675<p>Sets the username and, optionally, the password used for
2676authentication when connecting to the share.</p>
2677</dd>
2678
2679
2680
2681<dt><b><tt class="literal">-W</tt> <em class="replaceable">workgroup</em></b></dt>
2682<dd>
2683<p>Specifies the workgroup/domain in which
2684<em class="emphasis">smbclient</em> will claim to be a member.</p>
2685</dd>
2686
2687</dl>
2688
2689
2690</div>
2691
2692<div class="sect1"><a name="appc-47-fm2xml"/>
2693
2694<h4 class="refsect1">smbclient commands</h4>
2695
2696<dl>
2697<dt><b><tt class="literal">help</tt> <em class="replaceable">[smbclient_command]</em></b></dt>
2698<dd>
2699<p>With no command specified, prints a list of available commands. If a
2700command is specified as an argument, a brief help message will be
2701printed for it.</p>
2702</dd>
2703
2704
2705
2706<dt><b><tt class="literal">!</tt> <em class="replaceable">[shell_command]</em></b></dt>
2707<dd>
2708<p>Shell escape. With no command specified, runs a Unix shell. If a
2709command is specified, runs the command in a Unix shell.</p>
2710</dd>
2711
2712
2713
2714<dt><b><tt class="literal">altname</tt> <em class="replaceable">filename</em></b></dt>
2715<dd>
2716<p>Causes <em class="emphasis">smbclient</em> to request from the server and
2717then print the old-style, 8.3-format filename for the specified file.</p>
2718</dd>
2719
2720
2721
2722<dt><b><tt class="literal">cancel</tt> <em class="replaceable">print_jobid [...]</em></b></dt>
2723<dd>
2724<p>Causes <em class="emphasis">smbclient</em> to request the server to cancel
2725one or more print jobs, as specified by the numeric job IDs provided
2726as arguments. See also the <em class="emphasis">queue</em> command, which
2727prints job IDs.</p>
2728</dd>
2729
2730
2731
2732<dt><b><tt class="literal">chmod</tt> <em class="replaceable">filename octal_mode</em></b></dt>
2733<dd>
2734<p>Requests that the server change the Unix file permissions on
2735<em class="replaceable">filename</em> to
2736<em class="replaceable">octal_mode</em>, specified in octal numeric
2737format. Works only if the server supports Unix CIFS extensions.</p>
2738</dd>
2739
2740
2741
2742<dt><b><tt class="literal">chown</tt> <em class="replaceable">filename UID GID</em></b></dt>
2743<dd>
2744<p>Requests that the server change the owner and group of the file
2745specified by <em class="replaceable">filename</em> to those provided as
2746decimal numeric arguments <em class="replaceable">UID</em> and
2747<em class="replaceable">GID</em>. Works only if the server supports
2748Unix CIFS extensions.</p>
2749</dd>
2750
2751
2752
2753<dt><b><tt class="literal">cd</tt> <em class="replaceable">[directory]</em></b></dt>
2754<dd>
2755<p>With no argument, prints the current working directory on the remote
2756system. If a directory name is supplied as an argument, changes the
2757working directory on the remote system to that specified.</p>
2758</dd>
2759
2760
2761
2762<dt><b><tt class="literal">del</tt> <em class="replaceable">filename</em></b></dt>
2763<dd>
2764<p>Requests that the server delete one or more files, as specified by
2765the argument, from the current working directory. The argument can be
2766a filename globbing pattern using the * and ? characters.</p>
2767</dd>
2768
2769
2770
2771<dt><b><tt class="literal">dir</tt> [<em class="replaceable">filename]</em></b></dt>
2772<dd>
2773<p>With no arguments, prints a list of files and directories in the
2774working directory on the server. If an argument is provided, only
2775files and directories whose names match the argument will be listed.
2776The argument can be a filename globbing pattern using the * and ?
2777characters.</p>
2778</dd>
2779
2780
2781
2782<dt><b><tt class="literal">exit</tt></b></dt>
2783<dd>
2784<p>Quits the <em class="emphasis">smbclient</em> program after terminating
2785the SMB connection to the server.</p>
2786</dd>
2787
2788
2789
2790<dt><b><tt class="literal">get</tt> <em class="replaceable">remote_file [local_file]</em></b></dt>
2791<dd>
2792<p>Copies the file specified by <em class="replaceable">remote_file</em>
2793from the server to the local system. If no
2794<em class="replaceable">local_file</em> argument is specified,
2795<em class="emphasis">smbclient</em> will name the local file the same as
2796it is named on the server. If <em class="replaceable">local_file</em>
2797is specified, it will be used as the name of the local copy. See also
2798the <em class="emphasis">lowercase</em> command.</p>
2799</dd>
2800
2801
2802
2803<dt><b><tt class="literal">help</tt> <em class="replaceable">[command]</em></b></dt>
2804<dd>
2805<p>A synonym for the <em class="emphasis">?</em> command.</p>
2806</dd>
2807
2808
2809
2810<dt><b><tt class="literal">lcd</tt> <em class="replaceable">[directory]</em></b></dt>
2811<dd>
2812<p>If no argument is provided, prints the name of
2813<em class="emphasis">smbclient</em>'s working directory
2814on the local system. If a directory name is provided as an argument,
2815changes <em class="emphasis">smbclient</em>'s working
2816directory to the directory specified.</p>
2817</dd>
2818
2819
2820
2821<dt><b><tt class="literal">link</tt> <em class="replaceable">link_name filename</em></b></dt>
2822<dd>
2823<p>Requests that the server create a hard link to
2824<em class="replaceable">filename</em> and name it
2825<em class="replaceable">link_name</em>. This command works only if the
2826server supports Unix CIFS extensions.</p>
2827</dd>
2828
2829
2830
2831<dt><b><tt class="literal">lowercase</tt></b></dt>
2832<dd>
2833<p>Toggles the boolean lowercasing setting. When this setting is on,
2834names of files copied from the server with the
2835<em class="emphasis">get</em> and <em class="emphasis">mget</em> commands will
2836be changed to all lowercase. This is mainly used for accessing
2837servers that report filenames in all uppercase only.</p>
2838</dd>
2839
2840
2841
2842<dt><b><tt class="literal">ls</tt> <em class="replaceable">[filename]</em></b></dt>
2843<dd>
2844<p>A synonym for <em class="emphasis">dir</em>.</p>
2845</dd>
2846
2847
2848
2849<dt><b><tt class="literal">mask</tt> <em class="replaceable">[globbing_pattern]</em></b></dt>
2850<dd>
2851<p>Sets the filename globbing pattern for use with the
2852<em class="emphasis">mget</em> and <em class="emphasis">mput</em> commands when
2853recursion is turned on. (When recursion is off, the setting has no
2854effect.) Both <em class="emphasis">mget</em> and <em class="emphasis">mput</em>
2855accept a globbing pattern as arguments; however, those patterns apply
2856only to the current directory. This command specifies the pattern
2857used for all subdirectories that are recursively traversed. The
2858pattern stays in effect until it is changed with another
2859<em class="emphasis">mask</em> command. To return the setting to its
2860original default, specify a
2861<em class="replaceable">globbing_pattern</em> of an asterisk
2862(<tt class="literal">*</tt>), which matches all files. See also the
2863<em class="emphasis">mget</em>, <em class="emphasis">mput</em>, and
2864<em class="emphasis">recurse</em> commands.</p>
2865</dd>
2866
2867
2868
2869<dt><b><tt class="literal">mdir</tt> <em class="replaceable">directory</em></b></dt>
2870<dd>
2871<p>A synonym for the <em class="emphasis">mkdir</em> command.</p>
2872</dd>
2873
2874
2875
2876<dt><b><tt class="literal">mget</tt> <em class="replaceable">pattern</em></b></dt>
2877<dd>
2878<p>When recursion is turned off, copies files matching the file-globbing
2879pattern, as specified by the argument, from the current working
2880directory on the server to the local system. When recursion is on,
2881the <em class="replaceable">pattern</em> argument is used to match
2882directories in the current working directory, and the pattern
2883specified by the <em class="emphasis">mask</em> command is used for
2884matching files within each directory and all subdirectories. See also
2885the <em class="emphasis">lowercase</em>, <em class="emphasis">mask</em>, and
2886<em class="emphasis">recurse</em> commands.</p>
2887</dd>
2888
2889
2890
2891<dt><b><tt class="literal">print</tt> <em class="replaceable">filename</em></b></dt>
2892<dd>
2893<p>Prints the specified file. This requires that
2894<em class="emphasis">smbclient</em> be connected to a print share. See
2895also the <em class="emphasis">printmode</em> command.</p>
2896</dd>
2897
2898
2899
2900<dt><b><tt class="literal">printmode</tt> <em class="replaceable">mode</em></b></dt>
2901<dd>
2902<p>Sets the mode that is used by the <em class="emphasis">print</em> command.
2903The mode can be either <tt class="literal">text</tt>, for printing text
2904files such as the ASCII files commonly found on Unix, or
2905<tt class="literal">graphics</tt>, for printing binary files.</p>
2906</dd>
2907
2908
2909
2910<dt><b><tt class="literal">prompt</tt></b></dt>
2911<dd>
2912<p>Toggles the prompting mode. When prompting is on (the default), the
2913<em class="emphasis">mget</em> and <em class="emphasis">mput</em> commands will
2914interactively prompt the user for permission to transfer each file.
2915The user can answer either <tt class="literal">y</tt> (yes) or
2916<tt class="literal">n</tt> (no), followed by a newline, to this prompt.
2917When prompting is off, all the files will be transferred with no
2918prompts issued.</p>
2919</dd>
2920
2921
2922
2923<dt><b><tt class="literal">put</tt> <em class="replaceable">local_file [remote_file]</em></b></dt>
2924<dd>
2925<p>Copies the file specified by <em class="replaceable">local_file</em>
2926from the local to the remote system. If no
2927<em class="replaceable">remote_file</em> argument is specified,
2928<em class="emphasis">smbclient</em> will name the remote file the same as
2929it is named on the local system. If
2930<em class="replaceable">remote_file</em> is specified, it will be used
2931as the name of the remote copy. See also the
2932<em class="emphasis">lowercase</em> command.</p>
2933</dd>
2934
2935
2936
2937<dt><b><tt class="literal">queue</tt></b></dt>
2938<dd>
2939<p>Prints information on the print queue on the server. This requires
2940that <em class="emphasis">smbclient</em> is connected to a print share.</p>
2941</dd>
2942
2943
2944
2945<dt><b><tt class="literal">quit</tt></b></dt>
2946<dd>
2947<p>A synonym for <em class="emphasis">exit</em>.</p>
2948</dd>
2949
2950
2951
2952<dt><b><tt class="literal">rd</tt> <em class="replaceable">directory</em></b></dt>
2953<dd>
2954<p>A synonym for <em class="emphasis">rmdir</em>.</p>
2955</dd>
2956
2957
2958
2959<dt><b><tt class="literal">recurse</tt></b></dt>
2960<dd>
2961<p>Toggles the recursion mode, which affects the
2962<em class="emphasis">mget</em> and <em class="emphasis">mput</em> commands.
2963When recursion is off (the default), the <em class="emphasis">mget</em>
2964and <em class="emphasis">mput</em> commands will copy only files from the
2965current working directory that match the file-globbing pattern
2966specified as an argument to the command, and the pattern set by the
2967<em class="emphasis">mask</em> command is ignored. When recursion is
2968turned on, the <em class="emphasis">mget</em> and
2969<em class="emphasis">mput</em> commands recursively traverse any
2970directories that match the pattern specified as the argument to the
2971command, and the pattern set by the <em class="emphasis">mask</em> command
2972is used to match files in those directories.</p>
2973</dd>
2974
2975
2976
2977<dt><b><tt class="literal">rm</tt> <em class="replaceable">filename</em></b></dt>
2978<dd>
2979<p>A synonym for <em class="emphasis">del</em>.</p>
2980</dd>
2981
2982
2983
2984<dt><b><tt class="literal">rmdir</tt> <em class="replaceable">directory</em></b></dt>
2985<dd>
2986<p>Requests that the server remove the specified directory.</p>
2987</dd>
2988
2989
2990
2991<dt><b><tt class="literal">setmode</tt> <em class="replaceable">filename attributes</em></b></dt>
2992<dd>
2993<p>Requests that the server assign the specified MS-DOS file attributes
2994on the specified file. The <em class="replaceable">attributes</em>
2995argument has the format of a leading plus sign (<tt class="literal">+</tt>)
2996or minus sign (<tt class="literal">-</tt>) either to set or to unset the
2997attribute(s), respectively, followed by one or more of the characters
2998<tt class="literal">r</tt> (read), <tt class="literal">s</tt> (system),
2999<tt class="literal">h</tt> (hidden), or <tt class="literal">a</tt> (archive).</p>
3000</dd>
3001
3002
3003
3004<dt><b><tt class="literal">symlink</tt> <em class="replaceable">link_name filename</em></b></dt>
3005<dd>
3006<p>Requests that the server create a symbolic link named
3007<em class="replaceable">link_name</em> to
3008<em class="replaceable">filename</em>. This command works only if the
3009server supports Unix CIFS extensions. The server will not create a
3010link that refers to a file not in the share to which
3011<em class="emphasis">smbclient</em> is connected.</p>
3012</dd>
3013
3014
3015
3016<dt><b><tt class="literal">tar</tt> <em class="replaceable">cmd_str</em></b></dt>
3017<dd>
3018<p>Performs an archiving operation using the tar format. This is the
3019interactive form of the <tt class="literal">-T</tt> command-line operation,
3020and the <em class="replaceable">cmd_str</em> argument is specified in
3021the same manner. See also the <em class="emphasis">tarmode</em> command.</p>
3022</dd>
3023
3024
3025
3026<dt><b><tt class="literal">blocksize</tt> <em class="replaceable">size</em></b></dt>
3027<dd>
3028<p>Sets the block size, in units of 512 bytes, for files written by the
3029<em class="emphasis">tar</em> command.</p>
3030</dd>
3031
3032
3033
3034<dt><b><tt class="literal">tarmode</tt> <em class="replaceable">mode ...</em></b></dt>
3035<dd>
3036<p>Specifies how the <em class="emphasis">tar</em> command performs its
3037archiving, including how it handles the archive attribute on files.
3038Multiple <em class="replaceable">mode</em> arguments can be provided,
3039chosen from the following:</p>
3040
3041<dl>
3042<dt><b><tt class="literal">full</tt></b></dt>
3043<dd>
3044<p>All files will be included, regardless of whether their
3045<tt class="literal">archive</tt> attribute is set. This is the default.</p>
3046</dd>
3047
3048
3049
3050<dt><b><tt class="literal">inc</tt></b></dt>
3051<dd>
3052<p>Only files that have the <tt class="literal">archive</tt> attribute set
3053will be included in the backup.</p>
3054</dd>
3055
3056
3057
3058<dt><b><tt class="literal">reset</tt></b></dt>
3059<dd>
3060<p>The <tt class="literal">archive</tt> attribute will be unset by
3061<em class="emphasis">tar</em> after the file is included in the archive.</p>
3062</dd>
3063
3064
3065
3066<dt><b><tt class="literal">noreset</tt></b></dt>
3067<dd>
3068<p>The <tt class="literal">archive</tt> attribute will be left unchanged. This
3069is the default.</p>
3070</dd>
3071
3072
3073
3074<dt><b><tt class="literal">system</tt></b></dt>
3075<dd>
3076<p>Files with the <tt class="literal">system</tt> attribute set will be
3077included in the archive. This is the default.</p>
3078</dd>
3079
3080
3081
3082<dt><b><tt class="literal">nosystem</tt></b></dt>
3083<dd>
3084<p>Files with the <tt class="literal">system</tt> attribute set will not be
3085included in the archive.</p>
3086</dd>
3087
3088
3089
3090<dt><b><tt class="literal">hidden</tt></b></dt>
3091<dd>
3092<p>Files with the <tt class="literal">hidden</tt> attribute set will be
3093included in the archive. This is the default.</p>
3094</dd>
3095
3096
3097
3098<dt><b><tt class="literal">nohidden</tt></b></dt>
3099<dd>
3100<p>Files with the <tt class="literal">hidden</tt> attribute set will not be
3101included in the archive.</p>
3102</dd>
3103
3104
3105
3106<dt><b><tt class="literal">verbose</tt></b></dt>
3107<dd>
3108<p>As files are included in the archive (when creating the archive) or
3109are read from the archive (when extracting it), the name of each file
3110will be printed. This is the default.</p>
3111</dd>
3112
3113
3114
3115<dt><b><tt class="literal">noverbose</tt></b></dt>
3116<dd>
3117<p>This turns verbose mode off, causing <em class="emphasis">tar</em> to
3118perform its work quietly.</p>
3119</dd>
3120
3121
3122
3123<dt><b><tt class="literal">quiet</tt></b></dt>
3124<dd>
3125<p>An antonym for the <tt class="literal">verbose</tt> mode. When quiet is on,
3126verbose is off, and vice versa.<a name="INDEX-18"/></p>
3127</dd>
3128
3129</dl>
3130</dd>
3131
3132</dl>
3133
3134
3135</div>
3136</div>
3137
3138<a name="INDEX-19"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbcontrol</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">smbcontrol</em> command sends control messages to
3139running <em class="emphasis">smbd</em> or <em class="emphasis">nmbd</em>
3140processes.</p>
3141<div class="sect1"><a name="appc-49-fm2xml"/>
3142
3143<h4 class="refsect1">Command synopsis</h4>
3144
3145<blockquote><pre class="code">smbcontrol -i<em class="replaceable"> [options]</em></pre></blockquote>
3146<p>or:</p>
3147
3148<blockquote><pre class="code">smbcontrol <em class="replaceable">[options] process message-type [parameters]</em></pre></blockquote>
3149
3150
3151</div>
3152
3153<div class="sect1"><a name="appc-50-fm2xml"/>
3154
3155<h4 class="refsect1">Options</h4>
3156
3157<dl>
3158<dt><b><tt class="literal">-i</tt></b></dt>
3159<dd>
3160<p>Runs <em class="emphasis">smbcontrol</em> interactively, executing
3161commands until a blank line or &quot;q&quot;
3162is read. The user must have superuser privileges.</p>
3163</dd>
3164
3165
3166
3167<dt><b><tt class="literal">-s</tt> <em class="replaceable">filename</em></b></dt>
3168<dd>
3169<p>Specifies the location of the Samba configuration file.</p>
3170</dd>
3171
3172
3173
3174<dt><b><tt class="literal">-d</tt> <em class="replaceable">debuglevel</em></b></dt>
3175<dd>
3176<p>Sets the debugging level for logging. The debug level can be set from
3177to 10.</p>
3178</dd>
3179
3180</dl>
3181
3182
3183<p>Whether <em class="emphasis">smbcontrol</em> commands are issued in
3184interactive mode or from the command line, the commands are in the
3185same format. Each command has up to three parts:</p>
3186
3187<dl>
3188<dt><b><em class="replaceable">process</em></b></dt>
3189<dd>
3190<p>Specifies the process or group of processes to which to send the
3191message. If <em class="replaceable">process</em> is
3192<tt class="literal">smbd</tt>, all <em class="emphasis">smbd</em> processes will
3193receive the message. If <em class="replaceable">process</em> is
3194<tt class="literal">nmbd</tt>, only the main <em class="emphasis">nmbd</em>
3195process (identified by Samba's
3196<em class="filename">nmbd.pid</em> file) receives the message. If
3197<em class="replaceable">process</em> is the numeric PID of a running
3198process on the system, that process will receive the message.</p>
3199</dd>
3200
3201
3202
3203<dt><b><em class="replaceable">message-type</em></b></dt>
3204<dd>
3205<p>Specifies the type of message that is sent. For more information, see
3206<a href="appc.html#appc-51-fm2xml">smbcontrol message
3207types</a> that follows.</p>
3208</dd>
3209
3210
3211
3212<dt><b><em class="replaceable">parameters</em></b></dt>
3213<dd>
3214<p>Specifies additional parameters required by some messages.</p>
3215</dd>
3216
3217</dl>
3218
3219
3220</div>
3221
3222<div class="sect1"><a name="appc-51-fm2xml"/>
3223
3224<h4 class="refsect1">smbcontrol message types</h4>
3225
3226<dl>
3227<dt><b><tt class="literal">close-share</tt> <em class="replaceable">share_name</em></b></dt>
3228<dd>
3229<p>Closes the connection to a share or shares. If
3230<em class="replaceable">share_name</em> is specified as an asterisk
3231(<tt class="literal">*</tt>), connections to all shares will be closed. To
3232close a single connection, <em class="replaceable">share_name</em> is
3233given as the name of a share, as specified in the Samba configuration
3234file, not including the enclosing brackets. Warning: no message is
3235printed if there is an error in specifying
3236<em class="replaceable">share_name</em>.</p>
3237</dd>
3238
3239
3240
3241<dt><b><tt class="literal">debug</tt> <em class="replaceable">num</em></b></dt>
3242<dd>
3243<p>Sets the debugging level. The <em class="replaceable">num</em>
3244parameter specifies the level, which can be from 0 to 10.</p>
3245</dd>
3246
3247
3248
3249<dt><b><tt class="literal">debuglevel</tt></b></dt>
3250<dd>
3251<p>Prints the current debugging level.</p>
3252</dd>
3253
3254
3255
3256<dt><b><tt class="literal">force-election</tt></b></dt>
3257<dd>
3258<p>Can be used only with <em class="emphasis">nmbd</em>, telling it to force
3259a master browser election.</p>
3260</dd>
3261
3262
3263
3264<dt><b><tt class="literal">ping</tt> <em class="replaceable">number</em></b></dt>
3265<dd>
3266<p>Sends <em class="emphasis">number</em> of pings and reports when they
3267receive a reply or timeout. Used for connectivity testing.</p>
3268</dd>
3269
3270
3271
3272<dt><b><tt class="literal">profile</tt> <em class="replaceable">mode</em></b></dt>
3273<dd>
3274<p>Controls profiling statistics collection. If
3275<em class="replaceable">mode</em> is <tt class="literal">on</tt>, profile
3276statistics will be collected. If <em class="replaceable">mode</em> is
3277<tt class="literal">off</tt>, collection of statistics is turned off. If
3278<em class="replaceable">mode</em> is specified as
3279<tt class="literal">count</tt>, only counting statistics are collected (and
3280not timing statistics). If <em class="replaceable">mode</em> is
3281<tt class="literal">flush</tt>, the data set is cleared (initialized).</p>
3282</dd>
3283
3284
3285
3286<dt><b><tt class="literal">profilelevel</tt></b></dt>
3287<dd>
3288<p>Prints the current profiling level.</p>
3289</dd>
3290
3291
3292
3293<dt><b><tt class="literal">printer-notify</tt> <em class="replaceable">printer_name</em></b></dt>
3294<dd>
3295<p>Sends a printer notify message to Windows NT/2000/XP for the
3296specified printer. This message can be sent only to
3297<em class="emphasis">smbd</em>. Warning: no message is printed if the
3298<em class="replaceable">printer_name</em> parameter is specified
3299incorrectly.</p>
3300</dd>
3301
3302</dl>
3303
3304
3305</div>
3306</div>
3307
3308<a name="INDEX-20"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbgroupedit</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This command, new to Samba 3.0, sets up mappings between Unix groups
3309and Windows NT/2000/XP groups and also allows a Unix group to become
3310a domain group. This command must be run by the superuser.</p>
3311<div class="sect1"><a name="appc-53-fm2xml"/>
3312
3313<h4 class="refsect1">Command synopsis</h4>
3314
3315<blockquote><pre class="code">smbgroupedit <em class="replaceable">[options]</em></pre></blockquote>
3316
3317
3318</div>
3319
3320<div class="sect1"><a name="appc-54-fm2xml"/>
3321
3322<h4 class="refsect1">Options</h4>
3323
3324<dl>
3325<dt><b><tt class="literal">-a</tt> <em class="replaceable">Unix_group_name</em></b></dt>
3326<dd>
3327<p>Adds a mapping for the specified Unix group. The
3328<tt class="literal">-n</tt> option is used along with this option to
3329specify the Windows NT group to which the Unix group is mapped.</p>
3330</dd>
3331
3332
3333
3334<dt><b><tt class="literal">-c</tt> <em class="replaceable">SID</em></b></dt>
3335<dd>
3336<p>Changes a mapping between a Windows NT group and a Unix group. The
3337Windows NT group is specified as a SID with this option, and the Unix
3338group is specified with the <tt class="literal">-u</tt> option.</p>
3339</dd>
3340
3341
3342
3343<dt><b><tt class="literal">-d</tt> <em class="replaceable">description</em></b></dt>
3344<dd>
3345<p>Specifies a comment for the mapping, which will be stored along with
3346it.</p>
3347</dd>
3348
3349
3350
3351<dt><b><tt class="literal">-l</tt></b></dt>
3352<dd>
3353<p>When used with the <tt class="literal">-v</tt> option, prints a long
3354listing. This is the default. The information printed includes the
3355name of the Windows NT group, its SID, its corresponding Unix group
3356(if a mapping has been defined), the group type, the comment, and the
3357privileges of the group.</p>
3358</dd>
3359
3360
3361
3362<dt><b><tt class="literal">-n</tt> <em class="replaceable">Windows_group_name</em></b></dt>
3363<dd>
3364<p>Specifies the name of the Windows NT group. Used with the
3365<tt class="literal">-a</tt> option.</p>
3366</dd>
3367
3368
3369
3370<dt><b><tt class="literal">-p</tt> <em class="replaceable">privilege</em></b></dt>
3371<dd>
3372<p>Used along with the <tt class="literal">-a</tt> option to specify a Windows
3373NT privilege to be given to the Unix group.</p>
3374</dd>
3375
3376
3377
3378<dt><b><tt class="literal">-s</tt></b></dt>
3379<dd>
3380<p>When used with the <tt class="literal">-v</tt> option, prints a short
3381listing. The information printed includes just the name of the
3382Windows NT group, its SID, and, if a mapping has been defined, its
3383corresponding Unix group. This option is useful for determining the
3384SID of a group, for use with the <tt class="literal">-c</tt> option.</p>
3385</dd>
3386
3387
3388
3389<dt><b><tt class="literal">-t</tt> <em class="replaceable">TYPE</em></b></dt>
3390<dd>
3391<p>Assigns a Windows group type to the group.
3392<em class="replaceable">TYPE</em> is a single character, and is one of
3393<tt class="literal">b</tt> (built-in), <tt class="literal">d</tt> (domain), or
3394<tt class="literal">l</tt> (local).</p>
3395</dd>
3396
3397
3398
3399<dt><b><tt class="literal">-u</tt> <em class="replaceable">Unix_group_name</em></b></dt>
3400<dd>
3401<p>Specifies the name of the Unix group to map to the Windows NT group.
3402Used with the <tt class="literal">-c</tt> option.</p>
3403</dd>
3404
3405
3406
3407<dt><b><tt class="literal">-v</tt></b></dt>
3408<dd>
3409<p>Prints a list of groups in the Windows NT domain in which the Samba
3410server is operating. See also the <tt class="literal">-l</tt> and
3411<tt class="literal">-s</tt> options.</p>
3412</dd>
3413
3414
3415
3416<dt><b><tt class="literal">-x</tt> <em class="replaceable">Unix_group_name</em></b></dt>
3417<dd>
3418<p>Deletes the mapping for the Unix group specified.</p>
3419</dd>
3420
3421</dl>
3422
3423
3424</div>
3425</div>
3426
3427<a name="INDEX-21"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbmnt</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This is a low-level helper program for mounting smbfs filesystems. It
3428used by <em class="emphasis">smbmount</em> to do the privileged part of
3429the mount operation on behalf of an ordinary user. Generally, users
3430should not run this command directly.</p>
3431<div class="sect1"><a name="appc-56-fm2xml"/>
3432
3433<h4 class="refsect1">Command synopsis</h4>
3434
3435<blockquote><pre class="code">smbmnt mnt_point <em class="replaceable">[options]</em></pre></blockquote>
3436
3437
3438</div>
3439
3440<div class="sect1"><a name="appc-57-fm2xml"/>
3441
3442<h4 class="refsect1">Options</h4>
3443
3444<dl>
3445<dt><b><tt class="literal">-r</tt></b></dt>
3446<dd>
3447<p>Mounts the filesystem as read-only.</p>
3448</dd>
3449
3450
3451
3452<dt><b><tt class="literal">-u</tt> <em class="replaceable">uid</em> </b></dt>
3453<dd>
3454<p>Specifies the UID to use for the owner of the files.</p>
3455</dd>
3456
3457
3458
3459<dt><b><tt class="literal">-g</tt> <em class="replaceable">gid</em></b></dt>
3460<dd>
3461<p>Specifies the GID to use for the group of the files.</p>
3462</dd>
3463
3464
3465
3466<dt><b><tt class="literal">-f</tt> <em class="replaceable">mask</em></b></dt>
3467<dd>
3468<p>Specifies the octal file mask.</p>
3469</dd>
3470
3471
3472
3473<dt><b><tt class="literal">-d</tt> <em class="replaceable">mask</em></b></dt>
3474<dd>
3475<p>Specifies the octal directory mask.</p>
3476</dd>
3477
3478
3479
3480<dt><b><tt class="literal">-o</tt> <em class="replaceable">options</em></b></dt>
3481<dd>
3482<p>Specifies the list of options that are passed to the smbfs module.</p>
3483</dd>
3484
3485</dl>
3486
3487
3488<p>To allow users to mount SMB shares without help from an
3489administrator, set the &quot;set user
3490ID&quot; permission on the <em class="emphasis">smbmnt</em>
3491executable. However, note that this can raise security issues.</p>
3492
3493</div>
3494</div>
3495
3496<a name="INDEX-22"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbmount</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This program mounts an smbfs filesystem on a mount point in the Unix
3497filesystem. It is typically called as <em class="emphasis">mount.smb</em>
3498from <em class="emphasis">mount</em>, although it can also be run directly
3499by users. After mounting the smbfs filesystem,
3500<em class="emphasis">smbmount</em> continues to run as a daemon as long as
3501the filesystem is mounted. It logs events in the file
3502<em class="filename">log.smbmount</em> in the same directory as the other
3503Samba log files (which is commonly
3504<em class="filename">/usr/local/samba/var</em> by default). The logging
3505level is controlled by the <tt class="literal">debug level</tt> parameter
3506in the Samba configuration file.</p>
3507<div class="sect1"><a name="appc-59-fm2xml"/>
3508
3509<h4 class="refsect1">Command synopsis</h4>
3510
3511<blockquote><pre class="code">smbmount <em class="replaceable">service mount_point [-o options]</em></pre></blockquote>
3512<p>The service argument specifies the SMB share to mount, given as a
3513UNC. The <em class="replaceable">mount_point</em> argument specifies a
3514directory to use as the mount point. The options to
3515<em class="emphasis">smbmount</em> are specified as a comma-separated list
3516of
3517<em class="replaceable">key</em><tt class="literal">=</tt><em class="replaceable">value</em>
3518pairs. The documented options are as follows. Others can be passed if
3519the kernel supports them.</p>
3520
3521</div>
3522
3523<div class="sect1"><a name="appc-60-fm2xml"/>
3524
3525<h4 class="refsect1">Options</h4>
3526
3527<dl>
3528<dt><b><tt class="literal">username=</tt><em class="replaceable">name</em></b></dt>
3529<dd>
3530<p>Specifies the username to connect as. If this is not provided, the
3531environment variable USER will be tried. The name can be specified as
3532<em class="replaceable">username</em><tt class="literal">%</tt><em class="replaceable">password</em>,
3533<em class="replaceable">user</em><tt class="literal">/</tt><em class="replaceable">workgroup</em>,
3534or
3535<em class="replaceable">user</em><tt class="literal">/</tt><em class="replaceable">workgroup</em><tt class="literal">%</tt><em class="replaceable">password</em>.</p>
3536</dd>
3537
3538
3539
3540<dt><b><tt class="literal">password=</tt><em class="replaceable">string</em></b></dt>
3541<dd>
3542<p>Specifies the SMB password. If no password is provided using this
3543option, the <em class="emphasis">username</em> option, or the
3544<em class="emphasis">credentials</em> option, the environment variable
3545PASSWD is used. If that also does not exist,
3546<em class="emphasis">smbmount</em> will prompt interactively for a
3547password.</p>
3548</dd>
3549
3550
3551
3552<dt><b><tt class="literal">credentials=</tt><em class="replaceable">filename</em></b></dt>
3553<dd>
3554<p>Specifies a file that contains a username and password in the
3555following format:</p>
3556
3557
3558<blockquote><pre class="code">username = <em class="replaceable">value</em>
3559password = <em class="replaceable">value</em></pre></blockquote>
3560</dd>
3561
3562
3563<dt><b><tt class="literal">uid=</tt><em class="replaceable">number</em></b></dt>
3564<dd>
3565<p>Sets the Unix user ID to be used as the owner of all files in the
3566mounted filesystem. It can be specified as a username or numeric UID.
3567Defaults to the UID of the user running
3568<em class="emphasis">smbmount</em>.</p>
3569</dd>
3570
3571
3572
3573<dt><b><tt class="literal">gid=</tt><em class="replaceable">number</em></b></dt>
3574<dd>
3575<p>Sets the Unix group ID to be used as the group for all files in the
3576mounted filesystem. It can be specified as a group name or a numeric
3577GID. Defaults to the GID of the user running
3578<em class="emphasis">smbmount</em>.</p>
3579</dd>
3580
3581
3582
3583<dt><b><tt class="literal">port=</tt><em class="replaceable">number</em></b></dt>
3584<dd>
3585<p>Sets the TCP port number. This is 139, which is required by most
3586Windows versions.</p>
3587</dd>
3588
3589
3590
3591<dt><b><tt class="literal">fmask=</tt><em class="replaceable">octal_mask</em> </b></dt>
3592<dd>
3593<p>Sets the Unix permissions of all files in the mounted filesystem.
3594Defaults to the user's current umask.</p>
3595</dd>
3596
3597
3598
3599<dt><b><tt class="literal">dmask=</tt><em class="replaceable">octal_mask</em></b></dt>
3600<dd>
3601<p>Sets the Unix permissions of all directories in the mounted
3602filesystem. Defaults to the current umask.</p>
3603</dd>
3604
3605
3606
3607<dt><b><tt class="literal">debug=</tt><em class="replaceable">number</em></b></dt>
3608<dd>
3609<p>Sets the debugging level.</p>
3610</dd>
3611
3612
3613
3614<dt><b><tt class="literal">ip=</tt><em class="replaceable">host</em></b></dt>
3615<dd>
3616<p>Sets the destination hostname or IP address.</p>
3617</dd>
3618
3619
3620
3621<dt><b><tt class="literal">netbiosname=</tt><em class="replaceable">name</em></b></dt>
3622<dd>
3623<p>Sets the computer name to connect as. This defaults to the hostname
3624of the local system.</p>
3625</dd>
3626
3627
3628
3629<dt><b><tt class="literal">workgroup=</tt><em class="replaceable">name</em></b></dt>
3630<dd>
3631<p>Sets the workgroup or domain.</p>
3632</dd>
3633
3634
3635
3636<dt><b><tt class="literal">sockopt=</tt><em class="replaceable">opts</em></b></dt>
3637<dd>
3638<p>Sets TCP socket options.</p>
3639</dd>
3640
3641
3642
3643<dt><b><tt class="literal">scope=</tt><em class="replaceable">num</em></b></dt>
3644<dd>
3645<p>Sets the NetBIOS scope.</p>
3646</dd>
3647
3648
3649
3650<dt><b><tt class="literal">guest</tt></b></dt>
3651<dd>
3652<p>Don't expect or prompt for a password.</p>
3653</dd>
3654
3655
3656
3657<dt><b><tt class="literal">ro</tt></b></dt>
3658<dd>
3659<p>Mounts the share read-only.</p>
3660</dd>
3661
3662
3663
3664<dt><b><tt class="literal">rw</tt></b></dt>
3665<dd>
3666<p>Mounts the share read-write.</p>
3667</dd>
3668
3669
3670
3671<dt><b><tt class="literal">iocharset=</tt><em class="replaceable">charset</em></b></dt>
3672<dd>
3673<p>Sets the charset used by the Linux machine for codepage-to-charset
3674translation. See also the <em class="emphasis">codepage</em> option.</p>
3675</dd>
3676
3677
3678
3679<dt><b><tt class="literal">codepage=</tt><em class="replaceable">page</em></b></dt>
3680<dd>
3681<p>Sets the DOS code page. See also the <em class="emphasis">iocharset</em>
3682option.</p>
3683</dd>
3684
3685
3686
3687<dt><b><tt class="literal">ttl=</tt><em class="replaceable">milliseconds</em></b></dt>
3688<dd>
3689<p>Sets the time to live, in milliseconds, for entries in the directory
3690cache. A higher value gives better performance on large directories
3691and/or slower connections. The default is 1000ms. Try 10000ms (10
3692seconds) as a starting value if directory operations are visibly
3693slow.</p>
3694</dd>
3695
3696</dl>
3697
3698
3699</div>
3700</div>
3701
3702<a name="INDEX-23"/><a name="INDEX-24"/><a name="INDEX-25"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbpasswd</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">smbpasswd</em> program provides the general
3703function of managing <a name="INDEX-24"/><a name="INDEX-25"/>encrypted
3704passwords. How it works depends on whether it is run by the superuser
3705or an ordinary user.</p><p>For the superuser, <em class="emphasis">smbpasswd</em> can be used to
3706maintain Samba's <em class="filename">smbpasswd</em>
3707file. It can add or delete users, change their passwords, and modify
3708other attributes pertaining to the user that are held in the
3709<em class="filename">smbpasswd</em> file.</p><p>When run by ordinary users, <em class="emphasis">smbpasswd</em> can be
3710used only to change their encrypted passwords. In this mode of
3711operation, <em class="emphasis">smbpasswd</em> acts as a client to the
3712<em class="emphasis">smbd</em> daemon. The program will fail if
3713<em class="emphasis">smbd</em> is not operating, if the <tt class="literal">hosts
3714allow</tt> or <tt class="literal">hosts deny</tt> parameters in the
3715Samba configuration file do not permit connections from localhost (IP
3716address 127.0.0.1), or if the <tt class="literal">encrypted passwords</tt>
3717option is set to <tt class="literal">no</tt>. It is also possible for
3718<em class="emphasis">smbpasswd</em> to change a user's
3719password when it is maintained on a remote system, including a
3720Windows NT domain controller.</p>
3721<div class="sect1"><a name="appc-62-fm2xml"/>
3722
3723<h4 class="refsect1">Command synopsis</h4>
3724<p>When run by the superuser:</p>
3725
3726<blockquote><pre class="code">smbpasswd <em class="replaceable">[options] [username] [password]</em></pre></blockquote>
3727<p>In this case, the username of the user whose
3728<em class="emphasis">smbpasswd</em> entry is to be modified is provided as
3729the second argument.</p>
3730
3731<p>Otherwise:</p>
3732
3733<blockquote><pre class="code">smbpasswd <em class="replaceable">[options] [password]</em></pre></blockquote>
3734
3735
3736</div>
3737
3738<div class="sect1"><a name="appc-63-fm2xml"/>
3739
3740<h4 class="refsect1">Superuser-only options</h4>
3741
3742<dl>
3743<dt><b><tt class="literal">-a</tt> <em class="replaceable">username</em></b></dt>
3744<dd>
3745<p>Adds a user to the encrypted password file. The user must already
3746exist in the system password file (<em class="filename">/etc/passwd</em>
3747). If the user already exists in the <em class="filename">smbpasswd</em>
3748file, the <tt class="literal">-a</tt> option changes the existing password.</p>
3749</dd>
3750
3751
3752
3753<dt><b><tt class="literal">-d</tt> <em class="replaceable">username</em></b></dt>
3754<dd>
3755<p>Disables a user in the encrypted password file. The
3756user's entry in the file will remain, but will be
3757marked with a flag disabling the user from authenticating.</p>
3758</dd>
3759
3760
3761
3762<dt><b><tt class="literal">-e</tt> <em class="replaceable">username</em></b></dt>
3763<dd>
3764<p>Enables a disabled user in the encrypted password file. This
3765overrides the effect of the <tt class="literal">-d</tt> option.</p>
3766</dd>
3767
3768
3769
3770<dt><b><tt class="literal">-j</tt> <em class="replaceable">domain</em></b></dt>
3771<dd>
3772<p>Joins the Samba server to a Windows NT domain as a domain member
3773server. The <em class="replaceable">domain</em> argument is the NetBIOS
3774name of the Windows NT domain that is being joined. See also the
3775<tt class="literal">-r</tt> and <tt class="literal">-U</tt> options.</p>
3776</dd>
3777
3778
3779
3780<dt><b><tt class="literal">-m</tt></b></dt>
3781<dd>
3782<p>Indicates that the account is a computer account in a Windows NT
3783domain rather than a domain user account.</p>
3784</dd>
3785
3786
3787
3788<dt><b><tt class="literal">-n</tt></b></dt>
3789<dd>
3790<p>Sets the user's password to a null password. For the
3791user to authenticate, the parameter <tt class="literal">null</tt>
3792<tt class="literal">passwords</tt> <tt class="literal">=</tt>
3793<tt class="literal">yes</tt> must exist in the <tt class="literal">[global]</tt>
3794section of the Samba configuration file.</p>
3795</dd>
3796
3797
3798
3799<dt><b><tt class="literal">-R</tt> <em class="replaceable">resolve_order_list</em></b></dt>
3800<dd>
3801<p>Sets the resolve order of the name servers. This option is similar to
3802the <tt class="literal">resolve</tt> <tt class="literal">order</tt> configuration
3803option and can take any of the four parameters
3804<tt class="literal">lmhosts</tt>, <tt class="literal">host</tt>,
3805<tt class="literal">wins</tt>, and <tt class="literal">bcast</tt>, in any order.
3806If more than one is specified, the argument is specified as a
3807space-separated list.</p>
3808</dd>
3809
3810
3811
3812<dt><b><tt class="literal">-w</tt> <em class="replaceable">password</em></b></dt>
3813<dd>
3814<p>For use when Samba has been compiled with the
3815<tt class="literal">--with-ldapsam</tt> configure option. Specifies the
3816password that goes with the value of the <tt class="literal">ldap admin
3817dn</tt> Samba configuration file parameter.</p>
3818</dd>
3819
3820
3821
3822<dt><b><tt class="literal">-x</tt> <em class="replaceable">username</em></b></dt>
3823<dd>
3824<p>Deletes the user from the <em class="filename">smbpasswd</em> file. This
3825is a one-way operation, and all information associated with the entry
3826is lost. To disable the account without deleting the
3827user's entry in the file, see the
3828<tt class="literal">-d</tt> option.</p>
3829</dd>
3830
3831</dl>
3832
3833
3834</div>
3835
3836<div class="sect1"><a name="appc-64-fm2xml"/>
3837
3838<h4 class="refsect1">Other options</h4>
3839
3840<dl>
3841<dt><b><tt class="literal">-c</tt> <em class="replaceable">filename</em></b></dt>
3842<dd>
3843<p>Specifies the Samba configuration file, overriding the compiled-in
3844default.</p>
3845</dd>
3846
3847
3848
3849<dt><b><tt class="literal">-D</tt> <em class="replaceable">debug_level</em></b></dt>
3850<dd>
3851<p>Sets the debug (also called logging) level. The level can range from
3852to 10. Debug level 0 logs only the most important messages; level 1
3853is normal; levels 3 and above are primarily for debugging and slow
3854the program considerably.</p>
3855</dd>
3856
3857
3858
3859<dt><b><tt class="literal">-h</tt></b></dt>
3860<dd>
3861<p>Prints command-line usage information.</p>
3862</dd>
3863
3864
3865
3866<dt><b><tt class="literal">-L</tt></b></dt>
3867<dd>
3868<p>Causes <em class="emphasis">smbpasswd</em> to run in local mode, in which
3869ordinary users are allowed to use the superuser-only options. This
3870requires that the <em class="filename">smbpasswd</em> file be made
3871readable and writable by the user. This is for testing purposes.</p>
3872</dd>
3873
3874
3875
3876<dt><b><tt class="literal">-r</tt> <em class="replaceable">NetBIOS_name</em></b></dt>
3877<dd>
3878<p>Specifies on which machine the password should change. If changing a
3879Windows NT domain password, the remote system specified by
3880<em class="replaceable">NetBIOS_name</em> must be the PDC for the
3881domain. The user's username on the local system is
3882used by default. See also the <tt class="literal">-U</tt> option for use
3883when the user's Samba username is different from the
3884local username.</p>
3885</dd>
3886
3887
3888
3889<dt><b><tt class="literal">-R</tt> <em class="replaceable">resolve_order</em></b></dt>
3890<dd>
3891<p>Sets the resolve order of the name servers. This option is similar to
3892the resolve order configuration option and can take any of the four
3893parameters <tt class="literal">lmhosts</tt>, <tt class="literal">host</tt>,
3894<tt class="literal">wins</tt>, and <tt class="literal">bcast</tt>, in any order.
3895If more than one is specified, the argument is specified as a
3896space-separated list.</p>
3897</dd>
3898
3899
3900
3901<dt><b><tt class="literal">-s</tt> <em class="replaceable">username</em></b></dt>
3902<dd>
3903<p>Causes <em class="emphasis">smbpasswd</em> not to prompt for passwords
3904from <em class="filename">/dev/tty</em>, but instead to read the old and
3905new passwords from the standard input. This is useful when calling
3906<em class="emphasis">smbpasswd</em> from a script.</p>
3907</dd>
3908
3909
3910
3911<dt><b><tt class="literal">-S</tt></b></dt>
3912<dd>
3913<p>Queries the domain controller of the domain, as specified by the
3914<tt class="literal">workgroup</tt> parameter in the Samba configuration
3915file, and retrieves the domain's SID. This will then
3916be used as the SID for the local system. A specific PDC can be
3917selected by combining this option with the <tt class="literal">-r</tt>
3918option, and its domain's SID will be used. This
3919option is for migrating domain accounts from a Windows NT primary
3920domain controller to a Samba PDC.</p>
3921</dd>
3922
3923
3924
3925<dt><b><tt class="literal">-U</tt> <em class="replaceable">username[</em><tt class="literal">%</tt><em class="replaceable">password]</em></b></dt>
3926<dd>
3927<p>Changes the password for <em class="replaceable">username</em> on the
3928remote system. This is to handle instances in which the remote
3929username and local username are different. This option requires that
3930<tt class="literal">-r</tt> also be used. Often used with
3931<tt class="literal">-j</tt> to provide the username of the administrative
3932user on the primary domain controller for adding computer accounts.</p>
3933</dd>
3934
3935</dl>
3936
3937
3938</div>
3939</div>
3940
3941<a name="INDEX-26"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbsh</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">smbsh</em> program allows SMB shares to be
3942accessed from a Unix system. When <em class="emphasis">smbsh</em> is run,
3943an extra directory tree called <em class="filename">/smb </em>becomes
3944available to dynamically linked shell commands. The first level of
3945directories under <em class="filename">/smb</em> represent available
3946workgroups, the next level of subdirectories represent the SMB
3947servers in each workgroup, and the third level of subdirectories
3948represent the disk and printer shares of each server.</p><p>Samba must be compiled with the <tt class="literal">--with-smbwrappers</tt>
3949option to enable <em class="emphasis">smbsh</em>.</p>
3950<div class="sect1"><a name="appc-66-fm2xml"/>
3951
3952<h4 class="refsect1">Options</h4>
3953
3954<dl>
3955<dt><b><em class="emphasis">-d</em> <em class="replaceable">debug_level</em></b></dt>
3956<dd>
3957<p>Sets the debug (sometimes called logging) level. The level can range
3958from 0, the default, to 10. Debug level 0 logs only the most
3959important messages; level 1 is normal; levels 3 and above are
3960primarily for debugging and slow <em class="emphasis">smbsh</em>
3961considerably.</p>
3962</dd>
3963
3964
3965
3966<dt><b><em class="emphasis">-l</em> <em class="replaceable">filename</em></b></dt>
3967<dd>
3968<p>Sets the name of the logging file. By default, messages are sent to
3969<em class="emphasis">stderr</em>.</p>
3970</dd>
3971
3972
3973
3974<dt><b><em class="emphasis">-L</em> <em class="replaceable">directory</em></b></dt>
3975<dd>
3976<p>Specifies the location of
3977<em class="emphasis">smbsh</em>'s shared libraries,
3978overriding the compiled-in default.</p>
3979</dd>
3980
3981
3982
3983<dt><b><em class="emphasis">-P</em> <em class="replaceable">prefix</em></b></dt>
3984<dd>
3985<p>Sets the name of the <tt class="literal">root</tt> directory to use for the
3986SMB filesystem. The default is <em class="filename">/smb</em>.</p>
3987</dd>
3988
3989
3990
3991<dt><b><em class="emphasis">-R</em> <em class="replaceable">resolve_order</em></b></dt>
3992<dd>
3993<p>Sets the resolve order of the name servers. This option is similar to
3994the <tt class="literal">resolve</tt> <tt class="literal">order</tt> configuration
3995option and can take any of the four parameters
3996<tt class="literal">lmhosts</tt>, <tt class="literal">host</tt>,
3997<tt class="literal">wins</tt>, and <tt class="literal">bcast</tt>, in any order.
3998If more than one is specified, the argument is specified as a
3999space-separated list.</p>
4000</dd>
4001
4002
4003
4004<dt><b><em class="emphasis">-U</em> <em class="replaceable">username</em></b></dt>
4005<dd>
4006<p>Provides the username, and optionally the password, for
4007authenticating the connection to the SMB server. The password can be
4008supplied using the
4009<em class="replaceable">username</em><tt class="literal">%</tt><em class="replaceable">password</em>
4010format. If either or both the username and password are not provided,
4011<em class="emphasis">smbsh</em> will prompt interactively for them.</p>
4012</dd>
4013
4014
4015
4016<dt><b><em class="emphasis">-W</em> <em class="replaceable">workgroup</em></b></dt>
4017<dd>
4018<p>Specifies the NetBIOS workgroup or domain to which the client will
4019connect. This overrides the workgroup parameter in the Samba
4020configuration file and is sometimes necessary to connect to some
4021servers.</p>
4022</dd>
4023
4024</dl>
4025
4026
4027</div>
4028</div>
4029
4030<a name="INDEX-27"/><a name="INDEX-28"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbspool</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">smbspool</em> program provides a
4031<a name="INDEX-28"/>CUPS-compatible
4032interface to Samba printing by providing a way to send a print job to
4033an SMB printer using the command-line format specified by CUPS
4034printers. Although <em class="emphasis">smbspool</em> is designed to work
4035best with CUPS printers, it can be used to send print jobs to
4036non-CUPS Samba printers as well.</p>
4037<div class="sect1"><a name="appc-68-fm2xml"/>
4038
4039<h4 class="refsect1">Command synopsis</h4>
4040
4041<blockquote><pre class="code">smbspool <em class="replaceable">job user title copies options filename</em></pre></blockquote>
4042<p>The arguments for <em class="emphasis">smbspool</em>, as shown here, are
4043those used in the CUPS printing system. However, some of the
4044arguments are currently ignored because they don't
4045correspond to the Samba printing system. These arguments must be
4046supplied in the command and can be filled in with
4047&quot;dummy&quot; values.</p>
4048
4049<p>The <em class="replaceable">job</em> argument refers to the job number
4050and is currently ignored. The <em class="replaceable">user</em>
4051argument is the name of the user who submitted the print job and is
4052also ignored. The <em class="replaceable">title</em> argument is the
4053name of the print job and must be supplied. It is used as the name of
4054the remote print file. The <em class="replaceable">copies</em> argument
4055is the number of copies that will be printed. This number is used
4056only if the (optional) <em class="filename">filename</em> argument is
4057supplied. Otherwise, only one copy is printed. The
4058<em class="replaceable">options</em> argument, for specifying printing
4059options, is ignored. The <em class="replaceable">filename</em> argument
4060is used for specifying the name of the file to be printed. If it is
4061not provided, the standard input will be used.</p>
4062
4063<p>The printer that the job is to be sent to is specified in the
4064DEVICE_URI environment variable. The format for the printer name is a
4065device Universal Resource Indicator, which can be in any of the
4066following formats:</p>
4067
4068<blockquote class="simplelist">
4069
4070<p><em class="emphasis">smb://server/printer</em></p>
4071
4072
4073
4074
4075<p><em class="emphasis">smb://workgroup/server/printer</em></p>
4076
4077
4078
4079
4080<p><em class="emphasis">smb://username:password@server/printer</em></p>
4081
4082
4083
4084
4085<p><em class="emphasis">smb://username:password@workgroup/server/printer</em></p>
4086
4087</blockquote>
4088
4089
4090</div>
4091</div>
4092
4093<a name="INDEX-29"/><a name="INDEX-30"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbstatus</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This program lists the current connections on a Samba server.</p>
4094<div class="sect1"><a name="appc-70-fm2xml"/>
4095
4096<h4 class="refsect1">Options</h4>
4097
4098<dl>
4099<dt><b><tt class="literal">-b</tt></b></dt>
4100<dd>
4101<p>Causes <em class="emphasis">smbstatus</em> to produce brief output. This
4102includes the version of Samba and auditing information about the
4103users that are connected to the server.</p>
4104</dd>
4105
4106
4107
4108<dt><b><tt class="literal">-d</tt></b></dt>
4109<dd>
4110<p>Gives verbose output, which includes a list of services, a list of
4111locked files, and memory usage statistics. This is the default.</p>
4112</dd>
4113
4114
4115
4116<dt><b><tt class="literal">-L</tt></b></dt>
4117<dd>
4118<p>Prints only the list of current file locks.</p>
4119</dd>
4120
4121
4122
4123<dt><b><tt class="literal">-p</tt></b></dt>
4124<dd>
4125<p>Prints only a list of <em class="emphasis">smbd</em> process IDs.</p>
4126</dd>
4127
4128
4129
4130<dt><b><tt class="literal">-P</tt></b></dt>
4131<dd>
4132<p>Prints only the contents of the profiling memory area. Requires that
4133Samba has been compiled with the profiling option.</p>
4134</dd>
4135
4136
4137
4138<dt><b><tt class="literal">-S</tt></b></dt>
4139<dd>
4140<p>Prints only a list of shares and their connections.</p>
4141</dd>
4142
4143
4144
4145<dt><b><tt class="literal">-s</tt> <em class="replaceable">filename</em></b></dt>
4146<dd>
4147<p>Specifies the Samba configuration file to use when processing this
4148command.</p>
4149</dd>
4150
4151
4152
4153<dt><b><tt class="literal">-u</tt> <em class="replaceable">username</em></b></dt>
4154<dd>
4155<p>Limits the report to the activity of a single user.</p>
4156</dd>
4157
4158</dl>
4159
4160
4161</div>
4162</div>
4163
4164<a name="INDEX-31"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbtar</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">smbtar</em> program is a shell-script wrapper
4165around <em class="emphasis">smbclient</em> for doing tar-format archiving
4166operations. It is functionally very similar to the Unix
4167<em class="emphasis">tar</em> program.</p>
4168<div class="sect1"><a name="appc-72-fm2xml"/>
4169
4170<h4 class="refsect1">Command synopsis</h4>
4171
4172<blockquote><pre class="code">smbtar <em class="replaceable">[options]</em></pre></blockquote>
4173
4174
4175</div>
4176
4177<div class="sect1"><a name="appc-73-fm2xml"/>
4178
4179<h4 class="refsect1">Options</h4>
4180
4181<dl>
4182<dt><b><tt class="literal">-a</tt></b></dt>
4183<dd>
4184<p>Resets (clears) the archive attribute on files after they are backed
4185up. The default is to leave the archive attribute unchanged.</p>
4186</dd>
4187
4188
4189
4190<dt><b><tt class="literal">-b</tt> <em class="replaceable">blocksize</em></b></dt>
4191<dd>
4192<p>Sets block size, in units of 512 bytes, for reading or writing the
4193archive file. Defaults to 20, which results in a block size of 10240
4194bytes.</p>
4195</dd>
4196
4197
4198
4199<dt><b><tt class="literal">-d</tt> <em class="replaceable">directory</em></b></dt>
4200<dd>
4201<p>Changes the working directory on the remote system to
4202<em class="replaceable">directory</em> before starting the restore or
4203backup operation.</p>
4204</dd>
4205
4206
4207
4208<dt><b><tt class="literal">-i</tt></b></dt>
4209<dd>
4210<p>Specifies incremental mode; files are backed up only if they have the
4211DOS archive attribute set. The archive attribute is reset (cleared)
4212after each file is read.</p>
4213</dd>
4214
4215
4216
4217<dt><b><tt class="literal">-l</tt> <em class="replaceable">log_level</em></b></dt>
4218<dd>
4219<p>Sets the logging level. This corresponds to the <tt class="literal">-d</tt>
4220option of <em class="emphasis">smbclient</em> and other Samba programs.</p>
4221</dd>
4222
4223
4224
4225<dt><b><tt class="literal">-N</tt> <em class="replaceable">filename</em></b></dt>
4226<dd>
4227<p>Backs up only files newer than <em class="filename">filename</em>. For
4228incremental backups.</p>
4229</dd>
4230
4231
4232
4233<dt><b><tt class="literal">-p</tt> <em class="replaceable">password</em></b></dt>
4234<dd>
4235<p>Specifies the password to use to access a share. An alternative to
4236using the
4237<em class="replaceable">username</em><tt class="literal">%</tt><em class="replaceable">password</em>
4238format with the <tt class="literal">-u</tt> option.</p>
4239</dd>
4240
4241
4242
4243<dt><b><tt class="literal">-r</tt></b></dt>
4244<dd>
4245<p>Restores files to the share from the tar file.</p>
4246</dd>
4247
4248
4249
4250<dt><b><tt class="literal">-s</tt> <em class="replaceable">server</em></b></dt>
4251<dd>
4252<p>Specifies the SMB server. See also the <tt class="literal">-x</tt> option.</p>
4253</dd>
4254
4255
4256
4257<dt><b><tt class="literal">-t</tt> <em class="replaceable">filename</em></b></dt>
4258<dd>
4259<p>Specifies the file or Unix device to use as the archiving medium. The
4260default is <em class="filename">tar.out</em> or the value of the TAPE
4261environment variable, if it has been set.</p>
4262</dd>
4263
4264
4265
4266<dt><b><tt class="literal">-u</tt> <em class="replaceable">username</em></b></dt>
4267<dd>
4268<p>Specifies the user account to use when connecting to the share. You
4269can specify the password as well, in the format
4270<em class="replaceable">username</em><tt class="literal">%</tt><em class="replaceable">password</em>.
4271The username defaults to the user's Unix username.</p>
4272</dd>
4273
4274
4275
4276<dt><b><tt class="literal">-v</tt></b></dt>
4277<dd>
4278<p>Operates in verbose mode, printing error messages and additional
4279information that can be used in debugging and monitoring. Backup and
4280restore operations will list each file as it is processed.</p>
4281</dd>
4282
4283
4284
4285<dt><b><tt class="literal">-x</tt> <em class="replaceable">share</em></b></dt>
4286<dd>
4287<p>States the name of the share on the server to which to connect. The
4288default is <tt class="literal">backup</tt>. See also the
4289<tt class="literal">-s</tt> option.</p>
4290</dd>
4291
4292
4293
4294<dt><b><tt class="literal">-X</tt> <em class="replaceable">file_list</em></b></dt>
4295<dd>
4296<p>Tells <em class="emphasis">smbtar</em> to exclude the specified files from
4297the backup or restore operation.</p>
4298</dd>
4299
4300</dl>
4301
4302
4303</div>
4304</div>
4305
4306<a name="INDEX-32"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbumount</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">smbumount</em> command exists to allow an
4307ordinary (nonsuperuser) user to unmount a smbfs filesystem, which the
4308user had previously mounted using <em class="emphasis">smbmount</em>.</p>
4309<div class="sect1"><a name="appc-75-fm2xml"/>
4310
4311<h4 class="refsect1">Command synopsis</h4>
4312
4313<blockquote><pre class="code">smbumount <em class="replaceable">mount_point</em></pre></blockquote>
4314<p>For ordinary users to issue the command,
4315<em class="emphasis">smbumount</em> must be made suid
4316<tt class="literal">root</tt>.</p>
4317
4318</div>
4319</div>
4320
4321<a name="INDEX-33"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>testparm</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">testparm</em> program checks a Samba
4322configuration file for obvious errors.</p>
4323<div class="sect1"><a name="appc-77-fm2xml"/>
4324
4325<h4 class="refsect1">Command synopsis</h4>
4326
4327<blockquote><pre class="code">testparm <em class="replaceable">[options] [filename] [hostname IP_addr]</em></pre></blockquote>
4328<p>If the configuration file is not provided using the
4329<em class="filename">filename</em> argument, then it defaults to
4330<em class="filename">/usr/local/samba/lib/smb.conf</em>. If the hostname
4331and an IP address of a system are included, an extra check is made to
4332ensure that the system is allowed to connect to each service defined
4333in the configuration file. This is done by comparing the hostname and
4334IP address to the definitions of the <tt class="literal">hosts allow</tt>
4335and <tt class="literal">hosts deny</tt> parameters.</p>
4336
4337</div>
4338
4339<div class="sect1"><a name="appc-78-fm2xml"/>
4340
4341<h4 class="refsect1">Options</h4>
4342
4343<dl>
4344<dt><b><tt class="literal">-h</tt></b></dt>
4345<dd>
4346<p>Prints usage information for the program.</p>
4347</dd>
4348
4349
4350
4351<dt><b><tt class="literal">-L</tt> <em class="replaceable">server_name</em></b></dt>
4352<dd>
4353<p>Sets the <tt class="literal">%L</tt> configuration variable to the
4354specified server name.</p>
4355</dd>
4356
4357
4358
4359<dt><b><tt class="literal">-s</tt></b></dt>
4360<dd>
4361<p>Disables the default behavior of prompting for the Enter key to be
4362pressed before printing the list of configuration options for the
4363server.</p>
4364</dd>
4365
4366</dl>
4367
4368
4369</div>
4370</div>
4371
4372<a name="INDEX-34"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>testprns</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This is a very simple program that checks to see if a specified
4373printer name exists in the system printer capabilities (printcap)
4374file.</p>
4375<div class="sect1"><a name="appc-80-fm2xml"/>
4376
4377<h4 class="refsect1">Command synopsis</h4>
4378
4379<blockquote><pre class="code">testprns <em class="replaceable">printername [printcapname]</em></pre></blockquote>
4380<p>If <em class="replaceable">printcapname</em> isn't
4381specified, Samba attempts to use the one specified in the Samba
4382configuration file with the <tt class="literal">printcap name</tt>
4383parameter. If none is specified there, Samba will try
4384<em class="filename">/etc/printcap</em>.</p>
4385
4386</div>
4387</div>
4388
4389<a name="INDEX-35"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>wbinfo</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This program retrieves and prints information from the
4390<em class="emphasis">winbindd</em> daemon, which must be running for
4391<em class="emphasis">wbinfo</em> to function.</p>
4392<div class="sect1"><a name="appc-82-fm2xml"/>
4393
4394<h4 class="refsect1">Command synopsis</h4>
4395
4396<blockquote><pre class="code">wbinfo <em class="replaceable">[options]</em></pre></blockquote>
4397
4398
4399</div>
4400
4401<div class="sect1"><a name="appc-83-fm2xml"/>
4402
4403<h4 class="refsect1">Options</h4>
4404
4405<dl>
4406<dt><b><tt class="literal">-u</tt> </b></dt>
4407<dd>
4408<p>Prints all usernames that have been mapped from the Windows NT domain
4409to Unix users. Users in all trusted domains are also listed.</p>
4410</dd>
4411
4412
4413
4414<dt><b> <tt class="literal">-</tt><em class="emphasis">g</em> </b></dt>
4415<dd>
4416<p>Prints all group names that have been mapped from the Windows NT
4417domain to Unix groups. Groups in all trusted domains are also
4418reported.</p>
4419</dd>
4420
4421
4422
4423<dt><b><tt class="literal">-h</tt> <em class="replaceable">NetBIOS_name</em></b></dt>
4424<dd>
4425<p>Queries the WINS server and prints the IP address of the specified
4426system.</p>
4427</dd>
4428
4429
4430
4431<dt><b><tt class="literal">-n</tt> <em class="replaceable">name</em> </b></dt>
4432<dd>
4433<p>Prints the SID corresponding to the name specified. The argument can
4434be specified as <em class="replaceable">DOMAIN/name</em> (or by using a
4435character other than the slash, as defined by the winbind separator
4436character) to specify both the domain and the name. If the domain and
4437separator are omitted, the value of the <tt class="literal">workgroup</tt>
4438parameter in the Samba configuration file is used as the name of the
4439domain.</p>
4440</dd>
4441
4442
4443
4444<dt><b><tt class="literal">-s</tt> <em class="replaceable">SID</em> </b></dt>
4445<dd>
4446<p>Prints the name mapped to a SID, which is specified in the format
4447<tt class="literal">S-1-</tt><em class="replaceable">N-N-D-D-D-R</em>.</p>
4448</dd>
4449
4450
4451
4452<dt><b><tt class="literal">-U</tt> <em class="replaceable">UID</em></b></dt>
4453<dd>
4454<p>Prints the SID mapped to a Unix UID, if one exists in the current
4455domain.</p>
4456</dd>
4457
4458
4459
4460<dt><b><tt class="literal">-G</tt> <em class="replaceable">gid</em></b></dt>
4461<dd>
4462<p>Prints the SID mapped to a Unix group ID, if one exists in the
4463current domain.</p>
4464</dd>
4465
4466
4467
4468<dt><b><tt class="literal">-S</tt> <em class="replaceable">SID</em></b></dt>
4469<dd>
4470<p>Prints the Unix UID that winbind has mapped to the specified SID, if
4471one exists.</p>
4472</dd>
4473
4474
4475
4476<dt><b><tt class="literal">-Y</tt> <em class="replaceable">SID</em></b></dt>
4477<dd>
4478<p>Prints the Unix group ID that winbind has mapped to the specified
4479SID, if one exists.</p>
4480</dd>
4481
4482
4483
4484<dt><b><tt class="literal">-t</tt></b></dt>
4485<dd>
4486<p>Tests to see that the workstation trust account for the Samba server
4487is valid.</p>
4488</dd>
4489
4490
4491
4492<dt><b><tt class="literal">-m</tt> </b></dt>
4493<dd>
4494<p>Prints a list of Windows NT domains trusted by the Windows server.
4495This does not include the PDC's domain.</p>
4496</dd>
4497
4498
4499
4500<dt><b><tt class="literal">-r</tt> <em class="replaceable">username</em></b></dt>
4501<dd>
4502<p>Prints the list of Unix group IDs to which the user belongs. This
4503works only if the user's account is maintained on a
4504domain controller.</p>
4505</dd>
4506
4507
4508
4509<dt><b><tt class="literal">-a</tt> <em class="replaceable">username</em><tt class="literal">%</tt><em class="replaceable">password</em></b></dt>
4510<dd>
4511<p>Checks to see if a user can authenticate through
4512<em class="emphasis">winbindd</em> using the specified username and
4513password.</p>
4514</dd>
4515
4516
4517
4518<dt><b><tt class="literal">-A</tt> <em class="replaceable">username</em><tt class="literal">%</tt><em class="replaceable">password</em></b></dt>
4519<dd>
4520<p>Saves the username and password used by <em class="emphasis">winbindd</em>
4521to the domain controller. For use when operating in a Windows 2000
4522domain.</p>
4523</dd>
4524
4525</dl>
4526
4527
4528</div>
4529</div>
4530
4531
4532<hr/><h4 class="head4"><a href="toc.html">TOC</a></h4>
4533
4534</body></html>
4535