Samba Daemons

The following sections provide information about the command-line parameters for smbd and nmbd.

smbd

The smbd program provides Samba’s file and printer services, using one TCP/IP stream and one daemon per client. It is controlled from the default configuration file, samba_dir/lib/smb.conf, and can be overridden by command-line options.

The configuration file is automatically reevaluated every minute. If it has changed, most new options are immediately effective. You can force Samba to reload the configuration file immediately if you send a SIGHUP to smbd. Reloading the configuration file, however, will not affect any clients that are already connected. To escape this “grandfather” configuration, a client would need to disconnect and reconnect or the server itself would have to be restarted, forcing all clients to reconnect.

Other signals

To shut down an smbd process, send it the termination signal SIGTERM (-15), which allows it to die gracefully, instead of a SIGKILL (-9). To increment the debug logging level of smbd at runtime, send the program a SIGUSR1 signal. To decrement it at runtime, send the program a SIGUSR2 signal.

Command-line options

-D

Runs the smbd program as a daemon. This is the recommended way to use smbd (it is also the default action). In addition, smbd can be run from inetd.

-d debug_level

Sets the debug (sometimes called logging) level. The level can range from to 10. Specifying the value on the command line overrides the value specified in the smb.conf ...

Get Samba Pocket Reference now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.