← Basic Checks

Basic · Check result

Lock the login keychain when your Mac sleeps

Configure the login keychain to lock when your Mac sleeps if you want macOS to require the keychain password again before an app can retrieve protected items from that keychain.

The login keychain is normally unlocked when you log in or enter its password. Locking it on sleep reduces the time that its stored credentials remain available during an unattended session.

How to fix it

  1. Open Keychain Access. You can find it with Spotlight.
  2. Select login in the Keychains list.
  3. Choose Edit > Change Settings for Keychain “login”.
  4. Select Lock when sleeping.
  5. Optionally select Lock after and choose an inactivity period appropriate for your work. A shorter period offers more protection but can cause more password prompts.
  6. Click Save.
Keychain Access login keychain settings with Lock after and Lock when sleeping selected

Security and usability limits

  • This setting applies to the selected login keychain. It does not lock the Mac screen and does not replace a password requirement after sleep.
  • Apps that need an item from the locked keychain may ask for the keychain password after the Mac wakes.
  • Locking the keychain cannot revoke a password or secret that an authorized app already retrieved.

Also configure the Mac to require authentication promptly after sleep; see Start the screen saver and lock an inactive Mac.

Apple source