nerdexam
LPI

300-300 · Question #106

In order to make Samba provide SMB services only on TCP port 445 instead of TCP port 139 through NetBIOS, which parameter is required in smb.conf?

The correct answer is A. smb ports = 445. smb ports = 445 is the correct smb.conf parameter because Samba explicitly reads this directive to bind SMB traffic to specific TCP ports - setting it to 445 tells Samba to use direct TCP hosting only, bypassing the legacy NetBIOS-over-TCP (port 139) transport entirely. The…

300.4 File Sharing

Question

In order to make Samba provide SMB services only on TCP port 445 instead of TCP port 139 through NetBIOS, which parameter is required in smb.conf?

Options

  • Asmb ports = 445
  • Bnetbios name service = No
  • Cdisable directhosting = No
  • Dsocket options = port:445
  • Edirect tcp = yes

How the community answered

(57 responses)
  • A
    89% (51)
  • C
    4% (2)
  • D
    5% (3)
  • E
    2% (1)

Explanation

smb ports = 445 is the correct smb.conf parameter because Samba explicitly reads this directive to bind SMB traffic to specific TCP ports - setting it to 445 tells Samba to use direct TCP hosting only, bypassing the legacy NetBIOS-over-TCP (port 139) transport entirely.

The distractors fail for these reasons: B (netbios name service = No) controls NetBIOS name resolution (nmbd), not which port smbd listens on. C (disable directhosting = No) is a Windows registry concept, not a valid smb.conf parameter. D (socket options) tunes low-level socket behavior (e.g., TCP_NODELAY) and cannot redirect the listening port. E (direct tcp = yes) is not a real Samba parameter.

Memory tip: Think "smb ports" as Samba's literal port list - whatever you put there is exactly what it binds to. If you want only 445, you say smb ports = 445; if you want both legacy and modern, you'd list smb ports = 139 445.

Topics

#Samba configuration#SMB ports#NetBIOS#Network services

Community Discussion

No community discussion yet for this question.

Full 300-300 Practice