Skip to main content

Apple User Authorization Policy

Overview

The Apple User Authorization Policy controls user accounts and administrator access on managed Apple devices:

  • Passcode and password changes: whether users can add, change, or remove the device passcode on iPhone and iPad, or change their password on a Mac.

  • Local user creation: whether users can create new user accounts in System Settings on a Mac.

  • sudo password prompts: on Macs, how often sudo asks for an administrator's password in Terminal, and whether each Terminal window or tab must enter it separately.

  • System Settings passwords: on Macs, whether each system-wide pane in System Settings asks for an administrator's password separately.

Important: On iPhone and iPad, turning off passcode modification also stops users from adding a passcode. Apple's restriction prevents adding, changing, or removing the passcode. If a device has no passcode when the policy applies, the user can't set one until you turn the setting back on. Make sure devices already have a passcode, or apply the Apple Password Policy first.


Supported platforms and requirements

Item

Details

Platforms

macOS, iOS, iPadOS

Minimum OS

macOS 10.13, iOS 9.0, iPadOS 9.0 (Allow Local User Creation requires macOS 14; the sudo settings require macOS 12)

Swif agent

The sudo settings, and Require Administrator Password for System-Wide Settings, need the Swif agent on the Mac. The sudo settings need agent 1.361.0 or later. Older agents ignore them.

Device ownership

Company-owned devices; BYOD Macs

Supervision

Required on iPhone and iPad. Not required on Mac.

Shared iPad

Not supported. Shared iPad ignores these settings.

Apple User Enrollment

Not supported. Apple doesn't allow these restrictions on User Enrollment. On Macs enrolled as BYOD through SSO (account-driven User Enrollment), the profile may fail if the sudo settings are on.

BYOD Macs. This policy works on Macs enrolled as BYOD with the Swif installer. On those Macs, the policy profile can't be updated or removed remotely after it installs. See BYOD Limitation (Apple, Windows).


Settings reference

Setting

What it does when turned off

Default

Platforms and minimum OS

Supervision

Allow Passcode Modification

iPhone and iPad: users can't add, change, or remove the device passcode. Mac: users can't change their password.

On

macOS 10.13, iOS/iPadOS 9.0

Required on iOS/iPadOS

Allow Local User Creation

Users can't create new user accounts in System Settings.

On

macOS 14

Not required

With both of these on, the device isn't restricted. Check both before you save the policy.

sudo settings (macOS)

These settings are applied by the Swif agent, and are off by default.

Setting

What it does

Default

Range

CIS macOS Benchmark

Set Sudo Timeout

Sets how long sudo remembers an administrator's password before asking for it again

Off

—

5.4

Sudo Timeout (minutes)

How many minutes sudo remembers the password. 0 makes it ask every time, as CIS recommends. Shown when Set Sudo Timeout is on.

0

0–60

5.4

Separate Sudo Timestamp for Each Terminal

Each Terminal window or tab must enter the password separately. Entering it in one tab doesn't let sudo run without a password in another.

Off

—

5.5

When neither setting is on, macOS remembers the password for 5 minutes.

About Separate Sudo Timestamp for Each Terminal. This is already the macOS default. Turning it on makes sure it stays that way, even if another sudo configuration on the Mac turns it off.

How they're applied. The Swif agent writes the settings to its own file in /etc/sudoers.d, and leaves /etc/sudoers as it is. Changes usually reach the Mac within about 2 minutes.

Turning them off. Turning off both settings, or unassigning the policy, removes Swif's sudo settings, and the Mac goes back to macOS's 5-minute default. This can take a few minutes.

iPhones and iPads assigned the same policy don't receive the sudo settings.

System Settings (macOS)

Setting

What it does

Default

CIS macOS Benchmark

Require Administrator Password for System-Wide Settings

Each system-wide pane in System Settings asks for an administrator's name and password separately

Off

2.6.8

