id: system_settings_guest_access_smb_disable
title: Disable Guest Access to Shared SMB Folders
discussion: |
  Guest access to shared Server Message Block (SMB) folders _MUST_ be disabled.

  Turning off guest access prevents anonymous users from accessing files shared via SMB.
references:
  nist:
    cce:
      macos_27:
        - CCE-XXXXX-X
      macos_26:
        - CCE-95373-7
      macos_15:
        - CCE-94366-2
      macos_14:
        - CCE-92963-8
    800-53r5:
      - AC-2(9)
      - AC-2
    800-171r3:
      - 03.01.01
  disa:
    cmmc:
      - AC.L1-3.1.2
  cis:
    benchmark:
      macos_26:
        - 2.13.2 (level 1)
      macos_15:
        - 2.13.2 (level 1)
      macos_14:
        - 2.12.2 (level 1)
    controls_v8:
      - 3.3
platforms:
  macOS:
    '27.0': {}
    '26.0':
      benchmarks:
        - name: cis_lvl1
        - name: cis_lvl2
    '15.0':
      benchmarks:
        - name: cis_lvl1
        - name: cis_lvl2
      enforcement_info:
        check:
          shell: /usr/bin/defaults read /Library/Preferences/SystemConfiguration/com.apple.smb.server AllowGuestAccess
          result:
            integer: 0
    enforcement_info:
      check:
        shell: /usr/sbin/sysadminctl -smbGuestAccess status 2>&1 | /usr/bin/grep -c "SMB guest access disabled"
        result:
          integer: 1
      fix:
        shell: /usr/sbin/sysadminctl -smbGuestAccess off
tags:
  - 800-53r5_low
  - 800-53r5_moderate
  - 800-53r5_high
  - 800-171
  - cisv8
  - cnssi-1253_low
  - cnssi-1253_high
  - cmmc_lvl2
  - cmmc_lvl1
  - cnssi-1253_moderate
