Whether you have a MacBook Air or a MacBook, it’s easy to carry your laptop around with you. However, many people forget to change their Mac’s settings when they move from their regular network to something more public. The settings that make sharing your files, music and photos at home or in the office so simple, also make it easy for strangers to stumble upon your data when you’re at, for example, a coffee shop.

Here’s what you need to do to make sure that your Mac isn’t unnecessarily vulnerable when you are out and about. All these tips work in Mac OS X Snow Leopard and Lion.

Turn off File Sharing

The first step to ensuring that you don’t share more than you intend is to open System Preferences, select Sharing and then turn File Sharing off.

If you forget to turn off iPhoto’s Sharing preference, you risk unintentionally broadcasting your photos on any WiFi network you join

You may, however, prefer to leave this option enabled so that you can, for example, share files with travelling companions. In this case, go to Sharing in System Preferences, select File Sharing, and change the permissions for Everyone to No Access. That way, only people who have your username and password, or for whom you’ve created separate accounts on your Mac, will be able to connect.

Turn off other sharing options

While you’re in Sharing, it’s a good time to ensure that no unnecessary sharing options are enabled, either. For example, if you don’t use Remote Login, Remote Management, Web Sharing, or Bluetooth Sharing, make sure that those checkboxes are unticked. It’s also important that you don’t ever allow password-free Screen Sharing.

Keep iPhoto to yourself

If you’re launching iPhoto to import images, you may want to verify that you’re not accidentally broadcasting these to anyone who cares to look. In iPhoto’s preferences (iPhoto > Preferences), click on the Sharing tab, and make sure that Share My Photos is unchecked.

Share iTunes selectively

As with iPhoto, if you’d rather not have your Mac serve as a remote jukebox for anyone on the same WiFi network as you, but you still want to rock out to iTunes yourself, you need to tweak its settings.

Simply, click on the Sharing tab in iTunes’ preferences, and then uncheck Share my library on my local network.

With both iTunes and iPhoto, instead of disabling sharing altogether you can choose to require a sharing password. We, however, recommend leaving sharing off as this is the safest approach.