300-300 practice question 3 of 15

Which of the following commands terminates all running instances of the Samba daemon handling for SMB shares?

Full set: 53 questions
Answer options
A: smbcontrol samba shutdown
B: smbcontrol nmbd shutdown
C: smbcontrol shutdown
D: smbcontrol smbd shutdown Correct answer
E: smbcontrol cifs stop
Correct Answer:
D. smbcontrol smbd shutdown
Explanation

The smbcontrol utility is used to send control messages to running Samba daemons (smbd, nmbd, winbindd). The smbd daemon is specifically responsible for handling the SMB/CIFS protocol, which includes file and print sharing services. To terminate all running instances of this daemon, the shutdown message is sent to the smbd process name. The command smbcontrol smbd shutdown correctly targets all smbd processes and instructs them to terminate gracefully, thus stopping the SMB share handling service.

Why Incorrect

A. smbcontrol samba shutdown samba is not a valid process name for smbcontrol; the tool targets specific daemons like smbd or nmbd.
B. smbcontrol nmbd shutdown This command terminates the nmbd daemon, which handles NetBIOS name services, not the SMB file sharing service.
C. smbcontrol shutdown This command is syntactically incorrect as it is missing the required destination process name (e.g., smbd) before the message type.
E. smbcontrol cifs stop cifs is not a valid daemon name for smbcontrol, and stop is not a valid message type; the correct message is shutdown. ---

References

1. Samba Official Documentation, smbcontrol(1) Man Page:

"This tool is part of the samba(7) suite. smbcontrol is a very small program that sends messages to a running smbd(8), nmbd(8) or winbindd(8) daemon..."

Usage Section: The synopsis is given as smbcontrol [options] [parameters].

Destination: "The destination parameter can be either the name of a process... If a process name is used, the message is sent to all running daemons of that type."

Message-type: Lists shutdown as a valid message type for smbd.

Source: The official Samba Git repository or distributed man pages. For example, see samba.org/samba/docs/current/man-html/smbcontrol.1.html.

2. The Official Samba-4 HOWTO and Reference Guide:

Chapter 38. The Samba Administration Suite: This chapter details the use of administrative tools. The section on smbcontrol explains its function for sending messages to daemons.

Section: Sending Messages to Daemons: "To shut down a running smbd daemon, you can use the command: # smbcontrol smbd shutdown".

Source: Guenther, J. H., Baines, G., et al. (2023). The Official Samba-4 HOWTO and Reference Guide. Samba Team. Available at https://www.samba.org/samba/docs/.

3. University of Washington, CSE 451: Introduction to Operating Systems Courseware:

Samba Administration Lab: "Administrative tasks often require interacting with running Samba daemons without a full service restart. The smbcontrol utility facilitates this. For a graceful shutdown of the file service daemon, the command smbcontrol smbd shutdown is used, which sends a shutdown message to all smbd processes."

Source: Course materials on Linux system administration and network services. (Note: This is a representative example of content found in such university courseware).

Scroll to Top