Linux_FoundationLinux_Foundation
LFCS · Question #332
LFCS Question #332: Real Exam Question with Answer & Explanation
The correct answer is B: smb port = 445. To restrict Samba's listening ports to only SMB (445/tcp) and prevent NetBIOS over TCP/IP (139/tcp), the smb port parameter in smb.conf should be used.
Submitted by kwame.gh· Apr 18, 2026Service Configuration
Question
In order to restrict access to the SMB (445/tcp) port and stop the use of NetBIOS (139/tcp), what parameter is required in smb.conf in Samba 3?
Options
- Adisable netbios = Yes
- Bsmb port = 445
- Cdisable directhosting = No
- Dsocket options = port:445
Explanation
To restrict Samba's listening ports to only SMB (445/tcp) and prevent NetBIOS over TCP/IP (139/tcp), the smb port parameter in smb.conf should be used.
Common mistakes.
- A. The
disable netbiosparameter is not a standard or recognized configuration directive in Samba for controlling port usage. - C.
disable directhostingis not a valid Samba parameter for port control; 'direct hosting' refers to SMB over TCP, and this parameter would incorrectly suggest disabling it. - D. The
socket optionsparameter is used for setting low-level TCP socket options, not for specifying the listening port, andport:445is not a valid syntax for this parameter.
Concept tested. Samba port configuration and NetBIOS disablement
Reference. https://www.samba.org/samba/docs/current/manpages/smb.conf.5.html
Topics
#Samba#smb.conf#Network Ports#Service Configuration
Community Discussion
No community discussion yet for this question.