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.
Question
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)- A4% (1)
- B7% (2)
- D89% (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.
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.
The `-f` option specifies the configuration file, not a log file, and this command lacks the `-o` option for overwriting logs.
The `-f` option specifies the configuration file, not a log file directory, and this command lacks the `-o` option for overwriting logs.
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
Community Discussion
No community discussion yet for this question.