Allow Only Approved USB Drives on a Mac
Apple’s Disk Management setting cannot allow a single drive. Here is how to identify a drive precisely and write an allow rule that matches only that one.
Block external storage by default, then allow the drive by vendor ID, product ID and serial number in a device-control agent. Get those three values from system_profiler SPUSBDataType. A drive with no serial number cannot be matched to one unit.
| Applies to | Macs with a device-control agent such as Defender or Santa |
|---|---|
| Time needed | About 20 minutes per drive |
| Difficulty | Hard |
| Needs | Admin rights and Terminal |
| Cost | Agent licence varies; Santa has no licence fee |
/1Allow Approved USB Drives: The Match-Three Rule
Apple’s Disk Management setting is all or nothing. An answer in Apple’s developer forums says it has no granularity: one value covers external storage and another covers network storage. Allowing one drive therefore needs a device-control agent that can match a specific device.
The Match-Three rule
- Vendor ID: who made the controller.
- Product ID: which model.
- Serial number: which individual drive.
Matching all three allows one drive. Matching only vendor and product ID allows every identical model, which is often too wide.
/2Find Vendor ID, Product ID and Serial Number
Plug the drive in, then ask the Mac to describe it. Two Terminal commands are enough.
system_profiler SPUSBDataTypeLook for the Vendor ID, Product ID and Serial Number lines under the drive’s entry. IDs appear as hexadecimal values such as 0x05ac. If your agent expects decimal, convert them first.
ioreg -p IOUSB -lUse the second command if the first output is crowded. Copy the three values exactly. Some cheap drives report no serial number or share one, and a rule built on a shared serial matches every unit that carries it.
A drive that reports no serial number cannot be matched down to one unit. Prefer a drive with a unique serial, or accept a vendor and product match and the wider exposure that comes with it.
/3Build the Allowlist Entry
Allowlist rule builder
Enter the three values from your Mac. The output is a sketch of a device entry; adapt it to your agent’s format.
{}Microsoft’s Defender device control uses rules shaped like this, and its audit enforcement sends an event whenever an allowed device is used. Check your own tool’s documentation for the real schema. The builder above only helps you keep the three values in one place.
/4Edge Cases Before You Roll Out an Allowlist
Blocking storage should leave keyboards and mice alone, as JumpCloud’s Mac policy notes, so an approved-drive rule does not need accessory exceptions. Do check each of these cases before rollout.
- Two identical drives
- Same vendor and product ID, different serial: only the listed one should mount.
- Read-only exceptions
- Some tools let an approved drive mount read-only, which suits drives that carry files in but should not take files out.
- Phones
- Microsoft’s Defender page says Android devices are restricted only in PTP mode, so a phone can slip past a storage rule in other modes.
For a drive that must leave the building, encrypt its files first. Folder Lock for Mac encrypts files on macOS 13 and later. On Windows PCs in the same office, USB Block keeps trusted drives on its own Authorized Devices tab, matching by serial number.
/5Questions About Allow Only Approved USB Drives on a Mac
Can I allow a single USB drive on a Mac?
Yes, with a device-control agent. Match the drive’s vendor ID, product ID and serial number, and block everything else by default. Apple’s Disk Management setting alone cannot allow one drive, because it has no per-drive granularity.
How do I find my USB drive’s serial number on Mac?
Run system_profiler SPUSBDataType in Terminal with the drive plugged in. Look under the drive’s entry for Serial Number. If the drive reports none, the output omits the line and you cannot match to a single unit.
What if two drives have the same serial number?
A rule that matches the serial will allow both. Some low-cost drives reuse one serial across a batch. Use a different drive for the exception, or add the device to the rule knowing the exposure is wider.
Will the approved drive work after a restart?
It should, because the rule applies at mount time. Test it anyway: restart, plug in the approved drive and an unapproved one, and confirm only the first mounts. Restart matters because some changes apply only afterwards.
Does an allowlist also stop phones and SD cards?
Not automatically. An SD card slot may be covered by a storage policy, and a phone depends on its USB mode. Microsoft’s documentation says Android phones are restricted only in PTP mode. Test each device type you care about.
Can Windows USB Block do the same on a Mac?
No. USB Block runs on Windows only and keeps approved drives on its Authorized Devices tab by serial number. On a Mac, use an agent such as Defender device control or Santa instead.