2.1.14 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 service should be deleted to reduce the potential attack surface.

Solution

Run the following commands to stop smbd.service and remove samba package:

# systemctl stop smbd.service
# apt purge samba

- OR -

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

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

# systemctl stop smbd.service
# systemctl mask smbd.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 smbd.service leaving the samba package installed.

See Also

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

Item Details

Category: CONFIGURATION MANAGEMENT

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

Plugin: Unix

Control ID: ea033db5ba822de29ea30334f51c12eb0c2b3afb15b3f41a0d263a25a32d2872