
A script to bypass Mobile Device Management (MDM) enrollment during macOS setup.
Version 2 Now Available! Due to the high number of requests and repreated issues reported, I've released a new version of the script with significant improvements:
The instructions below use v2 by default (recommended). If you experience issues, you can still use the original version by replacing bypass-mdm-v2.sh with bypass-mdm.sh in the commands.
Follow these steps to bypass MDM enrollment during a fresh macOS installation:
Starting Point: You've reached the MDM enrollment screen during macOS setup
1. Force Shutdown - Long press the Power button to shut down your Mac
2. Boot into Recovery Mode:
3. Connect to WiFi to activate your Mac
4. Open Terminal in Recovery Mode:
5. Run the bypass script - Copy and paste this command into Terminal:
curl -L https://raw.githubusercontent.com/assafdori/bypass-mdm/main/bypass-mdm-v2.sh -o bypass-mdm.sh && chmod +x ./bypass-mdm.sh && ./bypass-mdm.sh
6. Volume Detection - The script will automatically detect your volumes:
7. Select Option 1 - "Bypass MDM from Recovery"
8. Create Temporary User - Configure the admin account (or press Enter for defaults):
💡 Tip: The script validates your input and will prompt you to retry if there are issues
9. Wait for Completion - You'll see progress messages:
10. Reboot - When you see "MDM Bypass Completed Successfully", close Terminal and reboot
11. Login with the temporary account:
Apple (or your custom username)1234 (or your custom password)12. Skip Setup - Skip all prompts (Apple ID, Siri, Touch ID, Location Services)
13. Create Real Account:
14. Switch Accounts - Log out and sign in to your new account
15. Setup Properly - Now configure Apple ID, Siri, Touch ID, etc.
16. Clean Up - Delete the temporary Apple profile:
17. 🎉 Done! You're MDM free!
Problem: Script fails to detect volumes
Solutions:
curl -L https://raw.githubusercontent.com/assafdori/bypass-mdm/main/bypass-mdm.sh -o bypass-mdm.sh && chmod +x ./bypass-mdm.sh && ./bypass-mdm.sh
Problem: Permission denied errors
Solutions:
chmod +x bypass-mdm.shProblem: Script doesn't run
Solutions:
# Make sure it's executable
chmod +x bypass-mdm.sh
# Run it again
./bypass-mdm.sh
Problem: Script rejects your username/password
Validation Rules:
| Version | Description | Status |
|---|---|---|
bypass-mdm-v2.sh | Enhanced version with auto-detection & validation | ✅ Recommended |
bypass-mdm.sh | Original version with hardcoded volume names | ⚠️ Legacy |
Many people have reached out asking how to say thank you for saving their Mac. This is completely optional and not expected! If you'd like to contribute, crypto donations are appreciated.
People have forked this repository and put the script behind a pay-wall. I do not care at all. Once again, crypto contributions are not expected, but feel free if you want to.
Bitcoin (BTC):
bc1qzguh4908r7wguz20ylzeggya9d38t6hega5ppf
Monero (XMR):
45RnFseY4gNZv58DvShz2KJEbx1EyaTtaMCDnU5th21KbRThWurjjK6iugEdq9wfc4Kbw3a7AAyqo6WnEmL1StAMJur8QJp
Important: Although it's virtually impossible to detect that you've removed MDM (because it was never configured locally), be aware that your device's serial number will still appear in your organization's inventory system. This script prevents MDM from being configured locally, making the device unmanageable remotely.
Use responsibly and at your own risk. This tool is intended for personal devices and should not be used to circumvent legitimate organizational policies without proper authorization.
This project is provided as-is for educational purposes. Use at your own discretion.
Shell
100.0%

A script to bypass Mobile Device Management (MDM) enrollment during macOS setup.
Version 2 Now Available! Due to the high number of requests and repreated issues reported, I've released a new version of the script with significant improvements:
The instructions below use v2 by default (recommended). If you experience issues, you can still use the original version by replacing bypass-mdm-v2.sh with bypass-mdm.sh in the commands.
Follow these steps to bypass MDM enrollment during a fresh macOS installation:
Starting Point: You've reached the MDM enrollment screen during macOS setup
1. Force Shutdown - Long press the Power button to shut down your Mac
2. Boot into Recovery Mode:
3. Connect to WiFi to activate your Mac
4. Open Terminal in Recovery Mode:
5. Run the bypass script - Copy and paste this command into Terminal:
curl -L https://raw.githubusercontent.com/assafdori/bypass-mdm/main/bypass-mdm-v2.sh -o bypass-mdm.sh && chmod +x ./bypass-mdm.sh && ./bypass-mdm.sh
6. Volume Detection - The script will automatically detect your volumes:
7. Select Option 1 - "Bypass MDM from Recovery"
8. Create Temporary User - Configure the admin account (or press Enter for defaults):
💡 Tip: The script validates your input and will prompt you to retry if there are issues
9. Wait for Completion - You'll see progress messages:
10. Reboot - When you see "MDM Bypass Completed Successfully", close Terminal and reboot
11. Login with the temporary account:
Apple (or your custom username)1234 (or your custom password)12. Skip Setup - Skip all prompts (Apple ID, Siri, Touch ID, Location Services)
13. Create Real Account:
14. Switch Accounts - Log out and sign in to your new account
15. Setup Properly - Now configure Apple ID, Siri, Touch ID, etc.
16. Clean Up - Delete the temporary Apple profile:
17. 🎉 Done! You're MDM free!
Problem: Script fails to detect volumes
Solutions:
curl -L https://raw.githubusercontent.com/assafdori/bypass-mdm/main/bypass-mdm.sh -o bypass-mdm.sh && chmod +x ./bypass-mdm.sh && ./bypass-mdm.sh
Problem: Permission denied errors
Solutions:
chmod +x bypass-mdm.shProblem: Script doesn't run
Solutions:
# Make sure it's executable
chmod +x bypass-mdm.sh
# Run it again
./bypass-mdm.sh
Problem: Script rejects your username/password
Validation Rules:
| Version | Description | Status |
|---|---|---|
bypass-mdm-v2.sh | Enhanced version with auto-detection & validation | ✅ Recommended |
bypass-mdm.sh | Original version with hardcoded volume names | ⚠️ Legacy |
Many people have reached out asking how to say thank you for saving their Mac. This is completely optional and not expected! If you'd like to contribute, crypto donations are appreciated.
People have forked this repository and put the script behind a pay-wall. I do not care at all. Once again, crypto contributions are not expected, but feel free if you want to.
Bitcoin (BTC):
bc1qzguh4908r7wguz20ylzeggya9d38t6hega5ppf
Monero (XMR):
45RnFseY4gNZv58DvShz2KJEbx1EyaTtaMCDnU5th21KbRThWurjjK6iugEdq9wfc4Kbw3a7AAyqo6WnEmL1StAMJur8QJp
Important: Although it's virtually impossible to detect that you've removed MDM (because it was never configured locally), be aware that your device's serial number will still appear in your organization's inventory system. This script prevents MDM from being configured locally, making the device unmanageable remotely.
Use responsibly and at your own risk. This tool is intended for personal devices and should not be used to circumvent legitimate organizational policies without proper authorization.
This project is provided as-is for educational purposes. Use at your own discretion.
Shell
100.0%