skip to content

On a managed Mac fleet, what is a configuration profile, and what can an MDM enforce through one that a shell script running as root on the same machine cannot?

level: seniorimportance: should knowfreq 46%

answer

  1. signed plist of typed payloads
  2. policy, not a suggestion
  3. managed values outrank local writes
  4. how it arrives decides what it may do
  5. supervision unlocks the privacy payloads

basics

~20 s

A configuration profile is a signed property-list document of typed payloads that macOS installs as managed policy. Since macOS 11 profiles cannot be installed from the command line — only by user approval or by an MDM — and some settings, notably privacy approvals and extension allowlists, are only honoured from a supervised, MDM-managed Mac.

solid answer

~50 s

A configuration profile is an XML property list — a `.mobileconfig` — containing typed **payloads**: Wi-Fi, certificates, restrictions, managed preferences for a given domain, and so on. macOS treats installed payloads as **policy**, not as suggestions: managed preferences land under `/Library/Managed Preferences/` and outrank anything a user or a script writes into the same domain, which is why enforcement belongs in a profile rather than in a login script running `defaults write`. The delivery channel is the real distinction. Since macOS 11, profiles can no longer be installed from the command line; a profile must either be approved manually by the user in System Settings or be pushed by an MDM. Certain payloads go further and are honoured only when the Mac is supervised and MDM-enrolled — privacy (PPPC) approvals and kernel/system-extension allowlists among them. `profiles list` and `profiles status -type enrollment` inspect the current state.

code

bash · 11 lines
bash
# Is this Mac enrolled, user-approved and supervised via automated enrollment?
profiles status -type enrollment

# What device-level profiles are installed (needs root for device scope)
sudo profiles list

# Detail of what a profile carries
sudo profiles show

# Which preference domains are being managed by a profile
ls /Library/Managed\ Preferences/

go deeper

for a junior

Know that a configuration profile is a file macOS installs as settings policy, that it is normally delivered by the company's device-management system, and that you can list installed ones with the profiles command.

for a middle

Explain the payload structure and that profile-delivered managed preferences take precedence over anything written locally, so a defaults write against a managed key appears to succeed and does nothing.

for a senior

Demonstrate the delivery rules: no command-line installation since macOS 11, user approval or MDM only, and a tier of payloads — privacy approvals, extension allowlists, update deferral — honoured only on supervised, enrolled devices.

for a principal

Own the split between policy and action: what belongs in profiles versus the management agent, how supervision and enrollment are established at procurement, and how profile removal gives you a reversible, auditable policy surface.

