# Set Up Remote Mac Access for a Contractor

Canonical: https://figment.so/blog/mac-remote-desktop-contractor-setup

Create a standard (non-admin) user with sysadminctl, add it to the Screen Sharing allow-list, and schedule a disable job for the last day. The script and revocation checklist below do it in about ten minutes.

**Give a contractor their own standard macOS account, add it to the Screen Sharing allow-list, and schedule an automatic disable for the last day.** That takes about ten minutes, keeps the contractor away from your admin password, Keychain secrets and other projects, and one script removes everything when the engagement ends.

Credentials in your Figment account are per tenant, so never hand them to the contractor. Every Figment plan gives you administrator access to your own Mac or VM, which is how you create the contractor account below. Figment has not published which remote desktop client or protocol it uses, so check the connection details in your Figment account and confirm that a named macOS account can use them.

## Why not share my admin credentials?

An admin login gives the contractor every privilege on the machine: system-wide installs, other users' home folders, network changes and unrestricted Keychain reads. If the contractor's laptop is compromised, so is everything on that Mac. A standard account shrinks the blast radius:

- **No sudo by default.** Standard users cannot install system-level packages or modify protected directories without admin authentication.
- **Isolated home folder.** `/Users/contractor` is readable only by that user and root.
- **Revocable on demand.** A single command disables the account when the engagement ends.
- **Separately auditable.** macOS logs the contractor's login events separately from your own sessions.

Apple's [user, guest and group guide](https://support.apple.com/guide/mac-help/set-up-users-guests-and-groups-mtusr001/mac) confirms that administrators "can add and manage other users, install apps, and change settings," while standard users "can install apps and change their own settings, but can't add other users or change other users' settings." Keep contractors in the standard tier.

## How do I create a standard user?

Use `sysadminctl`, the supported command-line tool for account management on macOS. Run it from an admin Terminal session on the Mac. Keep passwords out of shell history by letting `sysadminctl` prompt interactively, or pipe one from your secret manager:

```bash
# Interactive prompt (recommended): sysadminctl asks for the new password
sudo sysadminctl interactive -addUser contractor \
    -fullName "Contractor Display Name"
```

Confirm the account is not in the admin group before handing over access:

```bash
dseditgroup -o checkmember -m contractor admin
# Expected: contractor is NOT a member of admin
```

If membership unexpectedly shows up, remove it:

```bash
sudo dseditgroup -o delete -m contractor admin
```

## How do I enable Screen Sharing for the contractor only?

Turn on Screen Sharing in **System Settings › General › Sharing › Screen Sharing**, change access to **Only these users**, and add the `contractor` account. Apple's [Screen Sharing guide](https://support.apple.com/guide/mac-help/share-the-screen-of-another-mac-mh14066/mac) covers enabling the service and restricting who may connect.

The same change is scriptable from the admin account:

```bash
sudo dseditgroup -o edit -n /Local/Default \
    -a contractor -t user com.apple.access_screensharing
```

If the contractor uses a standalone VNC client rather than Apple's Screen Sharing app, open **Computer Settings** under the same pane and set a dedicated **VNC viewers may control screen with password** value, distinct from the account password. Never expose a VNC port directly to the internet.

## How do I schedule an automatic expiry?

Run the script below as admin on the Mac. It creates the account, grants Screen Sharing and schedules an automatic disable using `at`/`atd`.

