everyday mac tools

Require a password immediately after a Mac sleeps

· 5 min read

The setting is in System Settings, Lock Screen: “Require password after screen saver begins or display is turned off”. Set it to Immediately and the Mac asks for your password, Touch ID or Apple Watch the moment it wakes from sleep or the screen turns off. The default on many Macs is a delay of a few minutes, which is exactly the window in which a laptop left on a table is open to anyone who lifts the lid.

Change it

  1. Open System Settings from the Apple menu.
  2. Click Lock Screen in the sidebar.
  3. Find “Require password after screen saver begins or display is turned off”.
  4. Choose Immediately from the menu. The other options run from 5 seconds to 8 hours, plus Never.

That is the whole change. It applies from the next time the display goes off.

Two other lines on the same pane decide how soon that happens. “Turn display off on battery when inactive” and “Turn display off on power adapter when inactive” set how long the Mac waits before the screen sleeps. “Start Screen Saver when inactive” does the same for the screen saver, and the password rule counts from whichever comes first. A laptop set to turn its display off after two minutes and require a password immediately locks itself two minutes after you walk away, without any further thought from you.

Why the delay exists, and whether you want it

The delay is there for one reason: you step away for thirty seconds, the screen dims, and you would rather not type a password to pick up where you left off. On a desk at home with nobody else around, five minutes is a reasonable convenience.

Immediately is the right choice for a laptop that leaves the house, for any Mac in a shared office, and for anything with work data on it. Touch ID removes most of the cost: a fingertip on the sensor is faster than reading the lock screen. If you wear an Apple Watch, System Settings, Touch ID & Password (Login Password on some versions) has “Use Apple Watch to unlock your applications and your Mac”, which makes the immediate lock nearly free.

The honest middle ground is 5 seconds. It still locks before anyone could reach the machine, but it forgives the moment when you brush a hot corner or the display blinks off while you are reading.

Lock it on demand

The password-on-wake rule handles the case where you forget. For the case where you remember, macOS has three ways to lock right now, and each one requires a password regardless of the delay you chose above.

Control-Command-Q. The keyboard shortcut for Lock Screen, which is also in the Apple menu. This is the one to learn. Press it before you close the lid, before you stand up, before you hand the laptop to someone to look at a photo.

A hot corner. System Settings, Desktop & Dock, then Hot Corners at the bottom. Assign a corner to Lock Screen. Pushing the pointer into the corner locks the Mac. If you have ever triggered a corner by accident, Set up hot corners without triggering them by accident shows the modifier-key trick that makes this safe.

Touch ID key. On a keyboard with Touch ID, pressing and holding it locks the Mac on most models. Try it once so you know whether yours does.

Closing the lid also puts a laptop to sleep, which with Immediately set means it locks. The exception is a MacBook you have deliberately kept awake with the lid closed; Keep a MacBook awake with the lid closed explains why that setup does not lock on its own.

The Terminal version

Older guides suggest defaults write com.apple.screensaver askForPassword. On current macOS that key is not the one the system honors. The supported command is:

sysadminctl -screenLock immediate -password -

The trailing - makes it prompt for your account password rather than putting it in your shell history. sysadminctl -screenLock status shows the current setting, and sysadminctl -screenLock off -password - turns the requirement off again. There is no reason to prefer this over the System Settings pane on a single Mac; it exists for scripts that set up several machines.

Mainspring lists the same setting as a “password on sleep” power-up and bundles it into a Privacy and Security recipe with the related switches (personalized ads, Siri, lookup suggestions). It snapshots the old value before changing anything, so if the immediate lock turns out to be more than you wanted, it goes back in one click.

What this does not protect

The sleep password stops a casual person at the keyboard. It does not encrypt anything. Someone who removes the drive, or boots the Mac into recovery, is stopped only by FileVault, which is a separate switch in System Settings, Privacy & Security. Check that it says FileVault is turned on. On Apple silicon and T2 Macs the data is encrypted at rest either way, but FileVault is what ties that encryption to your password rather than to the hardware alone.

The other gap is the guest account and the login window. If Guest User is enabled in System Settings, Users & Groups, anyone can use the Mac as a guest after you lock it. They cannot see your files, but they can use the machine. Turn Guest off if that bothers you.

Questions

Why does my Mac still not ask for a password after the screen goes dark? Either the delay is set to something other than Immediately, or the Mac is being unlocked by your Apple Watch before you notice. Check System Settings, Lock Screen, then look at Touch ID & Password for the Watch setting. On a Mac managed by an employer, the value may be locked by a profile and shown greyed out.

Does Immediately drain the battery or slow anything? No. It changes what the Mac asks for on wake and nothing about how it sleeps.

Can I require a password only when on battery? No; the setting applies everywhere. The approximation is to keep it on Immediately and lean on Touch ID or the Watch at your desk.

Is a screen saver still necessary? Not for security. The display turning off does the same job with less power, and the password rule fires on either.