Locking and password protecting your Mac whilst you are away

I recently found a small annoyance with my iMac in that I wanted to lock my Mac whilst I was away from it and/or not using it whilst keeping all my programs running in the background. This is of course great for keeping things like Mail downloading whilst your away, which keeps things running smoothly during the day.

Let’s start by pulling up the system preferences:
Apple menu - Apple - System preferences

We should have course have this:
System preferences

Select ‘Security’ from the Personal row, which is the sixth icon. You should now be in the ‘Security’ preference panel. Continue forth to make sure the checkboxes to the left of ‘Require password to wake this computer from sleep or screen saver’ and ‘Disable automatic login’ are checked. It should look a little something like this:

Hit the ‘view all’ button in the top left of the panel to go back to the system preferences panel and continue into the ‘Desktop & Screen Saver’ preferences panel which is also located on the Personal row of preferences, this time being the third icon in. Once it’s open click ‘Screen saver’ at the top to make sure your in the right area.

Screen Saver preferences

Click ‘Hot Corners’ in the bottom left, this will bring up a nice drop down sub-preferences panel. Continue forth to select a corner and select ‘Start Screen Saver’ (I’ve selected the bottom left for mine).

Hot Corner preferences

Once this is activated if you move your mouse into the furthest point of your selected corner the screen saver should start up. Wait a few seconds (sometimes up to ten or so) and then move your mouse to bring your Mac out of it’s screen saver mode. You should then see a password prompt for your username and password – this would mean it’s worked.

No-one can now get onto your computer unless they know your username and password to get into your account.

If you would like to expand upon this and remove the screen saver from the screen after a certain amount of minutes. Go back into your system preferences panel and select ‘Energy Saver’ which is on the Hardware row – the fourth icon.

Change your slider to whatever amount of minutes you want your display to turn off on. This will remove the screen saver from your display but keep your computer running.

Energy Saver off

Energy Saver on

Make sure ‘put computer to sleep when it is inactive for’ is set to ‘Never’ and ‘Put the hard disk(s) to sleep when possible’ is unchecked. This makes sure your computer won’t stop processing applications and activity in the background whilst you are away from the computer.

26 Responses

  1. Pingback on

  2. yadda

    For those who don’t like active corners: you can also enter the keychain utility (in applications > utilities) and set it to display an icon in the menu bar. From there you can manually lock your screen, thus going to screensaver mode. While not all that quick, it has the benefit of not being as annoying as active corners are :)

  3. Stacey

    Ummm.. yeah, this will work, but even easier… simply jump back to the login prompt. If you have the option turned on to show the fast user switch in the menubar, simply click the name, drop down to “Login…” and you are done…. processes continue as normal, and your machine is locked. That’s what I do all the time.

  4. Jamie Huskisson

    Well put, though this is for people who don’t have that enabled :)

  5. Martin Ström

    I’ve always used this kind of setup for my mac but when I realized one could just boot up into single user mode (hold ⌘S while starting up) to get root access. The solution is great to keep people from your stuff when your out for lunch etc but wont keep your data safe if your mac get stolen.

  6. Bluejade

    while nice little article, it doesn’t solve the problem of getting into your computer by just booting from Mac OS X DVD and reseting you password

  7. Donny

    This looks familiar:

    I saw this on Digg the other day.

  8. Jamie Huskisson

    Weird Donny.. never saw it.

    I write articles based off a list I add to whenever I have a new idea. This one has been on my list for a while ever since I figured it out :)

  9. Josh

    THAT method isn’t secure if, like in my office, there is an admin account on the computer that others know the password for. Try it yourself, put in the admin name and password. Unlike the way windows handles it (That logs the current user out) OS X simply unlocks the screen revealing what you were working on.

    The best method by far is to turn on fast user switching and to return to the login screen. (Even if some apps, such as TimBukTu, will close when you return there.

  10. doxa

    Bluejade, you can use “Open Firmware Password” found on the Mac OS X DVD to set a password for starting up from a DVD/CD.

    I personally like “Lock Screen” from Keychain menu item (like yadda suggested). Requires two clicks, but it prevents accidental lock by moving your mouse into a corner (pain if you have a long password).

    If you’re not a fan of screen saver and want to turn off display immediately, try BlackenedPixels (free). Screen savers are pointless (and waste of energy) if you’re using laptop or LCD monitor.

  11. Tim

    I use a Quicksilver trigger to launch the screen saver. This allows me to press a key sequence to “lock” my computer when I’m getting up and leaving my office. [ This doesn’t address the vulnerability Josh mentions ]

    ScreenSaver location:
    System > Library > Frameworks > ScreenSaver.framework > Versions > A > Resources > ScreenSaverEngine.app

    QS triggers:

  12. Pingback on

  13. Patrick Cheung

    I tried that once, the problem was that I often trigger the screen saver accidentally. I end up using LockTight which allows me to press some keys and lock the computer.

  14. John

    Use Disk Utility to create a new Blank Disk Image with encryption. Put your sensitive data in this disk image. Now even if someone manages to access the computer they can’t access your private data as they don’t know the password. It also makes it easy to back up this important information as it is all in one place.

  15. Dan

    Great tip, im definitely going to use it on my school mac :)

  16. Pingback on

    Locking & Password Protecting Your Mac

  17. Pingback on

    Technology Blog » Blog Archive » Locking & Password Protecting Your Mac

  18. John

    To add to the previous QuickSilver tip. I invoke QuickSilver and type FL for “Fast Logout” and it will trigger a Fast User Switching script. Note: Must have the Extra Scripts Plugin.

  19. JuanFE43

    Is just a easy and great way to protect your Mac. Thanks!!!

  20. Getoninter

    Hey thanks i keep learning new tricks for the mac all the time!

  21. newmacguy

    Great article. Very helpful. Thanks.

  22. janet

    Thank you for your excellent work- clear, informative.

  23. David

    Thanks – I kept looking for that setting that ended up being in ‘Security’. Control is not just in the energy saver section! Now I can avoid my programs closing if I leave my computer locked for a long time.

  24. Peter

    Great Article.

  25. Kasey

    I’m a new Mac user and found this to be very helpful. Thanks! Good work.

  26. Robert Oster

    Thank you thank you thank you!!

Comments are closed, but feel free to @jhuskisson on Twitter with your thoughts.