## What a profile actually is A configuration profile is a property list, conventionally with a `.mobileconfig` extension, containing an ordered array of **payloads**. Each payload has a type identifier (`PayloadType`), a unique identifier, and the settings it carries. The document as a whole has an identifier and a UUID, and it is normally **signed** so macOS can display the issuing organisation and refuse a tampered copy. Payloads span most of what "managing a Mac" means: network configuration (Wi-Fi, VPN, proxies), trusted certificates, restrictions, login-window behaviour, FileVault settings including escrow of the recovery key, software-update policy, and — the general-purpose escape hatch — **managed preferences**, which set arbitrary keys in an arbitrary preference domain. ## Managed preferences beat local writes When a profile carries a managed-preference payload, macOS materialises those values under `/Library/Managed Preferences/`, and the preferences search order consults them ahead of the user and machine domains. The practical consequence is the one that separates a scripted Mac from a managed one: a user can run `defaults write` for the same key, get no error, and change nothing. Configuration set by script is advisory and drifts the moment somebody changes it back; configuration set by profile is enforced continuously and is removed only when the profile is removed. This is why the mature answer to "how do we make sure every laptop has setting X" is a profile, not a script in the login flow. ## The delivery change that catches people out Historically an admin could install a profile from a script. **Since macOS 11, command-line installation of configuration profiles was removed.** Today there are two routes: 1. **Manual** — the user opens the `.mobileconfig`, and macOS routes it to System Settings where it must be explicitly reviewed and approved. Nothing installs silently. 2. **MDM** — the device is enrolled with a management server, which pushes profiles over the MDM protocol without user interaction. So an automation plan that assumes "we will just drop the profile with a script" is out of date, and saying so is a strong signal in an interview. The `profiles` command still exists for inspection and enrollment operations: ```bash profiles list # installed profiles (root for device profiles) profiles show -type enrollment # enrollment configuration profiles status -type enrollment # enrolled? user-approved? DEP? profiles renew -type enrollment # re-request the enrollment profile ``` ## What only a supervised, MDM-managed Mac can do A second tier of payloads is not merely inconvenient to install by hand — it is **ignored** unless the Mac is supervised (typically through Automated Device Enrollment) and enrolled in MDM. The important members: - **Privacy preferences policy control (PPPC)** — pre-approving an application's access to protected resources such as full disk access or the ability to control other applications. This is the only supported way to grant those approvals without a human clicking a consent dialog on every machine. - **Kernel and system extension allowlists** — permitting a specific vendor's extension to load without the user approving it in settings. - **Enforced software-update policy and deferral** — restricting or delaying updates through the restrictions domain `com.apple.applicationaccess`, up to a documented maximum deferral window. - **FileVault recovery-key escrow** — capturing the key centrally, which is what makes full-disk encryption operable at fleet scale rather than a support disaster. The common thread is that each of these is a security decision macOS will otherwise only accept from a human sitting at the machine. Supervision is the assertion that the organisation owns the device, and it is what converts "the user must consent" into "the owner has decided". ## Where profiles stop Profiles configure; they do not run code. Installing software, running remediation, collecting inventory and executing one-off commands are the *other* half of fleet management, handled by the MDM's own commands and by an agent. A good answer draws that line: policy in profiles, actions in the management agent or MDM commands, and never a login script trying to do the policy's job. Removal matters too. A profile installed by MDM is generally removable only by the MDM (locked profiles cannot be removed by the user), and removing a profile reverts its managed preferences — the underlying user values reappear rather than the managed ones persisting. That reversibility is a feature: it makes policy auditable and undoable in a way that scattered `defaults write` calls never are. ## What the interviewer wants Name the artifact (signed plist of typed payloads), state the enforcement property (managed preferences outrank local writes), get the delivery constraint right (no command-line installation since macOS 11 — user approval or MDM), and give at least one capability that requires supervision. That combination shows you have managed real Macs rather than read a payload reference.

  • Why can't you just script the settings you need with defaults write at login instead of using profiles?
    Because a user-domain write is advisory. It is not enforced, it drifts as soon as anyone changes the value back, it leaves no auditable record of what policy applies, and it cannot express the payloads macOS only accepts from management — privacy approvals, extension allowlists, update deferral, FileVault escrow. A profile's managed preferences also outrank exactly the domain your script writes to, so where both exist the profile wins anyway.
  • A vendor's security agent needs full disk access on 500 Macs. How do you deliver that?
    With a privacy preferences policy control payload in a profile pushed by MDM to supervised devices, identifying the application by bundle identifier and code requirement. That is the only supported way to pre-approve it; without supervision the payload is ignored and every user gets a consent prompt instead. Deploying the agent binary itself is a separate action through the management agent, not something the profile does.
  • What happens to settings when a configuration profile is removed?
    The managed values disappear from the managed-preferences layer and the underlying user or machine domain values take effect again. Nothing is left burned in, which is what makes profiles auditable and reversible. Note that a profile installed by MDM is typically not user-removable — removal goes through the management server — which is deliberate for security payloads.

saying these in an interview costs you the question

  • Believing a profile can still be installed from a shell script
  • Treating a login script running defaults write as equivalent enforcement
  • Assuming any locally installed profile grants privacy approvals
  • Confusing enrollment with supervision
  • Expecting profile settings to persist after the profile is removed

context