id: os_password_hint_remove
title: Remove Password Hint From User Accounts
discussion: |
  User accounts _MUST_ not contain password hints.
references:
  nist:
    cce:
      macos_27:
        - CCE-XXXXX-X
      macos_26:
        - CCE-95250-7
      macos_15:
        - CCE-94248-2
      macos_14:
        - CCE-92844-0
    800-53r5:
      - IA-6
    800-171r3:
      - 03.05.11
  disa:
    cci:
      - CCI-000206
    srg:
      - SRG-OS-000079-GPOS-00047
    disa_stig:
      macos_26:
        - APPL-26-003014
      macos_15:
        - APPL-15-003014
      macos_14:
        - APPL-14-003014
    cmmc:
      - IA.L2-3.5.11
  bzk:
    bio:
      - 8.27
      - 8.27.01
  cis:
    benchmark:
      macos_26:
        - 2.12.1 (level 1)
      macos_15:
        - 2.12.1 (level 1)
      macos_14:
        - 2.11.1 (level 1)
    controls_v8:
      - 5.2
platforms:
  macOS:
    '27.0': {}
    '26.0':
      benchmarks:
        - name: cis_lvl1
        - name: cis_lvl2
        - name: disa_stig
          severity: medium
        - name: nlmapgov_plus
    '15.0':
      benchmarks:
        - name: cis_lvl1
        - name: cis_lvl2
        - name: disa_stig
          severity: medium
        - name: nlmapgov_plus
    enforcement_info:
      check:
        shell: |-
          HINT=$(/usr/bin/dscl . -list /Users hint | /usr/bin/awk '{ print $2 }')

          if [ -z "$HINT" ]; then
            echo "PASS"
          else
            echo "FAIL"
          fi
        result:
          string: PASS
      fix:
        shell: |-
          for u in $(/usr/bin/dscl . -list /Users UniqueID | /usr/bin/awk '$2 > 500 {print $1}'); do
            /usr/bin/dscl . -delete /Users/$u hint
          done
tags:
  - cisv8
  - cnssi-1253_low
  - cnssi-1253_high
  - cmmc_lvl2
  - cnssi-1253_moderate
