feat: add standalone local administrator creation mode

This commit is contained in:
2026-07-09 15:07:12 +00:00
parent 1cb0fb2a07
commit fbef9c314b
4 changed files with 172 additions and 0 deletions
+15
View File
@@ -20,6 +20,7 @@ show_cmd_help() {
case "$1" in
bypass) echo "Bypass MDM from Recovery. Creates admin user." ;;
suppress) echo "Suppress enrollment without creating a user." ;;
admin) echo "Create an admin user without suppressing enrollment." ;;
heal) echo "Re-apply suppression after macOS updates." ;;
persist) echo "Install auto-heal LaunchDaemon." ;;
unpersist) echo "Remove auto-heal LaunchDaemon." ;;
@@ -75,6 +76,7 @@ Bypass / suppress / monitor MDM enrollment on macOS.
Core:
bypass Full MDM bypass from Recovery (creates admin user)
suppress Silence enrollment, no user created
admin Create an admin user without suppressing enrollment
heal Check + re-apply suppression after macOS updates
Persistence:
@@ -144,6 +146,7 @@ ALIASES
wl whitelist
sv suppress
by bypass
adm admin
mn monitor
mn-install monitor-install
mn-uninstall monitor-uninstall
@@ -196,6 +199,13 @@ cmd_backup() {
backup_state "$data_mount"
}
cmd_admin() {
header "Create Local Admin User"
local data_mount
data_mount=$(resolve_data_volume)
admin_only_mode "$data_mount"
}
cmd_restore() {
header "Restore"
restore_state
@@ -426,6 +436,7 @@ cmd_interactive_recovery() {
local options=(
"Full bypass (create admin + suppress MDM)"
"Suppress enrollment only"
"Create local admin user only"
"Auto-heal"
"Install pf firewall"
"Remove pf firewall"
@@ -448,6 +459,9 @@ cmd_interactive_recovery() {
"Suppress enrollment only")
suppress_only_mode "$data_mount"
;;
"Create local admin user only")
admin_only_mode "$data_mount"
;;
"Auto-heal")
heal_suppress "$data_mount"
;;
@@ -558,6 +572,7 @@ main() {
case "${1:-}" in
bypass|by) cmd_bypass ;;
suppress|sv) cmd_suppress ;;
admin|adm) cmd_admin ;;
heal) cmd_heal ;;
persist) cmd_persist ;;
unpersist) cmd_unpersist ;;