How to make iMac lock itself if left for 2 minutes?

So users need to insert password to login to my iMac


Solution 1:

If you follow the below 2 steps, you can set your machine to require a password after 2 minutes of inactivity.

  1. Within the Desktop & Screen Saver System Preference, set the screen saver to come on after 2 minutes of inactivity.

  2. Within the Security & Privacy System Preference, set the option to require a password immediately after sleep or screen saver begins.

Solution 2:

There are a different approaches depending on if you want to log out or not:

Log out - Set your Mac to log out when not in use

Mac OS X includes the ability to automatically log out after inactivity. This will return an inactive Mac to the login window.

  1. Choose Apple menu > System Preferences, click Security & Privacy, and then click General.
  2. Click the lock icon to unlock it, and then type an administrator name and password.
  3. Click Advanced.
  4. Select “Log out after ... minutes of inactivity.”
  5. Set the amount of inactivity time before the system automatically logs out.

Lock only - Require a password when waking

If you do not wish to log out but only secure your inactive Mac, enable the screen saver password.

  1. Within System Preferences.app > Desktop & Screen Saver set up a screen saver to start after some period of inactivity.
  2. Within System Preferences.app > Security & Privacy enable the Require password after sleep or screen saver begins.

Security & Privacy

Fast User Switch - Switch to Login Window

Alternatively you can use third party software to schedule your Mac to Fast User Switch to the login window after inactivity. This leaves your account logged in and applications running but allows others to use the computer.

Solution 3:

System Preferences>Energy Saver>Computer Sleep set to 2 minutes.

Next go to Security in System Preferences and check Require Password Immediately after sleep