2.1.6 Ensure samba file server services are not in use

Information

The Samba daemon allows system administrators to configure their Linux systems to share file systems and directories with Windows desktops. Samba will advertise the file systems and directories via the Server Message Block (SMB) protocol. Windows desktop users will be able to mount these directories and file systems as letter drives on their systems.

If there is no need to mount directories and file systems to Windows systems, then this package can be removed to reduce the potential attack surface.

Solution

Run the following command to stop smb.service and remove samba package:

# systemctl stop smb.service
# dnf remove samba

- OR -

- IF - the samba package is required as a dependency:

Run the following commands to stop and mask the smb.service :

# systemctl stop smb.service
# systemctl mask smb.service

Impact:

There may be packages that are dependent on the samba package. If the samba package is removed, these dependent packages will be removed as well. Before removing the samba package, review any dependent packages to determine if they are required on the system.

- IF - a dependent package is required: stop and mask the smb.service leaving the samba package installed.

See Also

https://workbench.cisecurity.org/benchmarks/18211

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6, 800-53|CM-7, CSCv7|9.2

Plugin: Unix

Control ID: 9b78de2451b9458fb879ff7a68028c5c5843a72a60c381fbdf5e34b187af45ff