Skip to content

Disable Samba

An XCCDF Rule

Description

The smb service can be disabled with the following command:
$ sudo systemctl mask --now smb.service

Rationale

Running a Samba server provides a network-based avenue of attack, and should be disabled if not needed.

ID
xccdf_org.ssgproject.content_rule_service_smb_disabled
Severity
Low
References
Updated

Remediation Templates

A Puppet Snippet

include disable_smb
class disable_smb {
  service {'smb':
    enable => false,
    ensure => 'stopped',
  }
}

OS Build Blueprint

[customizations.services]
masked = ["smb"]

An Ansible Snippet

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - disable_strategy
  - low_complexity