id: system_settings_guest_account_disable
title: Disable the Guest Account
discussion: |
  Guest access _MUST_ be disabled.

  Turning off guest access prevents anonymous users from accessing files.
references:
  nist:
    cce:
      macos_27:
        - CCE-XXXXX-X
      macos_26:
        - CCE-95374-5
      macos_15:
        - CCE-94367-0
      macos_14:
        - CCE-92964-6
    800-53r5:
      - AC-2
      - AC-2(9)
    800-171r3:
      - 03.01.01
  disa:
    cci:
      - CCI-001813
    srg:
      - SRG-OS-000364-GPOS-00151
      - SRG-OS-000480-GPOS-00228
    disa_stig:
      macos_26:
        - APPL-26-002063
      macos_15:
        - APPL-15-002063
      macos_14:
        - APPL-14-002063
    cmmc:
      - AC.L1-3.1.2
  bzk:
    bio:
      - 5.16.02
      - 5.16
  hhs:
    hicp:
      - 2.L.A
      - 3.L.B
      - 4.L.A
  cis:
    benchmark:
      macos_26:
        - 2.13.1 (level 1)
      macos_15:
        - 2.13.1 (level 1)
      macos_14:
        - 2.12.1 (level 1)
    controls_v8:
      - 5.2
      - 6.2
      - 6.8
platforms:
  macOS:
    '27.0': {}
    '26.0':
      benchmarks:
        - name: cis_lvl1
        - name: cis_lvl2
        - name: disa_stig
          severity: medium
        - name: nlmapgov_plus
        - name: nlmapgov_base
    '15.0':
      benchmarks:
        - name: cis_lvl1
        - name: cis_lvl2
        - name: disa_stig
          severity: medium
        - name: nlmapgov_plus
        - name: nlmapgov_base
    enforcement_info:
      check:
        shell: |-
          /usr/bin/osascript -l JavaScript << EOS
          function run() {
            let pref1 = ObjC.unwrap($.NSUserDefaults.alloc.initWithSuiteName('com.apple.MCX')\
          .objectForKey('DisableGuestAccount'))
            let pref2 = ObjC.unwrap($.NSUserDefaults.alloc.initWithSuiteName('com.apple.MCX')\
          .objectForKey('EnableGuestAccount'))
            if ( pref1 == true && pref2 == false ) {
              return("true")
            } else {
              return("false")
            }
          }
          EOS
        result:
          string: 'true'
    introduced: '-1'
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
  - hicp_lp
mobileconfig_info:
  - PayloadType: com.apple.MCX
    PayloadContent:
      - DisableGuestAccount: true
      - EnableGuestAccount: false
