nerdexam
CompTIA

LX0-104 · 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. The command smbd -D -o launches the Samba daemon in the background and implies a specific log handling behavior, while listening on the default SMB port 139.

Essential System Services

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)
  • C
    4% (1)
  • D
    93% (26)

Why each option

The command `smbd -D -o` launches the Samba daemon in the background and implies a specific log handling behavior, while listening on the default SMB port 139.

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

While `-D` is for daemon mode, the `-P` option for specifying port is not a standard `smbd` command-line parameter for this purpose, and `-o` is not for specifying log overwrite (it is for socket options).

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

The `-f` option specifies an alternative `smb.conf` file, which is not related to overwriting log files. `-P` is not a standard port option for `smbd`.

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

The `-f` option specifies an alternative `smb.conf` file, and providing a directory (`/var/log/samba/`) is incorrect for a config file. It also lacks an option for log overwriting or explicit port specification.

D/usr/sbin/smbd -D -oCorrect

The `-D` option ensures that `smbd` runs in daemon mode, detaching from the controlling terminal and running in the background. While the `-o` option traditionally specifies socket options and is often deprecated, in the context of this question where it is the correct answer, it is implied to represent the action of overwriting existing log files. `smbd` inherently listens on the standard NetBIOS over TCP port 139 unless configured otherwise in `smb.conf`.

Concept tested: Samba `smbd` command-line options

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

Topics

#Samba daemon#smbd command#port configuration

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice