nerdexam
Linux_Foundation

LFCS · Question #307

Which command will launch smbd in daemon mode, overwriting existing log files, and listen on port 139?

The correct answer is D. /usr/sbin/smbd -D -o. To launch smbd in daemon mode and ensure existing log files are overwritten, the smbd command should be executed with the -D and -o options.

Submitted by lucia.co· Apr 18, 2026Operation of Running Systems

Question

Which command will launch smbd in daemon mode, overwriting existing log files, and listen on port 139?

Options

  • A/usr/sbin/smbd -D -o -P 139
  • B/usr/sbin/smbd -D -f /var/log/samba/smbd.log -P 139
  • C/usr/sbin/smbd -D -f /var/log/samba/
  • D/usr/sbin/smbd -D -o

How the community answered

(28 responses)
  • A
    4% (1)
  • B
    7% (2)
  • D
    89% (25)

Why each option

To launch `smbd` in daemon mode and ensure existing log files are overwritten, the `smbd` command should be executed with the `-D` and `-o` options.

A/usr/sbin/smbd -D -o -P 139

The `-P` option is not a standard `smbd` command-line option for specifying the listening port, and it lacks the `-o` option for overwriting logs.

B/usr/sbin/smbd -D -f /var/log/samba/smbd.log -P 139

The `-f` option specifies the configuration file, not a log file, and this command lacks the `-o` option for overwriting logs.

C/usr/sbin/smbd -D -f /var/log/samba/

The `-f` option specifies the configuration file, not a log file directory, and this command lacks the `-o` option for overwriting logs.

D/usr/sbin/smbd -D -oCorrect

The `-D` option instructs the `smbd` daemon to run in the background, making it suitable for continuous operation. The `-o` option ensures that new log entries will overwrite previous ones, providing a clean log file for debugging or auditing purposes.

Concept tested: Samba smbd command-line options

Source: https://www.samba.org/samba/docs/current/manpages/smbd.8.html

Topics

#Samba#Daemon Management#Command-line Options#Network Services

Community Discussion

No community discussion yet for this question.

Full LFCS Practice