Can't Log In, Removed applesetupdone to try as new admin but need it back
From single-user mode (boot with cmd-s on T1 or earlier), run the following to mount the disk read-write, create the AppleSetupDone file with the correct permissions, then reboot.

/sbin/mount -uw /
touch /var/db/.AppleSetupDone
chmod 400 /var/db/.AppleSetupDone
reboot


With T2, single-user mode is accessed with cmd-R + Terminal, so you'll need to mount the internal disk at /Volumes/diskname and prefix the touch/chmod commands with the path to your disk.