'\" t
.\"     Title: smbcontrol
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 07/01/2026
.\"    Manual: User Commands
.\"    Source: Samba 4.24.4
.\"  Language: English
.\"
.TH "SMBCONTROL" "1" "07/01/2026" "Samba 4\&.24\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
smbcontrol \- send messages to smbd, nmbd or winbindd processes
.SH "SYNOPSIS"
.HP \w'\ 'u
smbcontrol [\-?|\-\-help] [\-\-usage] [\-t|\-\-timeout] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full]
.HP \w'\ 'u
smbcontrol [destination] [message\-type] [parameter]
.SH "DESCRIPTION"
.PP
This tool is part of the
\fBsamba\fR(7)
suite\&.
.PP
smbcontrol
is a very small program, which sends messages to a
\fBsmbd\fR(8), a
\fBnmbd\fR(8), or a
\fBwinbindd\fR(8)
daemon running on the system\&.
.SH "OPTIONS"
.PP
\-t|\-\-timeout
.RS 4
Set timeout to seconds\&.
.RE
.PP
destination
.RS 4
One of
\fInmbd\fR,
\fIsmbd\fR,
\fIwinbindd\fR
or a process ID\&.
.sp
The
\fIall\fR
destination causes the message to "broadcast" to all running daemons including nmbd and winbind\&. This is a change for Samba 3\&.3, prior to this the parameter smbd used to do this\&.
.sp
The
\fIsmbd\fR
destination causes the message to be sent to the smbd daemon specified in the
smbd\&.pid
file\&.
.sp
The
\fInmbd\fR
destination causes the message to be sent to the nmbd daemon specified in the
nmbd\&.pid
file\&.
.sp
The
\fIwinbindd\fR
destination causes the message to be sent to the winbind daemon specified in the
winbindd\&.pid
file\&.
.sp
If a single process ID is given, the message is sent to only that process\&.
.RE
.PP
message\-type
.RS 4
Type of message to send\&. See the section
\fBMESSAGE\-TYPES\fR
for details\&.
.RE
.PP
parameters
.RS 4
any parameters required for the message\-type
.RE
.PP
\-?|\-\-help
.RS 4
Print a summary of command line options\&.
.RE
.PP
\-\-usage
.RS 4
Display brief usage message\&.
.RE
.PP
\-d|\-\-debuglevel=level
.RS 4
\fIlevel\fR
is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&.
.sp
The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&.
.sp
Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&.
.sp
Note that specifying this parameter here will override the
\m[blue]\fBlog level\fR\m[]
parameter in the
/etc/samba/smb\&.conf
file\&.
.RE
.PP
\-\-debug\-stdout
.RS 4
This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&.
.RE
.PP
\-\-configfile=<configuration file>
.RS 4
The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as
\m[blue]\fBclient smb encrypt\fR\m[]\&. See
/etc/samba/smb\&.conf
for more information\&. The default configuration file name is determined at compile time\&.
.RE
.PP
\-\-option=<name>=<value>
.RS 4
Set the
\fBsmb.conf\fR(5)
option "<name>" to value "<value>" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&.
.RE
.PP
\-l|\-\-log\-basename=logdirectory
.RS 4
Base directory name for log/debug files\&. The extension
\fB"\&.progname"\fR
will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&.
.RE
.PP
\-\-leak\-report
.RS 4
Enable talloc leak reporting on exit\&.
.RE
.PP
\-\-leak\-report\-full
.RS 4
Enable full talloc leak reporting on exit\&.
.RE
.PP
\-V|\-\-version
.RS 4
Prints the program version number\&.
.RE
.SH "MESSAGE\-TYPES"
.PP
Available message types are:
.PP
close\-share
.RS 4
Order smbd to close the client connections to the named share\&. Note that this doesn\*(Aqt affect client connections to any other shares\&. This message\-type takes an argument of the share name for which client connections will be closed, or the "*" character which will close all currently open shares\&. This may be useful if you made changes to the access controls on the share\&. This message can only be sent to
\fBsmbd\fR\&.
.RE
.PP
close\-denied\-share
.RS 4
Behave like
\fBclose\-share\fR, but don\*(Aqt disconnect users that are still allowed to access the share\&. It can safely be sent to all smbds after changing share access controls\&. It will only affect users who have been denied access since having connected initially\&. This message can only be sent to
\fBsmbd\fR\&.
.RE
.PP
debug
.RS 4
Set debug level to the value specified by the parameter\&. This can be sent to any of the destinations\&. If this message is sent to either the smbd or winbindd daemons, the parent process will rebroadcast the message to all child processes changing the debug level in each one\&.
.RE
.PP
kill\-client\-ip
.RS 4
Order smbd to close the client connections from a given IP address\&. This message\-type takes an argument of the IP address from which client connections will be closed\&. This message can only be sent to
\fBsmbd\fR\&.
.RE
.PP
force\-election
.RS 4
This message causes the
nmbd
daemon to force a new browse master election\&.
.RE
.PP
ping
.RS 4
Send specified number of "ping" messages and wait for the same number of reply "pong" messages\&. This can be sent to any of the destinations\&.
.RE
.PP
profile
.RS 4
Change profile settings of a daemon, based on the parameter\&. The parameter can be "on" to turn on profile stats collection, "off" to turn off profile stats collection, "count" to enable only collection of count stats (time stats are disabled), and "flush" to zero the current profile stats\&. This can be sent to any smbd or nmbd destinations\&.
.RE
.PP
debuglevel
.RS 4
Request debuglevel of a certain daemon and write it to stdout\&. This can be sent to any of the destinations\&.
.RE
.PP
profilelevel
.RS 4
Request profilelevel of a certain daemon and write it to stdout\&. This can be sent to any smbd or nmbd destinations\&.
.RE
.PP
printnotify
.RS 4
Order smbd to send a printer notify message to any Windows NT clients connected to a printer\&. This message\-type takes the following arguments:
.PP
queuepause printername
.RS 4
Send a queue pause change notify message to the printer specified\&.
.RE
.PP
queueresume printername
.RS 4
Send a queue resume change notify message for the printer specified\&.
.RE
.PP
jobpause printername unixjobid
.RS 4
Send a job pause change notify message for the printer and unix jobid specified\&.
.RE
.PP
jobresume printername unixjobid
.RS 4
Send a job resume change notify message for the printer and unix jobid specified\&.
.RE
.PP
jobdelete printername unixjobid
.RS 4
Send a job delete change notify message for the printer and unix jobid specified\&.
.RE
.sp
Note that this message only sends notification that an event has occurred\&. It doesn\*(Aqt actually cause the event to happen\&.
.sp
This message can only be sent to
\fBsmbd\fR\&.
.RE
.PP
dmalloc\-mark
.RS 4
Set a mark for dmalloc\&. Can be sent to both smbd and nmbd\&. Only available if samba is built with dmalloc support\&.
.RE
.PP
dmalloc\-log\-changed
.RS 4
Dump the pointers that have changed since the mark set by dmalloc\-mark\&. Can be sent to both smbd and nmbd\&. Only available if samba is built with dmalloc support\&.
.RE
.PP
shutdown
.RS 4
Shut down specified daemon\&. Can be sent to both smbd and nmbd\&.
.RE
.PP
pool\-usage
.RS 4
Print a human\-readable description of all talloc(pool) memory usage by the specified daemon/process\&. Available for both smbd and nmbd\&.
.RE
.PP
ringbuf\-log
.RS 4
Fetch and print the ringbuf log\&. Requires
\fIlogging = ringbuf\fR\&. Available for smbd, winbindd and nmbd\&.
.RE
.PP
drvupgrade
.RS 4
Force clients of printers using specified driver to update their local version of the driver\&. Can only be sent to smbd\&.
.RE
.PP
reload\-config
.RS 4
Force daemon to reload smb\&.conf configuration file\&. Can be sent to
\fBsmbd\fR,
\fBnmbd\fR, or
\fBwinbindd\fR\&.
.RE
.PP
reload\-printers
.RS 4
Force smbd to reload printers\&. Can only be sent to
\fBsmbd\fR\&.
.RE
.PP
idmap
.RS 4
Notify about changes of id mapping\&. Can be sent to
\fBsmbd\fR
or (not implemented yet)
\fBwinbindd\fR\&.
.PP
flush [uid|gid]
.RS 4
Flush caches for sid <\-> gid and/or sid <\-> uid mapping\&.
.RE
.PP
delete <ID>
.RS 4
Remove a mapping from cache\&. The mapping is given by <ID> which may either be a sid: S\-x\-\&.\&.\&., a gid: "GID number" or a uid: "UID number"\&.
.RE
.PP
kill <ID>
.RS 4
Remove a mapping from cache\&. Terminate
\fBsmbd\fR
if the id is currently in use\&.
.RE
.RE
.PP
num\-children
.RS 4
Query the number of smbd child processes\&. This message can only be sent to
\fBsmbd\fR\&.
.RE
.PP
reload\-certs
.RS 4
Instruct the LDAP server of a Samba AD DC to reload the TLS certificates protecting ldaps:// connections\&. This message can only be sent to
\fBldap_server\fR\&.
.RE
.SH "VERSION"
.PP
This man page is part of version 4\&.24\&.4 of the Samba suite\&.
.SH "SEE ALSO"
.PP
\fBnmbd\fR(8)
and
\fBsmbd\fR(8)\&.
.SH "AUTHOR"
.PP
The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
