1SMBCONTROL(1) User Commands SMBCONTROL(1)
2
3
4
6 smbcontrol - send messages to smbd, nmbd or winbindd processes
7
9 smbcontrol [-s] [-t|--timeout]
10
11 smbcontrol [destination] [message-type] [parameter]
12
14 This tool is part of the samba(7) suite.
15
16 smbcontrol is a very small program, which sends messages to a smbd(8),
17 a nmbd(8), or a winbindd(8) daemon running on the system.
18
20 -?|--help
21 Print a summary of command line options.
22
23 --usage
24 Display brief usage message.
25
26 -d|--debuglevel=level
27 level is an integer from 0 to 10. The default value if this
28 parameter is not specified is 1.
29
30 The higher this value, the more detail will be logged to the log
31 files about the activities of the server. At level 0, only critical
32 errors and serious warnings will be logged. Level 1 is a reasonable
33 level for day-to-day running - it generates a small amount of
34 information about operations carried out.
35
36 Levels above 1 will generate considerable amounts of log data, and
37 should only be used when investigating a problem. Levels above 3
38 are designed for use only by developers and generate HUGE amounts
39 of log data, most of which is extremely cryptic.
40
41 Note that specifying this parameter here will override the log
42 level parameter in the smb.conf file.
43
44 -V|--version
45 Prints the program version number.
46
47 -s|--configfile=<configuration file>
48 The file specified contains the configuration details required by
49 the server. The information in this file includes server-specific
50 information such as what printcap file to use, as well as
51 descriptions of all the services that the server is to provide. See
52 smb.conf for more information. The default configuration file name
53 is determined at compile time.
54
55 -l|--log-basename=logdirectory
56 Base directory name for log/debug files. The extension ".progname"
57 will be appended (e.g. log.smbclient, log.smbd, etc...). The log
58 file is never removed by the client.
59
60 --option=<name>=<value>
61 Set the smb.conf(5) option "<name>" to value "<value>" from the
62 command line. This overrides compiled-in defaults and options read
63 from the configuration file.
64
65 -t|--timeout
66 Set timeout to seconds.
67
68 destination
69 One of nmbd, smbd, winbindd or a process ID.
70
71 The all destination causes the message to "broadcast" to all
72 running daemons including nmbd and winbind. This is a change for
73 Samba 3.3, prior to this the parameter smbd used to do this.
74
75 The smbd destination causes the message to be sent to the smbd
76 daemon specified in the smbd.pid file.
77
78 The nmbd destination causes the message to be sent to the nmbd
79 daemon specified in the nmbd.pid file.
80
81 The winbindd destination causes the message to be sent to the
82 winbind daemon specified in the winbindd.pid file.
83
84 If a single process ID is given, the message is sent to only that
85 process.
86
87 message-type
88 Type of message to send. See the section MESSAGE-TYPES for details.
89
90 parameters
91 any parameters required for the message-type
92
94 Available message types are:
95
96 close-share
97 Order smbd to close the client connections to the named share. Note
98 that this doesn't affect client connections to any other shares.
99 This message-type takes an argument of the share name for which
100 client connections will be closed, or the "*" character which will
101 close all currently open shares. This may be useful if you made
102 changes to the access controls on the share. This message can only
103 be sent to smbd.
104
105 close-denied-share
106 Behave like close-share, but don't disconnect users that are still
107 allowed to access the share. It can safely be sent to all smbds
108 after changing share access controls. It will only affect users who
109 have been denied access since having connected initially. This
110 message can only be sent to smbd.
111
112 debug
113 Set debug level to the value specified by the parameter. This can
114 be sent to any of the destinations. If this message is sent to
115 either the smbd or winbindd daemons, the parent process will
116 rebroadcast the message to all child processes changing the debug
117 level in each one.
118
119 kill-client-ip
120 Order smbd to close the client connections from a given IP address.
121 This message-type takes an argument of the IP address from which
122 client connections will be closed. This message can only be sent to
123 smbd.
124
125 force-election
126 This message causes the nmbd daemon to force a new browse master
127 election.
128
129 ping
130 Send specified number of "ping" messages and wait for the same
131 number of reply "pong" messages. This can be sent to any of the
132 destinations.
133
134 profile
135 Change profile settings of a daemon, based on the parameter. The
136 parameter can be "on" to turn on profile stats collection, "off" to
137 turn off profile stats collection, "count" to enable only
138 collection of count stats (time stats are disabled), and "flush" to
139 zero the current profile stats. This can be sent to any smbd or
140 nmbd destinations.
141
142 debuglevel
143 Request debuglevel of a certain daemon and write it to stdout. This
144 can be sent to any of the destinations.
145
146 profilelevel
147 Request profilelevel of a certain daemon and write it to stdout.
148 This can be sent to any smbd or nmbd destinations.
149
150 printnotify
151 Order smbd to send a printer notify message to any Windows NT
152 clients connected to a printer. This message-type takes the
153 following arguments:
154
155 queuepause printername
156 Send a queue pause change notify message to the printer
157 specified.
158
159 queueresume printername
160 Send a queue resume change notify message for the printer
161 specified.
162
163 jobpause printername unixjobid
164 Send a job pause change notify message for the printer and unix
165 jobid specified.
166
167 jobresume printername unixjobid
168 Send a job resume change notify message for the printer and
169 unix jobid specified.
170
171 jobdelete printername unixjobid
172 Send a job delete change notify message for the printer and
173 unix jobid specified.
174
175 Note that this message only sends notification that an event has
176 occurred. It doesn't actually cause the event to happen.
177
178 This message can only be sent to smbd.
179
180 dmalloc-mark
181 Set a mark for dmalloc. Can be sent to both smbd and nmbd. Only
182 available if samba is built with dmalloc support.
183
184 dmalloc-log-changed
185 Dump the pointers that have changed since the mark set by
186 dmalloc-mark. Can be sent to both smbd and nmbd. Only available if
187 samba is built with dmalloc support.
188
189 shutdown
190 Shut down specified daemon. Can be sent to both smbd and nmbd.
191
192 pool-usage
193 Print a human-readable description of all talloc(pool) memory usage
194 by the specified daemon/process. Available for both smbd and nmbd.
195
196 ringbuf-log
197 Fetch and print the ringbuf log. Requires logging = ringbuf.
198 Available for smbd, winbindd and nmbd.
199
200 drvupgrade
201 Force clients of printers using specified driver to update their
202 local version of the driver. Can only be sent to smbd.
203
204 reload-config
205 Force daemon to reload smb.conf configuration file. Can be sent to
206 smbd, nmbd, or winbindd.
207
208 reload-printers
209 Force smbd to reload printers. Can only be sent to smbd.
210
211 idmap
212 Notify about changes of id mapping. Can be sent to smbd or (not
213 implemented yet) winbindd.
214
215 flush [uid|gid]
216 Flush caches for sid <-> gid and/or sid <-> uid mapping.
217
218 delete <ID>
219 Remove a mapping from cache. The mapping is given by <ID> which
220 may either be a sid: S-x-..., a gid: "GID number" or a uid:
221 "UID number".
222
223 kill <ID>
224 Remove a mapping from cache. Terminate smbd if the id is
225 currently in use.
226
227 num-children
228 Query the number of smbd child processes. This message can only be
229 sent to smbd.
230
232 This man page is part of version 4.13.7 of the Samba suite.
233
235 nmbd(8) and smbd(8).
236
238 The original Samba software and related utilities were created by
239 Andrew Tridgell. Samba is now developed by the Samba Team as an Open
240 Source project similar to the way the Linux kernel is developed.
241
242
243
244Samba 4.13.7 03/25/2021 SMBCONTROL(1)