id: system_settings_loginwindow_prompt_username_password_enforce
title: Configure Login Window to Prompt for Username and Password
discussion: |
  The login window _MUST_ be configured to prompt all users for both a username and a password.

  By default, the system displays a list of known users on the login window, which can make it easier for a malicious user to gain access to someone else's account. Requiring users to type in both their username and password mitigates the risk of unauthorized users gaining access to the information system.
check: |
  /usr/bin/osascript -l JavaScript << EOS
  $.NSUserDefaults.alloc.initWithSuiteName('com.apple.loginwindow')\
  .objectForKey('SHOWFULLNAME').js
  EOS
result:
  string: 'true'
fix: |
  This is implemented by a Configuration Profile.
references:
  cce:
    - CCE-95387-7
  cci:
    - CCI-000764
  800-53r5:
    - IA-2
  800-53r4:
    - IA-2
  srg:
    - SRG-OS-000104-GPOS-00051
  disa_stig:
    - APPL-26-005052
  800-171r3:
    - 03.05.01
  cis:
    benchmark:
      - 2.11.4 (level 1)
    controls v8:
      - 4.1
  cmmc:
    - IA.L1-3.5.1
    - IA.L1-3.5.2
macOS:
  - '26.0'
tags:
  - 800-53r5_low
  - 800-53r5_moderate
  - 800-53r5_high
  - 800-53r4_low
  - 800-53r4_moderate
  - 800-53r4_high
  - 800-171
  - cis_lvl1
  - cis_lvl2
  - cisv8
  - cnssi-1253_low
  - cnssi-1253_high
  - cmmc_lvl2
  - cmmc_lvl1
  - stig
  - cnssi-1253_moderate
severity: medium
mobileconfig: true
mobileconfig_info:
  com.apple.loginwindow:
    SHOWFULLNAME: true
