Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

ExcludeUsers

amyers22 edited this page Dec 11, 2017 · 3 revisions

Excluding Users

If you want to exclude certain users from scripts that run in the login context (I.e. a local admin account or a static kiosk user), you can do so by editing the Outset preferences. You can do this two ways, either by bundling your own preference file or programmatically editing the existing one. To do the former, edit the example plist to include the users you want to ignore, and package this plist to be installed in /usr/local/outset/share/. There isn't a provided way to create this package, because frankly you should do it programmatically.

Note: This only affects login-once or login-every scripts. on-demand scripts can will still run in the current user context, even for excluded users.

Adding Users to Exclude

To add a username you want to exclude, create a boot-once script that runs Outset with the --add-ignored-user argument. You can string as many users as you want:

/usr/local/outset/outset --add-ignored-user FOO --add-ignored-user BAR

Or, you can add them individually:

/usr/local/outset/outset --add-ignored-user FOO
/usr/local/outset/outset --add-ignored-user BAR

This will result in a preference file that will look similar to this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>ignored_users</key>
    <array>
        <string>FOO</string>
        <string>BAR</string>
    </array>
    <key>network_timeout</key>
    <integer>180</integer>
    <key>wait_for_network</key>
    <true/>
</dict>
</plist>

Removing Users From Exclusion

To remove a username from the array, create a boot-once script that runs Outset with the --remove-ignored-user argument. You can string as many users as you want:

/usr/local/outset/outset --remove-ignored-user FOO --remove-ignored-user BAR

Or, you can remove them individually:

/usr/local/outset/outset --remove-ignored-user FOO
/usr/local/outset/outset --remove-ignored-user BAR