By default, once someone unlocks one system-wide pane in System Settings, the others stay unlocked for the rest of the login session. When this setting is on, the Swif agent turns on the macOS setting Require an administrator password to access system-wide settings. Then:

  • Each system-wide pane asks for an administrator's password on its own, such as Network, Sharing, Software Update, Startup Disk, Energy, Printers & Scanners, and Time Machine. Unlocking one no longer unlocks the others.

  • Only an administrator can unlock these panes.

  • The setting stays on. If someone turns it off on the Mac, the agent turns it back on within a minute.

Turning off the setting, or removing the policy, puts back the Mac's earlier settings.

Needs macOS 12 or later, and the Swif agent.

What these settings don't cover

  • Password resets by another administrator. On a Mac, an administrator account can still reset another user's password. Swif can't block this with this policy.

  • Account creation outside System Settings. Apple limits Allow Local User Creation to creating users in System Settings. It doesn't say the setting affects other methods, such as command-line tools or accounts created during enrollment or by Platform SSO. Test any method your users might use.

  • Existing accounts. Turning off Allow Local User Creation doesn't remove accounts that already exist.


Using this policy with other Swif policies

    • If that policy makes passwords expire, users need to be able to change their password. Don't turn off Allow Passcode Modification on the same devices unless users have another way to change it, such as a Swif-managed reset. Test the combination before rollout.

    • Its Disallow user to change password setting also blocks password changes on Macs. Use one policy for this, not both.

  • Apple Platform SSO Policy: With Platform SSO, the identity provider manages the password. Turning off Allow Passcode Modification stops users from changing the local password separately.


Before you start

  1. Decide how users will change passwords. If you block local changes, give users another way, such as your identity provider or a Swif-managed reset.

  2. Check that iPhones and iPads are supervised. Allow Passcode Modification doesn't apply to unsupervised devices.

  3. Check that iPhones and iPads already have a passcode. Users can't add one after the policy applies.

  4. Check macOS versions. Macs before macOS 14 ignore Allow Local User Creation.

  5. Make sure an administrator account exists on each Mac before you block local user creation.

  6. For the sudo settings, check the Swif agent version on your Macs: 1.361.0 or later. Run /usr/local/swifteam/swifteam -version.

  7. Tell administrators before you turn on Require Administrator Password for System-Wide Settings. They'll enter their password for each system-wide pane in System Settings.


Create the policy

  1. In Swif, go to Device Management > Policies, then select Create new policy > Configure a Policy.

  2. Select Apple User Authorization Policy.

  3. Enter a clear name, such as Mac – Block Local Accounts.

  4. Set Allow Passcode Modification.

  5. Set Allow Local User Creation (applies to Macs only).

  6. Optionally, turn on Set Sudo Timeout and enter the minutes, and turn on Separate Sudo Timestamp for Each Terminal.

  7. Optionally, turn on Require Administrator Password for System-Wide Settings.

  8. Check the settings again, then save the policy.

  9. Assign it to a device group.

  10. Test on a few devices before a wider rollout.


Example configurations

Example 1: Company Macs with Platform SSO

Users sign in with your identity provider, which manages their passwords.

Setting

Value

Allow Passcode Modification

Off

Allow Local User Creation

Off

Users can't change the local password or create extra accounts. They change their password through the identity provider.

Example 2: Company Macs where users manage their own password

You want to stop extra accounts but let users change their password.

Setting

Value

Allow Passcode Modification

On

Allow Local User Creation

Off

Example 3: Supervised shared iPhones for frontline staff

The team uses one known passcode, and you don't want anyone to change or remove it.

Setting

Value

Allow Passcode Modification

Off

Allow Local User Creation

On (has no effect on iPhone)

Set the passcode before you apply the policy. Users can't add one afterward.

Example 4: Strict sudo for CIS compliance

Setting

Value

Set Sudo Timeout

On

Sudo Timeout (minutes)

0

Separate Sudo Timestamp for Each Terminal

On

Every sudo command asks for the administrator's password. Meets CIS 5.4 and 5.5.

Example 5: Balanced sudo for developer Macs

Setting

Value

Set Sudo Timeout

On

Sudo Timeout (minutes)

