Mac OS
- Install Rosetta on Mac OS
- Create User in Terminal
- Create .pkg to deploy files and apps
- Forcefully Remove MDM from Mac
- macOS Login Window - show username and password box
Install Rosetta on Mac OS
Rosetta is required for compatibility with some applications.
To install Rosetta on a Mac, open the terminal and run the following command.
softwareupdate --install-rosetta --agree-to-license
Create User in Terminal
Set the username and password
dscl . -passwd /Users/<username> <password>
Set the user's default shell
dscl . -create /Users/<username> UserShell /bin/bash
Set the user's display name
dscl . -create /Users/<username> RealName "Real Name"
Set the user's primary group
dscl . -create /Users/<username> PrimaryGroupID 1000
Set the user's home directory
dscl . -create /Users/<username> NFSHomeDirectory /Users/<username>
Promote user to local admin
dscl . -append /Groups/admin GroupMembership <username>
Set the user's ID
dscl . -create /Users/<username> UniqueID 510
Create .pkg to deploy files and apps
Create a directory named Contents
and another named Scripts
.
Put the app contents in the Contents directory.
Put the script in the Scripts directory and name it postinstall
, with no extension and give it executable rights.
Run this command to create the package. Change the identifier
, install-location
, version
, and package-name.pkg
to what is appropriate for the package.
pkgbuild --root Content --scripts Scripts --identifier com.orgname.appname --install-location /path/to/directory --version 1.0 package-name.pkg
Forcefully Remove MDM from Mac
Reboot into Recovery Mode
Open Terminal and run csrutil disable
then reboot. This disables System Integrity Protection.
After reboot, move the configuration profiles directory: mv /var/db/ConfigurationProfiles /var/db/ConfigurationProfiles.old
Or destroy it: rm -rf /var/db/ConfigurationProfiles
Then recreate it mkdir /var/db/ConfigurationProfiles
Reboot back into Recovery Mode and re-enable System Integrity Protection.
Open Terminal and run csrutil enable
then reboot.
Reboot into normal operation and enroll the Mac into the MDM as normal.
macOS Login Window - show username and password box
Press the following keys simultaneously.
CONTROL+OPTION+COMMAND+SHIFT+DOWN ARROW+ENTER