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">&doc.version;</refmiscinfo>
15 <refname>smbcontrol</refname>
16 <refpurpose>send messages to smbd, nmbd or winbindd processes</refpurpose>
21 <command>smbcontrol</command>
22 <arg choice="opt">-?|--help</arg>
23 <arg choice="opt">--usage</arg>
24 <arg choice="opt">-t|--timeout</arg>
25 <arg choice="opt">-d|--debuglevel=DEBUGLEVEL</arg>
26 <arg choice="opt">--debug-stdout</arg>
27 <arg choice="opt">--configfile=CONFIGFILE</arg>
28 <arg choice="opt">--option=name=value</arg>
29 <arg choice="opt">-l|--log-basename=LOGFILEBASE</arg>
30 <arg choice="opt">--leak-report</arg>
31 <arg choice="opt">--leak-report-full</arg>
35 <command>smbcontrol</command>
36 <arg>destination</arg>
37 <arg>message-type</arg>
43 <title>DESCRIPTION</title>
45 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
46 <manvolnum>7</manvolnum></citerefentry> suite.</para>
48 <para><command>smbcontrol</command> is a very small program, which
49 sends messages to a <citerefentry><refentrytitle>smbd</refentrytitle>
50 <manvolnum>8</manvolnum></citerefentry>, a <citerefentry><refentrytitle>nmbd</refentrytitle>
51 <manvolnum>8</manvolnum></citerefentry>, or a <citerefentry><refentrytitle>winbindd</refentrytitle>
52 <manvolnum>8</manvolnum></citerefentry> daemon running on the system.</para>
57 <title>OPTIONS</title>
61 <term>-t|--timeout</term>
63 Set timeout to seconds.
68 <term>destination</term>
69 <listitem><para>One of <parameter>nmbd</parameter>,
70 <parameter>smbd</parameter>, <parameter>winbindd</parameter>
71 or a process ID.</para>
73 <para>The <parameter>all</parameter> destination causes the
74 message to "broadcast" to all running daemons including nmbd and
75 winbind. This is a change for Samba 3.3, prior to this the
76 parameter smbd used to do this.</para>
78 <para>The <parameter>smbd</parameter> destination causes the
79 message to be sent to the smbd daemon specified in the
80 <filename>smbd.pid</filename> file.</para>
82 <para>The <parameter>nmbd</parameter> destination causes the
83 message to be sent to the nmbd daemon specified in the
84 <filename>nmbd.pid</filename> file.</para>
86 <para>The <parameter>winbindd</parameter> destination causes the
87 message to be sent to the winbind daemon specified in the
88 <filename>winbindd.pid</filename> file.</para>
90 <para>If a single process ID is given, the message is sent
91 to only that process.</para></listitem>
95 <term>message-type</term>
96 <listitem><para>Type of message to send. See
97 the section <constant>MESSAGE-TYPES</constant> for details.
98 </para></listitem></varlistentry>
101 <term>parameters</term>
102 <listitem><para>any parameters required for the message-type</para>
107 &cmdline.common.samba.client;
113 <title>MESSAGE-TYPES</title>
115 <para>Available message types are:</para>
118 <varlistentry><term>close-share</term>
119 <listitem><para>Order smbd to close the client
120 connections to the named share. Note that this doesn't affect client
121 connections to any other shares. This message-type takes an argument of the
122 share name for which client connections will be closed, or the
123 "*" character which will close all currently open shares.
124 This may be useful if you made changes to the access controls on the share.
125 This message can only be sent to <constant>smbd</constant>.</para>
129 <varlistentry><term>close-denied-share</term>
130 <listitem><para>Behave like <constant>close-share</constant>,
131 but don't disconnect users that are still allowed to access
132 the share. It can safely be sent to all smbds after changing
133 share access controls. It will only affect users who have been
134 denied access since having connected initially. This message
135 can only be sent to <constant>smbd</constant>.</para>
141 <listitem><para>Set debug level to the value specified by the
142 parameter. This can be sent to any of the destinations. If this
143 message is sent to either the smbd or winbindd daemons, the parent
144 process will rebroadcast the message to all child processes changing
145 the debug level in each one.</para>
150 <term>kill-client-ip</term>
151 <listitem><para>Order smbd to close the client connections from a
152 given IP address. This message-type takes an argument of the IP
153 address from which client connections will be closed. This message
154 can only be sent to <constant>smbd</constant>.</para>
159 <term>force-election</term>
160 <listitem><para>This message causes the <command>nmbd</command> daemon to
161 force a new browse master election. </para>
162 </listitem></varlistentry>
167 Send specified number of "ping" messages and
168 wait for the same number of reply "pong" messages. This can be sent to
169 any of the destinations.</para>
175 <listitem><para>Change profile settings of a daemon, based on the
176 parameter. The parameter can be "on" to turn on profile stats
177 collection, "off" to turn off profile stats collection, "count"
178 to enable only collection of count stats (time stats are
179 disabled), and "flush" to zero the current profile stats. This can
180 be sent to any smbd or nmbd destinations.</para>
181 </listitem></varlistentry>
184 <term>debuglevel</term>
186 Request debuglevel of a certain daemon and write it to stdout. This
187 can be sent to any of the destinations.</para>
192 <term>profilelevel</term>
194 Request profilelevel of a certain daemon and write it to stdout.
195 This can be sent to any smbd or nmbd destinations.</para>
200 <term>printnotify</term>
202 Order smbd to send a printer notify message to any Windows NT clients
203 connected to a printer. This message-type takes the following arguments:
209 <term>queuepause printername</term>
210 <listitem><para>Send a queue pause change notify
211 message to the printer specified.</para></listitem>
215 <term>queueresume printername</term>
216 <listitem><para>Send a queue resume change notify
217 message for the printer specified.</para></listitem>
221 <term>jobpause printername unixjobid</term>
222 <listitem><para>Send a job pause change notify
223 message for the printer and unix jobid
224 specified.</para></listitem>
228 <term>jobresume printername unixjobid</term>
229 <listitem><para>Send a job resume change notify
230 message for the printer and unix jobid
231 specified.</para></listitem>
235 <term>jobdelete printername unixjobid</term>
236 <listitem><para>Send a job delete change notify
237 message for the printer and unix jobid
238 specified.</para></listitem>
243 Note that this message only sends notification that an
244 event has occurred. It doesn't actually cause the
248 <para>This message can only be sent to <constant>smbd</constant>. </para>
253 <term>dmalloc-mark</term>
254 <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>
258 <term>dmalloc-log-changed</term>
260 Dump the pointers that have changed since the mark set by dmalloc-mark.
261 Can be sent to both smbd and nmbd. Only available if samba is built with dmalloc support. </para></listitem>
265 <term>shutdown</term>
266 <listitem><para>Shut down specified daemon. Can be sent to both smbd and nmbd.</para></listitem>
270 <term>pool-usage</term>
271 <listitem><para>Print a human-readable description of all
272 talloc(pool) memory usage by the specified daemon/process. Available
273 for both smbd and nmbd.</para></listitem>
277 <term>ringbuf-log</term>
278 <listitem><para>Fetch and print the ringbuf log. Requires
279 <parameter>logging = ringbuf</parameter>. Available for smbd, winbindd
280 and nmbd.</para></listitem>
284 <term>drvupgrade</term>
285 <listitem><para>Force clients of printers using specified driver
286 to update their local version of the driver. Can only be
287 sent to smbd.</para></listitem>
291 <term>reload-config</term>
292 <listitem><para>Force daemon to reload smb.conf configuration file. Can be sent
293 to <constant>smbd</constant>, <constant>nmbd</constant>, or <constant>winbindd</constant>.
298 <term>reload-printers</term>
299 <listitem><para>Force smbd to reload printers. Can only be sent to
300 <constant>smbd</constant>.
306 <listitem><para>Notify about changes of id mapping. Can be sent
307 to <constant>smbd</constant> or (not implemented yet) <constant>winbindd</constant>.
312 <term>flush [uid|gid]</term>
313 <listitem><para>Flush caches for sid <-> gid and/or sid <-> uid mapping.
317 <term>delete <ID></term>
318 <listitem><para>Remove a mapping from cache. The mapping is given by <ID>
319 which may either be a sid: S-x-..., a gid: "GID number" or a uid: "UID number".
323 <term>kill <ID></term>
324 <listitem><para>Remove a mapping from cache. Terminate <constant>smbd</constant> if
325 the id is currently in use.</para></listitem>
332 <term>num-children</term>
333 <listitem><para>Query the number of smbd child processes. This
334 message can only be sent
335 to <constant>smbd</constant>.</para></listitem>
339 <term>reload-certs</term>
340 <listitem><para>Instruct the LDAP server of a Samba AD DC to
341 reload the TLS certificates protecting ldaps:// connections. This
342 message can only be sent
343 to <constant>ldap_server</constant>.</para></listitem>
350 <title>VERSION</title>
352 <para>This man page is part of version &doc.version; of
353 the Samba suite.</para>
357 <title>SEE ALSO</title>
358 <para><citerefentry><refentrytitle>nmbd</refentrytitle>
359 <manvolnum>8</manvolnum></citerefentry> and <citerefentry><refentrytitle>smbd</refentrytitle>
360 <manvolnum>8</manvolnum></citerefentry>.</para>
364 <title>AUTHOR</title>
366 <para>The original Samba software and related utilities
367 were created by Andrew Tridgell. Samba is now developed
368 by the Samba Team as an Open Source project similar
369 to the way the Linux kernel is developed.</para>