```bash
#!/usr/bin/env bash
# contractor-setup.sh: scoped contractor account with scheduled expiry
# Usage: sudo bash contractor-setup.sh <username> <"Full Name"> <YYYY-MM-DD>
# Example: sudo bash contractor-setup.sh jane_dev "Jane Smith" 2026-12-15
# Requires: admin session on the Mac; atd loaded

set -euo pipefail

USERNAME="${1:?Provide username}"
FULLNAME="${2:?Provide full name}"
EXPIRY="${3:?Provide expiry date YYYY-MM-DD}"

umask 077

# Generate a one-time initial password; deliver via a secret manager, not chat
PASS="$(openssl rand -base64 18)"

# Create standard (non-admin) user
printf '%s\n' "$PASS" | sudo sysadminctl -addUser "$USERNAME" \
    -fullName "$FULLNAME" -password -

# Belt-and-braces: never admin
if dseditgroup -o checkmember -m "$USERNAME" admin >/dev/null 2>&1; then
    sudo dseditgroup -o delete -m "$USERNAME" admin
fi

# Grant Screen Sharing access to this account only
sudo dseditgroup -o edit -n /Local/Default \
    -a "$USERNAME" -t user com.apple.access_screensharing

# Write a revocation script to a fixed admin-owned path
REVOKE="/etc/contractor-revoke-${USERNAME}.sh"
sudo tee "$REVOKE" >/dev/null <<SCRIPT
#!/bin/bash
/usr/bin/pwpolicy -u "${USERNAME}" -disableuser
/usr/sbin/dseditgroup -o delete -m "${USERNAME}" \
    -t user com.apple.access_screensharing 2>/dev/null || true
/bin/echo "\$(date): ${USERNAME} disabled" >> /var/log/contractor-revoke.log
SCRIPT
sudo chmod 700 "$REVOKE"

# Schedule revocation at 18:00 local time on the expiry date.
# Enable atd first if needed:
#   sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist
EXPIRY_AT="$(date -j -f '%Y-%m-%d' "$EXPIRY" '+%Y%m%d')1800"
echo "bash $REVOKE" | sudo at -t "$EXPIRY_AT" || \
    echo "NOTE: atd job not scheduled; run $REVOKE manually on $EXPIRY"

printf '\n=== Contractor access provisioned ===\n'
printf 'Username   : %s\n'              "$USERNAME"
printf 'Initial pw : %s  (rotate on first login)\n' "$PASS"
printf 'Expiry     : %s at 18:00 (Mac local time)\n' "$EXPIRY"
printf 'Revoke now : sudo bash %s\n'    "$REVOKE"
printf '\nDeliver the password through an end-to-end encrypted channel.\n'
```

Two guardrails. `atd` is not loaded by default on recent macOS, so run the `launchctl load` line once before scheduling. A reboot between scheduling and expiry can lose the job if `atd` is not persistently loaded, so keep the revocation script path on hand for a manual run.

## What do I do on the contractor's last day?

Whether the scheduled job fires or you revoke early, these steps leave nothing behind:

```bash
# 1. Disable the login
sudo pwpolicy -u "$USERNAME" -disableuser

# 2. Remove Screen Sharing access
sudo dseditgroup -o delete -m "$USERNAME" \
    -t user com.apple.access_screensharing

# 3. Confirm no live session
who   # the contractor username should not appear

# 4. Delete the account and home folder
sudo sysadminctl -deleteUser "$USERNAME" -secure
```

Then, in **System Settings › Sharing › Screen Sharing › Computer Settings**, rotate or clear the VNC viewer password so an old client cannot reconnect. Copy out anything you want to keep first, because the delete removes the home folder.

## Which Figment Mac plan fits a contractor?

Pick by the work. For scripting or Xcode 26.3 or earlier, the [Intel Mac VM](/mac-hosting#intel-vm) ($2 a day, $25 a month, macOS Sequoia) is enough. For current Xcode, arm64-only binaries or visionOS, you need an Apple silicon plan: the [Apple Silicon Mac VM](/mac-hosting#apple-silicon-vm) ($6 a day, $39 a month), or the [Dedicated M4 Pro 48 GB](/mac-hosting#dedicated-m4-pro) ($349 a month, or $299 a month on a 12-month term) if the contractor needs a whole Mac.

A daily plan fits a short engagement: a two-week contract on the Intel VM is 14 × $2 = $28, against $25 for one month, so a monthly plan is cheaper beyond about 12 days. Cancelling a monthly plan stops renewal, and access runs to the end of the paid period.

---

*Related: [VNC vs SSH remote access on a Mac rental](/blog/mac-vnc-vs-ssh-remote-access) · [Configure Mac Screen Sharing on a rented Mac](/blog/mac-screen-sharing-rental-setup) · [Run GitHub Actions self-hosted runners on a Mac](/blog/mac-github-actions-self-hosted-runner)*
