Apple users scrambled this week to react to a major security flaw in the latest version of macOS, called High Sierra. Apple has now released a patch to fix the problem, but the incident serves as a reminder that basic measures such as using a screen lock are important for protecting consumers’ laptops.

It’s particularly urgent if you use your laptop in public places such as coffee shops and libraries. If you’re traveling this holiday season, the odds go up that someone else could access your laptop. The following precautions for enhancing laptop security apply whether you use a Mac or Windows machine.

The Apple flaw was startling: It allowed anyone to log in to a Mac running High Sierra as long as he or she had physical access to the computer. No hacking skills were necessary. All you needed to do was type in the user name “root” and leave the password field blank. Hit Enter a few times, and you were in.

That meant that anyone who lost a computer, or simply left it unattended, was vulnerable.

“If you ever left your computer for 5 or 10 minutes, someone could get access to your most intimate files, tax returns, whatever regular people keep on their computer,” says Matt Mitchell, a trainer at Global Journalist Security, an organization dedicated to teaching journalists, nonprofits, and corporations about digital security. “Photos of your kids—things that people would feel creeped out about.” 

The risk may have been most acute for Mac users who leave themselves logged in to email and social media accounts. For them, a lost computer could easily lead to full-on identity theft.

Here are simple steps to take to safeguard your security, whether you own one of the affected computers or not.

First, Download the Mac Patch

If you own a computer running macOS High Sierra, the first thing you should do is download the patch Apple has issued. It’s really easy: The directions boil down to launching the Mac App Store app on your computer and selecting Updates.

Here’s some more detail on the problem it fixes: A single laptop can have multiple users with separate accounts. And in addition to whatever accounts you set up on a Mac, there’s also an account, normally hidden, called the “root” account. 

That account is a “superuser” and has free rein to do things like install or uninstall software, change privacy settings, and see all other users’ files at the same time. The security flaw allowed anyone to log in as the root user without knowing a password. Install the update and that will no longer be true.

Next, whether you were affected by this security flaw or not, also take the following steps to keep would-be hackers from improperly accessing your computer. 

Turn On the Screen Lock

The shocking thing about the High Sierra security flaw is that it lets anyone use your laptop without entering a password. But if you don’t enable the screen lock on your computer, or you create a poor password, you’re essentially doing the same thing.

Any laptop that leaves your home should have the screen lock enabled. Otherwise, a lost or unattended computer has no protection at all—and neither does the data accessible through it.

Let the Computer Fall Asleep—Fast

Just as your smartphone’s display can turn off after a short period if you’re not using it, the same is true of your computer. 

You should let it do so. That’s good for saving energy, of course, but it’s even more important for security.

In the System Preferences app of macOS, you can configure your Mac’s display to fall asleep after a certain amount of time. If you have a Windows laptop, you can do the same thing using the Sign-in settings under the Accounts section.

If you plan on using your laptop in public for any length of time, it’s wise to set the machine to go to sleep fairly quickly—say, in less than 5 minutes.

And, as described above, make sure a password is required to log in after the computer wakes up.

Enable Disk Encryption

Both macOS and Windows 10 offer on-disk encryption that make the files you’ve stored on your computer completely inaccessible unless you know the password.

How is this different from just setting a password? Do that and a criminal could find ways to access your data—for instance, by removing your laptop’s hard drive and popping it into another computer. Once you encrypt your files, they’re unreadable.

On macOS the feature is called FileVault. On Windows 10 it’s called BitLocker, but BitLocker is available only on Windows 10 Pro and not Windows 10 Home (upgrading to Pro from Home costs $100).

Third-party disk-encryption utilities are also available for users of Windows 10 Home.

“An encrypted laptop is the key to real physical security,” Mitchell says, “and would mitigate [the macOS flaw] plus 100 other things that people can do to get into your machine.”

These encryption technologies won’t help if your computer is already running—they decrypt files on initial startup. But that’s okay as long as you’ve set your machine to go to sleep after a few minutes of inactivity.