15

Separate Sudo Timestamp for Each Terminal

On

sudo remembers the password for 15 minutes, separately in each Terminal window or tab.

Example 6: CIS hardening for company Macs

Setting

Value

Set Sudo Timeout

On

Sudo Timeout (minutes)

0

Separate Sudo Timestamp for Each Terminal

On

Require Administrator Password for System-Wide Settings

On

Meets CIS 2.6.8, 5.4, and 5.5. Administrators enter their password for every sudo command, and for each system-wide pane in System Settings.


Verify the policy

Mac

  1. Open System Settings > General > Device Management and open the Swif profile. Confirm that it includes the restrictions.

  2. If Allow Local User Creation is off, go to System Settings > Users & Groups and confirm that you can't add a user.

  3. If Allow Passcode Modification is off, try to change the password in System Settings > Users & Groups. The change shouldn't be allowed.

sudo settings (Mac)

Run this in Terminal:

sudo sudo -V | grep -E "Authentication timestamp timeout|Type of authentication timestamp record"
  • Authentication timestamp timeout should show the minutes you set. Without the policy, it's 5.0.

  • Type of authentication timestamp record should show tty if Separate Sudo Timestamp for Each Terminal is on.

To test it, run sudo -v, which only asks for the password. With a timeout of 0, it asks every time. With a timeout of 15 and separate timestamps on, a second run in the same tab doesn't ask, but a new tab (Command+T) does.

System Settings password (Mac)

On macOS 13 or later, go to System Settings > Privacy & Security, click Advanced at the bottom, and check that Require an administrator password to access system-wide settings is on. On macOS 12, go to System Preferences > Security & Privacy > General, and click Advanced.

Then unlock one system-wide pane, such as Network, and open another, such as Sharing. It should ask for an administrator's password again.

iPhone or iPad

  1. Go to Settings > General > VPN & Device Management, open the Swif profile, and confirm that it lists the restriction.

  2. Open Settings > Face ID & Passcode (or Touch ID & Passcode). The options to change or turn off the passcode shouldn't be available.

In Swif, open the device and confirm that the policy shows as applied.


Troubleshooting

An iPhone or iPad still lets users change the passcode

The device probably isn't supervised. Also check that it isn't a Shared iPad, which ignores this setting.

A user can't set a passcode on an iPhone or iPad

This is expected when Allow Passcode Modification is off. Turn it on, let the user set a passcode, then turn it off again.

Users can't change an expiring password

Allow Passcode Modification is off while a password policy requires changes. Turn it on, or provide another way to change passwords.

Macs still allow adding users

Check that the Mac runs macOS 14 or later.

A password was changed even though the policy blocks it

Another administrator account may have reset it. This policy doesn't prevent resets by administrators.

sudo still remembers the password for 5 minutes

  • Check that the Mac runs Swif agent 1.361.0 or later. Older agents ignore the sudo settings.

  • Wait about 2 minutes after the policy is sent to the Mac.

  • Check the agent log. Lines start with "Set" or "Removed":

    sudo grep UserAuthorization /var/log/swifteam.log
  • Check that Swif's sudo settings file exists:

    ls -l /etc/sudoers.d/

A sudo password in one Terminal tab doesn't work in another

This is expected when Separate Sudo Timestamp for Each Terminal is on. Each window or tab must enter the password separately.

System Settings asks for an administrator password for every pane

This is expected when Require Administrator Password for System-Wide Settings is on. Each system-wide pane asks separately.

A user turned off "Require an administrator password to access system-wide settings," and it turned back on

This is expected. The Swif agent turns it back on within a minute, while the policy setting is on.

The profile fails on a BYOD Mac enrolled through SSO

Macs enrolled through SSO, with account-driven User Enrollment, don't support the sudo settings. Turn them off in the policy assigned to these Macs.

Nothing applies on a personal iPhone, iPad, or Mac enrolled with Apple User Enrollment

Apple doesn't allow these restrictions on User Enrollment.


Related resources

Swif

Apple

Did this answer your question?