SMBCONTROL(1)

πŸ’… smbcontrol(1) β€” like, the user commands era πŸŽ€

okay bestie, grab your iced coffee because we're diving into smbcontrol(1) from the User Commands section and honestly? it's a little icon. it's a tiny little messenger for your Samba daemons, and once you get it you'll be sending messages like it's a group chat. ✨


🌸 NAME 🌸

smbcontrol β€” send messages to smbd, nmbd or winbindd processes πŸ’Œ


πŸ¦‹ SYNOPSIS πŸ¦‹

smbcontrol [-?|--help] [--usage] [-t|--timeout]
 [-d|--debuglevel=DEBUGLEVEL] [--debug-stdout] [--configfile=CONFIGFILE]
 [--option=name=value] [-l|--log-basename=LOGFILEBASE] [--leak-report]
 [--leak-report-full]

smbcontrol [destination] [message-type] [parameter]

like yes, two whole forms, she contains multitudes πŸ’…


πŸ’– DESCRIPTION πŸ’–

so this tool is part of the samba(7) suite, periodt.

smbcontrol is, and I quote the energy here, a very small program β€” and what it does is send messages to a smbd(8), a nmbd(8), or a winbindd(8) daemon that's running on the system. that's it. that's the whole gig. tiny queen, big job. πŸ‘‘


