7. Log in as operator¶
Goal: restart the Mac mini, let operator log in automatically, and let Plex, the NAS mount and the one-time first-login script start.
At login, the operator's LaunchAgents from step 6 start Plex and mount the NAS share. The first-login script runs once. It sets up the operator's Dock, Terminal and iTerm2 preferences, and the logrotate service. It does not install or configure any apps.
Steps¶
-
In the
adminTerminal, restart the Mac mini: -
Wait. The Mac mini logs in as
operatorwithout a password prompt. - Answer Apple's first-login dialogs for
operator. The operator account first login section covers each one. - Wait for the first-login script to finish. It can show a progress window. It removes Mail, Messages and other apps from the Dock, and adds iTerm, Plex Media Server and Passwords.
- Do not worry if the Dock has no media folder. The script adds the
Mediafolder inside the NAS share only if the share is already mounted when the script reaches that step. It does not wait for the mount.
Note
The first-login script runs once. At the end it moves its LaunchAgent to ~/.config/operator/. To run it again, run ~/.local/bin/operator-first-login.sh as operator.
About the operator account¶
- The operator password is in 1Password, in the item that
ONEPASSWORD_OPERATOR_ITEMnames. first-boot.shaddsoperatorto theadmingroup, sosudoworks with the operator password. Touch ID does not work foroperator, because macOS does not allow Touch ID with automatic login. See Setup problems.adminandoperatoraccept the same SSH key: the dev Mac's~/.ssh/id_ed25519.pub.- The menu bar shows the Fast User Switching menu, with the name of the current user. Use it, or
ssh admin@macmini.localfrom the dev Mac, to work asadmin. Run app setup andbrewcommands asadmin, becauseadminowns Homebrew.
Check¶
Run check 1 on the dev Mac. Run the other checks as operator, in Terminal on the Mac mini or over SSH.
-
From the dev Mac, SSH to the operator account works with your key:
-
The first-login log ends with the completion line:
The output includes
=== Operator First-Login Setup Completed ===. -
The first-login LaunchAgent moved out of
~/Library/LaunchAgents:The output includes
com.macmini.operator-first-login.plist. -
Plex runs as
operator:Each line starts with
operator.
Next: Verify