brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: profiles status -type enrollment shows whether a Mac is managed by an organisation

Mac
~/tips/tip-macos-profiles-status-enrollment

profiles status -type enrollment

Checks whether a Mac is enrolled in device management and lists its installed profiles.

Buying a secondhand Mac, or taking over an old work laptop? I’d want to know whether some company can still push settings to it. That’s what MDM enrollment does, and macOS has a built-in command to check it.

Run this:

profiles status -type enrollment

It shows the MDM enrollment status of the Mac, including whether it was enrolled through Apple’s automated device enrollment (the old DEP), and when the enrollment was approved by the user it adds “(User Approved)”. On a private Mac you want both answers to be no.

Then look at the configuration profiles. As root, with -all, list shows every profile installed on the system, not just the ones for your user:

sudo profiles list -all

Profiles can set things like a VPN, Wi-Fi, certificates or restrictions, so an unknown one on a used Mac is a reason to ask the seller questions. On a work Mac, of course, this is normal and you should leave the profiles in place.

Mind the rate limit if you dig deeper: profiles show -type enrollment asks Apple’s servers for the automated enrollment configuration, and that’s rate limited to 10 times every 23 hours. Since macOS 11 you can’t install configuration profiles with this tool any more; those go through System Settings.

Further reading: profiles man page

Going deeper: Guide: keep your Mac apps in a Brewfile, so a new MacBook is one command away

More Mac tips 4. Hold Shift and click Continue in Safe Mode 1. Shut down the Mac System Settings > Lock Screen > Show message when locked (on) Modifier key for scroll gesture: Control Allow in the Background (switches) All Mac tips (9) All topics

Link