✨ OPTIONS ✨

  • -t|--timeout β€” set the timeout to seconds. literally just that.
  • destination β€” one of nmbd, smbd, winbindd or a process ID. details below because she has layers:
    • the all destination makes the message "broadcast" to all running daemons, including nmbd and winbind. heads up: this is a change for Samba 3.3 β€” before that, the parameter smbd used to do this. so if you're time-traveling, adjust accordingly πŸ•°οΈ
    • the smbd destination sends the message to the smbd daemon specified in the smbd.pid file.
    • the nmbd destination sends the message to the nmbd daemon specified in the nmbd.pid file.
    • the winbindd destination sends the message to the winbind daemon specified in the winbindd.pid file.
    • if you give a single process ID, the message goes to only that process. exclusive. we love a one-on-one. 🫢
  • message-type β€” the type of message to send. see the MESSAGE-TYPES section for the whole menu, iykyk.
  • parameters β€” any parameters required for the message-type. depends on the vibe of the message, bestie.
  • -?|--help β€” print a summary of command line options. your lil cheat sheet πŸ’œ
  • --usage β€” display a brief usage message. even briefer.
  • -d|--debuglevel=level β€” level is an integer from 0 to 10. the default value if you don't specify this parameter is 1 for client applications.
    • the higher the value, the more detail gets logged to the log files about what the server's up to.
    • at level 0, only critical errors and serious warnings get logged.
    • level 1 is a reasonable level for day-to-day running β€” it generates a small amount of information about operations carried out.
    • levels above 1 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 😭 like genuinely unreadable, don't do this to yourself.
    • note that specifying this parameter here will override the log level parameter in the /etc/samba/smb.conf file. so this one wins, no cap.
  • --debug-stdout β€” redirects debug output to STDOUT. by default all clients are logging to STDERR. simple as that ✨
  • --configfile=<configuration file> β€” the file specified contains the configuration details required by the client. the info in this file can be general for client and server, or only provide client specific stuff like options such as client smb encrypt. see /etc/samba/smb.conf for more information. the default configuration file name is determined at compile time. πŸ› οΈ
  • --option=<name>=<value> β€” set the smb.conf(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 the whole --option=name=value into quotes. πŸŽ€
  • -l|--log-basename=logdirectory β€” base directory name for log/debug files. the extension ".progname" will be appended (e.g. log.smbclient, log.smbd, etc...). the log file is never removed by the client. she persists πŸ’€
  • --leak-report β€” enable talloc leak reporting on exit.
  • --leak-report-full β€” enable full talloc leak reporting on exit. the deluxe version.
  • -V|--version β€” prints the program version number. slay.

πŸ‘‘ MESSAGE-TYPES πŸ‘‘

available message types are, in order, bestie:

  • close-share β€” order smbd to close the client connections to the named share. note that this doesn't 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 smbd. βœ‚οΈ
  • close-denied-share β€” behaves like close-share, but doesn't 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 smbd. polite and effective 🫢
  • debug β€” 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. it spreads, fr fr πŸ“£
  • kill-client-ip β€” 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 smbd. bye felicia πŸ‘‹
  • force-election β€” this message causes the nmbd daemon to force a new browse master election. democracy time πŸ—³οΈ
  • ping β€” send the specified number of "ping" messages and wait for the same number of reply "pong" messages. this can be sent to any of the destinations. adorable honestly πŸ“
  • profile β€” 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. πŸ“Š
  • debuglevel β€” request the debuglevel of a certain daemon and write it to stdout. this can be sent to any of the destinations.
  • profilelevel β€” request the profilelevel of a certain daemon and write it to stdout. this can be sent to any smbd or nmbd destinations.
  • printnotify β€” order smbd to send a printer notify message to any Windows NT clients connected to a printer. this message-type takes the following arguments:
    • queuepause printername β€” send a queue pause change notify message to the printer specified.
    • queueresume printername β€” send a queue resume change notify message for the printer specified.
    • jobpause printername unixjobid β€” send a job pause change notify message for the printer and unix jobid specified.
    • jobresume printername unixjobid β€” send a job resume change notify message for the printer and unix jobid specified.
    • jobdelete printername unixjobid β€” send a job delete change notify message for the printer and unix jobid specified.
note that this message only sends notification that an event has occurred. it doesn't actually cause the event to happen. it's a notifier, not a doer β€” important distinction bestie 😭

this message can only be sent to smbd. πŸ–¨οΈ

  • dmalloc-mark β€” set a mark for dmalloc. can be sent to both smbd and nmbd. only available if samba is built with dmalloc support.
  • dmalloc-log-changed β€” 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.
  • shutdown β€” shut down the specified daemon. can be sent to both smbd and nmbd. dramatic but valid πŸ’€
  • pool-usage β€” print a human-readable description of all talloc(pool) memory usage by the specified daemon/process. available for both smbd and nmbd.
  • ringbuf-log β€” fetch and print the ringbuf log. requires logging = ringbuf. available for smbd, winbindd and nmbd. 🧚
  • drvupgrade β€” force clients of printers using the specified driver to update their local version of the driver. can only be sent to smbd.
  • reload-config β€” force daemon to reload smb.conf configuration file. can be sent to smbd, nmbd, or winbindd. refresh era 🌈
  • reload-printers β€” force smbd to reload printers. can only be sent to smbd.
  • idmap β€” notify about changes of id mapping. can be sent to smbd or (not implemented yet) winbindd. the sub-commands:
    • flush [uid|gid] β€” flush caches for sid <-> gid and/or sid <-> uid mapping.
    • delete <ID> β€” 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".
    • kill <ID> β€” remove a mapping from cache. terminate smbd if the id is currently in use. ⚠️ yeah that one's spicy, be careful.
  • num-children β€” query the number of smbd child processes. this message can only be sent to smbd. headcount time πŸ‘―
  • reload-certs β€” instruct the LDAP server of a Samba AD DC to reload the TLS certificates protecting ldaps:// connections. this message can only be sent to ldap_server. πŸ”

⭐ VERSION ⭐

this man page is part of version 4.23.8 of the Samba suite. πŸ’–


πŸ¦‹ SEE ALSO πŸ¦‹

nmbd(8) and smbd(8). go read those too, bestie, they're connected lore.


🌸 AUTHOR 🌸

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. πŸ‘‘


and that's the whole page, no skips, no summaries, every flag accounted for. you're welcome πŸ’…

kisses and see you in the next man page β€” this one's brought to you by Samba 4.23.8, dated 05/28/2026, and that's on periodt. πŸŽ€βœ¨πŸ«Ά

πŸ“¦ where this page comes from