1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="smbcontrol.1">
6 <refentrytitle>smbcontrol</refentrytitle>
7 <manvolnum>1</manvolnum>
8 <refmiscinfo class="source">Samba</refmiscinfo>
9 <refmiscinfo class="manual">User Commands</refmiscinfo>
10 <refmiscinfo class="version">4.1</refmiscinfo>
15 <refname>smbcontrol</refname>
16 <refpurpose>send messages to smbd, nmbd or winbindd processes</refpurpose>
21 <command>smbcontrol</command>
23 <arg>-t|--timeout</arg>
27 <command>smbcontrol</command>
28 <arg>destination</arg>
29 <arg>message-type</arg>
35 <title>DESCRIPTION</title>
37 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
38 <manvolnum>7</manvolnum></citerefentry> suite.</para>
40 <para><command>smbcontrol</command> is a very small program, which
41 sends messages to a <citerefentry><refentrytitle>smbd</refentrytitle>
42 <manvolnum>8</manvolnum></citerefentry>, a <citerefentry><refentrytitle>nmbd</refentrytitle>
43 <manvolnum>8</manvolnum></citerefentry>, or a <citerefentry><refentrytitle>winbindd</refentrytitle>
44 <manvolnum>8</manvolnum></citerefentry> daemon running on the system.</para>
49 <title>OPTIONS</title>
54 &popt.common.samba.client;
56 <term>-t|--timeout</term>
58 Set timeout to seconds.
63 <term>destination</term>
64 <listitem><para>One of <parameter>nmbd</parameter>,
65 <parameter>smbd</parameter>, <parameter>winbindd</parameter>
66 or a process ID.</para>
68 <para>The <parameter>all</parameter> destination causes the
69 message to "broadcast" to all running daemons including nmbd and
70 winbind. This is a change for Samba 3.3, prior to this the
71 parameter smbd used to do this.</para>
73 <para>The <parameter>smbd</parameter> destination causes the
74 message to be sent to the smbd daemon specified in the
75 <filename>smbd.pid</filename> file.</para>
77 <para>The <parameter>nmbd</parameter> destination causes the
78 message to be sent to the nmbd daemon specified in the
79 <filename>nmbd.pid</filename> file.</para>
81 <para>The <parameter>winbindd</parameter> destination causes the
82 message to be sent to the winbind daemon specified in the
83 <filename>winbindd.pid</filename> file.</para>
85 <para>If a single process ID is given, the message is sent
86 to only that process.</para></listitem>
90 <term>message-type</term>
91 <listitem><para>Type of message to send. See
92 the section <constant>MESSAGE-TYPES</constant> for details.
93 </para></listitem></varlistentry>
98 <term>parameters</term>
99 <listitem><para>any parameters required for the message-type</para>
107 <title>MESSAGE-TYPES</title>
109 <para>Available message types are:</para>
112 <varlistentry><term>close-share</term>
113 <listitem><para>Order smbd to close the client
114 connections to the named share. Note that this doesn't affect client
115 connections to any other shares. This message-type takes an argument of the
116 share name for which client connections will be closed, or the
117 "*" character which will close all currently open shares.
118 This may be useful if you made changes to the access controls on the share.
119 This message can only be sent to <constant>smbd</constant>.</para>
125 <listitem><para>Set debug level to the value specified by the
126 parameter. This can be sent to any of the destinations. If this
127 message is sent to either the smbd or winbindd daemons, the parent
128 process will rebroadcast the message to all child processes changing
129 the debug level in each one.</para>
134 <term>kill-client-ip</term>
135 <listitem><para>Order smbd to close the client connections from a
136 given IP address. This message-type takes an argument of the IP
137 address from which client connections will be closed. This message
138 can only be sent to <constant>smbd</constant>.</para>
143 <term>force-election</term>
144 <listitem><para>This message causes the <command>nmbd</command> daemon to
145 force a new browse master election. </para>
146 </listitem></varlistentry>
151 Send specified number of "ping" messages and
152 wait for the same number of reply "pong" messages. This can be sent to
153 any of the destinations.</para>
159 <listitem><para>Change profile settings of a daemon, based on the
160 parameter. The parameter can be "on" to turn on profile stats
161 collection, "off" to turn off profile stats collection, "count"
162 to enable only collection of count stats (time stats are
163 disabled), and "flush" to zero the current profile stats. This can
164 be sent to any smbd or nmbd destinations.</para>
165 </listitem></varlistentry>
168 <term>debuglevel</term>
170 Request debuglevel of a certain daemon and write it to stdout. This
171 can be sent to any of the destinations.</para>
176 <term>profilelevel</term>
178 Request profilelevel of a certain daemon and write it to stdout.
179 This can be sent to any smbd or nmbd destinations.</para>
184 <term>printnotify</term>
186 Order smbd to send a printer notify message to any Windows NT clients
187 connected to a printer. This message-type takes the following arguments:
193 <term>queuepause printername</term>
194 <listitem><para>Send a queue pause change notify
195 message to the printer specified.</para></listitem>
199 <term>queueresume printername</term>
200 <listitem><para>Send a queue resume change notify
201 message for the printer specified.</para></listitem>
205 <term>jobpause printername unixjobid</term>
206 <listitem><para>Send a job pause change notify
207 message for the printer and unix jobid
208 specified.</para></listitem>
212 <term>jobresume printername unixjobid</term>
213 <listitem><para>Send a job resume change notify
214 message for the printer and unix jobid
215 specified.</para></listitem>
219 <term>jobdelete printername unixjobid</term>
220 <listitem><para>Send a job delete change notify
221 message for the printer and unix jobid
222 specified.</para></listitem>
227 Note that this message only sends notification that an
228 event has occurred. It doesn't actually cause the
232 <para>This message can only be sent to <constant>smbd</constant>. </para>
237 <term>dmalloc-mark</term>
238 <listitem><para>Set a mark for dmalloc. Can be sent to both smbd and nmbd. Only available if samba is built with dmalloc support. </para></listitem>
242 <term>dmalloc-log-changed</term>
244 Dump the pointers that have changed since the mark set by dmalloc-mark.
245 Can be sent to both smbd and nmbd. Only available if samba is built with dmalloc support. </para></listitem>
249 <term>shutdown</term>
250 <listitem><para>Shut down specified daemon. Can be sent to both smbd and nmbd.</para></listitem>
254 <term>pool-usage</term>
255 <listitem><para>Print a human-readable description of all
256 talloc(pool) memory usage by the specified daemon/process. Available
257 for both smbd and nmbd.</para></listitem>
261 <term>drvupgrade</term>
262 <listitem><para>Force clients of printers using specified driver
263 to update their local version of the driver. Can only be
264 sent to smbd.</para></listitem>
268 <term>reload-config</term>
269 <listitem><para>Force daemon to reload smb.conf configuration file. Can be sent
270 to <constant>smbd</constant>, <constant>nmbd</constant>, or <constant>winbindd</constant>.
275 <term>reload-printers</term>
276 <listitem><para>Force smbd to reload printers. Can only be sent to
277 <constant>smbd</constant>.
283 <listitem><para>Notify about changes of id mapping. Can be sent
284 to <constant>smbd</constant> or (not implemented yet) <constant>winbindd</constant>.
289 <term>flush [uid|gid]</term>
290 <listitem><para>Flush caches for sid <-> gid and/or sid <-> uid mapping.
294 <term>delete <ID></term>
295 <listitem><para>Remove a mapping from cache. The mapping is given by <ID>
296 which may either be a sid: S-x-..., a gid: "GID number" or a uid: "UID number".
300 <term>kill <ID></term>
301 <listitem><para>Remove a mapping from cache. Terminate <constant>smbd</constant> if
302 the id is currently in use.</para></listitem>
308 <term>num-children</term>
309 <listitem><para>Query the number of smbd child processes. This
310 message can only be sent
311 to <constant>smbd</constant>.</para></listitem>
318 <title>VERSION</title>
320 <para>This man page is correct for version 3 of
321 the Samba suite.</para>
325 <title>SEE ALSO</title>
326 <para><citerefentry><refentrytitle>nmbd</refentrytitle>
327 <manvolnum>8</manvolnum></citerefentry> and <citerefentry><refentrytitle>smbd</refentrytitle>
328 <manvolnum>8</manvolnum></citerefentry>.</para>
332 <title>AUTHOR</title>
334 <para>The original Samba software and related utilities
335 were created by Andrew Tridgell. Samba is now developed
336 by the Samba Team as an Open Source project similar
337 to the way the Linux kernel is developed.</para>
339 <para>The original Samba man pages were written by Karl Auer.
340 The man page sources were converted to YODL format (another
341 excellent piece of Open Source software, available at <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
342 ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0
343 release by Jeremy Allison. The conversion to DocBook for
344 Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2 for
345 Samba 3.0 was done by Alexander Bokovoy.</para>