Skip to content

Instantly share code, notes, and snippets.

@sghiassy
Last active December 4, 2024 10:13
Show Gist options
  • Save sghiassy/a3927405cf4ffe81242f4ecb01c382ac to your computer and use it in GitHub Desktop.
Save sghiassy/a3927405cf4ffe81242f4ecb01c382ac to your computer and use it in GitHub Desktop.

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable

Restart computer

Edit com.apple.ManagedClient.enroll.plist

In the terminal, type

sudo open /Applications/TextEdit.app /System/Library/LaunchDaemons/com.apple.ManagedClient.enroll.plist

change

<key>com.apple.ManagedClient.enroll</key>
        <true/>

to

<key>com.apple.ManagedClient.enroll</key>
        <false/>

Restart Computer again

So that the changes take effect

@Sam-0908
Copy link

@Sam-0908 , I turned off the wifi , went to advanced section of wifi and cleared all Wifi connections I had there. For some time the pop-up did not come and I was like wow, that was the issue and I tried opening some apps ( which is generally when the pop up comes ) like parallels, chrome etc. The pop up did not come. Then I opened another app called Goodnotes and the popup came back again.

Is there anything else I should be deleting than just the saved connections ? I do not understand what you mean by remove Wifi preferences.

I meant remove saved networks and WiFi passwords that are saved on your Mac

@joaopedropio
Copy link

Hi, guys. The Company I work is selling some Mac mini M1 but they said It's "locked". I suspect that It's this mdm Lock. Does these steps work on a Mac mini?

@Ran-Xing
Copy link

yes, try! @joaopedropio

@Mktulio
Copy link

Mktulio commented Aug 22, 2024

Yes! I bought one at the OLX sales market, I didn't know and when I formatted it I got this surprise. I solved it with this post. Oh! After solving don't format, just sign out of icloud, open a new user and delete the old one.

@joaopedropio
Copy link

Ok, this is the actual screen of the Mac Mini
image
I'm afraid that this machine has no way of fixing it.

@Reinaaperra
Copy link

Hey guys,

I ran the skipmdm - back in September last year to upgrade to Sonoma 14.0. I’ve had no issues with the enrolment popping back up at all. However I’ve never updated since. If I update it to Sonoma 14.6.1, will the enrolment messages start popping back up again? Is it worth the risk and is the update really necessary?

@Aooga776
Copy link

Hey guys,

I ran the skipmdm - back in September last year to upgrade to Sonoma 14.0. I’ve had no issues with the enrolment popping back up at all. However I’ve never updated since. If I update it to Sonoma 14.6.1, will the enrolment messages start popping back up again? Is it worth the risk and is the update really necessary?

So I'm on Ventura 13.0 and have been since I got this M1 out of the box. Before Sequoia comes out I'm going to try and upgrade to Sonoma tomorrow with the directions in this thread. I really really really hope it works.

@Sam-0908
Copy link

Hey guys,
I ran the skipmdm - back in September last year to upgrade to Sonoma 14.0. I’ve had no issues with the enrolment popping back up at all. However I’ve never updated since. If I update it to Sonoma 14.6.1, will the enrolment messages start popping back up again? Is it worth the risk and is the update really necessary?
No risk you can update.

So I'm on Ventura 13.0 and have been since I got this M1 out of the box. Before Sequoia comes out I'm going to try and upgrade to Sonoma tomorrow with the directions in this thread. I really really really hope it works.

@Aooga776
Copy link

First, let me get off my chest, that skipmdm.com now seems to be scammy to me. It is not free as every post and video I watched eluded to. They want $30 or $50 to add your serial number to their list. Not sure how protected you need to keep your serial number, but I wasn't giving them that info or paying them for a simple script. SO with that, I just updated from Ventura 13.0 to Sonoma 14.6.1 via software update.

You have to have Wifi on when you go through the update prompts before the restart. After fully updated, I was on the login screen. From there, I followed the steps below by booting into recovery mode. I turned off the WiFi in recovery mode. I ran all of the commands below. The only errors I got were with:

 touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled
 touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound

After restarting, I logged in to my account and everything was fine. No pop-ups, didn't even go through the hello screens and all of those.

Now fingers crossed it works for Sequoia next week. Someone wanna be that guinea pig? HAHA!

Thanks so much to everyone who helped out on this post. Appreciate you all!

Disabling DEP and MDM on macOS

  1. Cut the Wi-Fi

    • Disable your Wi-Fi to ensure your Mac has no internet connection and avoid the pop-up during the process.
  2. Turn Off the Mac

    • Shut down your Mac completely.
  3. Boot into Recovery Mode

    • Turn on your Mac and immediately hold down Command-R to boot into Recovery Mode.
  4. Disable SIP (System Integrity Protection)

    • Once in Recovery Mode, open the Utilities menu and select Terminal.
    • In the Terminal window, type the following command to disable SIP:
      csrutil disable
      
  5. Additional Steps in Recovery Mode

    • Run the following commands to manage Configuration Profiles and cloud records:
      launchctl disable system/com.apple.ManagedClient.enroll
      rm -rf /var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord
      rm -rf /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound
      touch /var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled
      touch /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound
      rm -rf /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord
      rm -rf /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound
      touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled
      touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound
      
    • Restart your Mac by typing:
      reboot
      
    • Note: If the files under /var/db/ are not present, removing them might not be necessary. However, adding the touched files helps ensure completeness.
  6. Grant Terminal Full Disk Access

    • Once your Mac has restarted normally, go to System Preferences > Security & Privacy > Privacy tab.
    • Select Full Disk Access from the left sidebar.
    • Click the lock icon to make changes, and add Terminal to the list of applications allowed Full Disk Access.
  7. Modify the Hosts File

    • Open Terminal and enter the following commands to block the necessary Apple servers:
      sudo /bin/sh -c 'echo "0.0.0.0 iprofiles.apple.com" >> /etc/hosts'
      sudo /bin/sh -c 'echo "0.0.0.0 mdmenrollment.apple.com" >> /etc/hosts'
      sudo /bin/sh -c 'echo "0.0.0.0 deviceenrollment.apple.com" >> /etc/hosts'
      sudo /bin/sh -c 'echo "0.0.0.0 gdmf.apple.com" >> /etc/hosts'
      
  8. Verify Hosts File Modification

    • Check if the hosts file has been updated correctly by running:
      sudo nano /etc/hosts
      
    • Ensure the lines you added are present.
  9. (Optional) Re-enable SIP

    • If you want to re-enable SIP, reboot your Mac into Recovery Mode again (Command-R).
    • Open Terminal in Recovery Mode and type:
      csrutil enable
      
    • Restart your Mac by typing:
      reboot
      
  10. Verify DEP and MDM Status

    • After a normal boot, open Terminal and run the following command to check the DEP and MDM enrollment status:
      profiles status -type enrollment
      
    • The output should show:
      Enrolled via DEP: No
      MDM enrollment: No
      
  11. Reconnect to Wi-Fi

    • Once everything is verified, you can safely reconnect your Mac to Wi-Fi.

@spoved-aws
Copy link

anyone updated to Sequoia? I tried from the App Store but it would pop up the update in settings.

Can you jump from 14.6 --> 15 ( Seq ) ? or do I need to be on 14.6.1 first?

@ParkerPerry
Copy link

First, let me get off my chest, that skipmdm.com now seems to be scammy to me. It is not free as every post and video I watched eluded to. They want $30 or $50 to add your serial number to their list. Not sure how protected you need to keep your serial number, but I wasn't giving them that info or paying them for a simple script. SO with that, I just updated from Ventura 13.0 to Sonoma 14.6.1 via software update.

You have to have Wifi on when you go through the update prompts before the restart. After fully updated, I was on the login screen. From there, I followed the steps below by booting into recovery mode. I turned off the WiFi in recovery mode. I ran all of the commands below. The only errors I got were with:

 touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled
 touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound

After restarting, I logged in to my account and everything was fine. No pop-ups, didn't even go through the hello screens and all of those.

Now fingers crossed it works for Sequoia next week. Someone wanna be that guinea pig? HAHA!

Thanks so much to everyone who helped out on this post. Appreciate you all!

Disabling DEP and MDM on macOS

  1. Cut the Wi-Fi

    • Disable your Wi-Fi to ensure your Mac has no internet connection and avoid the pop-up during the process.
  2. Turn Off the Mac

    • Shut down your Mac completely.
  3. Boot into Recovery Mode

    • Turn on your Mac and immediately hold down Command-R to boot into Recovery Mode.
  4. Disable SIP (System Integrity Protection)

    • Once in Recovery Mode, open the Utilities menu and select Terminal.
    • In the Terminal window, type the following command to disable SIP:
      csrutil disable
      
  5. Additional Steps in Recovery Mode

    • Run the following commands to manage Configuration Profiles and cloud records:
      launchctl disable system/com.apple.ManagedClient.enroll
      rm -rf /var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord
      rm -rf /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound
      touch /var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled
      touch /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound
      rm -rf /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord
      rm -rf /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound
      touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled
      touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound
      
    • Restart your Mac by typing:
      reboot
      
    • Note: If the files under /var/db/ are not present, removing them might not be necessary. However, adding the touched files helps ensure completeness.
  6. Grant Terminal Full Disk Access

    • Once your Mac has restarted normally, go to System Preferences > Security & Privacy > Privacy tab.
    • Select Full Disk Access from the left sidebar.
    • Click the lock icon to make changes, and add Terminal to the list of applications allowed Full Disk Access.
  7. Modify the Hosts File

    • Open Terminal and enter the following commands to block the necessary Apple servers:
      sudo /bin/sh -c 'echo "0.0.0.0 iprofiles.apple.com" >> /etc/hosts'
      sudo /bin/sh -c 'echo "0.0.0.0 mdmenrollment.apple.com" >> /etc/hosts'
      sudo /bin/sh -c 'echo "0.0.0.0 deviceenrollment.apple.com" >> /etc/hosts'
      sudo /bin/sh -c 'echo "0.0.0.0 gdmf.apple.com" >> /etc/hosts'
      
  8. Verify Hosts File Modification

    • Check if the hosts file has been updated correctly by running:
      sudo nano /etc/hosts
      
    • Ensure the lines you added are present.
  9. (Optional) Re-enable SIP

    • If you want to re-enable SIP, reboot your Mac into Recovery Mode again (Command-R).
    • Open Terminal in Recovery Mode and type:
      csrutil enable
      
    • Restart your Mac by typing:
      reboot
      
  10. Verify DEP and MDM Status

    • After a normal boot, open Terminal and run the following command to check the DEP and MDM enrollment status:
      profiles status -type enrollment
      
    • The output should show:
      Enrolled via DEP: No
      MDM enrollment: No
      
  11. Reconnect to Wi-Fi

    • Once everything is verified, you can safely reconnect your Mac to Wi-Fi.

I havent checked in a really long time to actually use skipmdm again but you shouldn't have to pay for it. You just use the website to copy the script and paste it:

"
curl -# https://raw.githubusercontent.com/skip-m/m/main/MChip -o file && chmod 777 ./file && ./file
"

Not really sure what aspect you are seeing that makes you think its been moved under a pay wall

@Reinaaperra
Copy link

First, let me get off my chest, that skipmdm.com now seems to be scammy to me. It is not free as every post and video I watched eluded to. They want $30 or $50 to add your serial number to their list. Not sure how protected you need to keep your serial number, but I wasn't giving them that info or paying them for a simple script. SO with that, I just updated from Ventura 13.0 to Sonoma 14.6.1 via software update.

You have to have Wifi on when you go through the update prompts before the restart. After fully updated, I was on the login screen. From there, I followed the steps below by booting into recovery mode. I turned off the WiFi in recovery mode. I ran all of the commands below. The only errors I got were with:

 touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled
 touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound

After restarting, I logged in to my account and everything was fine. No pop-ups, didn't even go through the hello screens and all of those.

Now fingers crossed it works for Sequoia next week. Someone wanna be that guinea pig? HAHA!

Thanks so much to everyone who helped out on this post. Appreciate you all!

Disabling DEP and MDM on macOS

  1. Cut the Wi-Fi

    • Disable your Wi-Fi to ensure your Mac has no internet connection and avoid the pop-up during the process.
  2. Turn Off the Mac

    • Shut down your Mac completely.
  3. Boot into Recovery Mode

    • Turn on your Mac and immediately hold down Command-R to boot into Recovery Mode.
  4. Disable SIP (System Integrity Protection)

    • Once in Recovery Mode, open the Utilities menu and select Terminal.
    • In the Terminal window, type the following command to disable SIP:
      csrutil disable
      
  5. Additional Steps in Recovery Mode

    • Run the following commands to manage Configuration Profiles and cloud records:
      launchctl disable system/com.apple.ManagedClient.enroll
      rm -rf /var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord
      rm -rf /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound
      touch /var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled
      touch /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound
      rm -rf /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord
      rm -rf /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound
      touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled
      touch /Volumes/Macintosh\ HD/var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound
      
    • Restart your Mac by typing:
      reboot
      
    • Note: If the files under /var/db/ are not present, removing them might not be necessary. However, adding the touched files helps ensure completeness.
  6. Grant Terminal Full Disk Access

    • Once your Mac has restarted normally, go to System Preferences > Security & Privacy > Privacy tab.
    • Select Full Disk Access from the left sidebar.
    • Click the lock icon to make changes, and add Terminal to the list of applications allowed Full Disk Access.
  7. Modify the Hosts File

    • Open Terminal and enter the following commands to block the necessary Apple servers:
      sudo /bin/sh -c 'echo "0.0.0.0 iprofiles.apple.com" >> /etc/hosts'
      sudo /bin/sh -c 'echo "0.0.0.0 mdmenrollment.apple.com" >> /etc/hosts'
      sudo /bin/sh -c 'echo "0.0.0.0 deviceenrollment.apple.com" >> /etc/hosts'
      sudo /bin/sh -c 'echo "0.0.0.0 gdmf.apple.com" >> /etc/hosts'
      
  8. Verify Hosts File Modification

    • Check if the hosts file has been updated correctly by running:
      sudo nano /etc/hosts
      
    • Ensure the lines you added are present.
  9. (Optional) Re-enable SIP

    • If you want to re-enable SIP, reboot your Mac into Recovery Mode again (Command-R).
    • Open Terminal in Recovery Mode and type:
      csrutil enable
      
    • Restart your Mac by typing:
      reboot
      
  10. Verify DEP and MDM Status

    • After a normal boot, open Terminal and run the following command to check the DEP and MDM enrollment status:
      profiles status -type enrollment
      
    • The output should show:
      Enrolled via DEP: No
      MDM enrollment: No
      
  11. Reconnect to Wi-Fi

    • Once everything is verified, you can safely reconnect your Mac to Wi-Fi.

When I used it last year I didn’t pay anything or give them a serial code (you probably did come across a scam).

I just copied and pasted the script. I initially had an issue with it because it had an error so I messaged the person on telegram they told me what the issue was and how to fix it (my Macintosh hard drive had another name so I had to input that).

I’ve had no issues since but I’ve just not updated the OS since. I came here to ask if anyone else who ran the same script has done an update since running the script and if anyone has had the pop up come up so I can know before hand.

@pain0x0
Copy link

pain0x0 commented Sep 17, 2024

has any updated to 15? im on 14, haven't updated since lol

@ehsan58
Copy link

ehsan58 commented Sep 17, 2024

is there any update about sequoia? anyone updated from 14.6 to 15?

@guiga1502
Copy link

has any updated to 15? im on 14, haven't updated since lol
is there any update about sequoia? anyone updated from 14.6 to 15?

I did the update yesterday. So far so good, I haven't received any warnings and everything seems to be working fine.

@pain0x0
Copy link

pain0x0 commented Sep 18, 2024

has any updated to 15? im on 14, haven't updated since lol
is there any update about sequoia? anyone updated from 14.6 to 15?

I did the update yesterday. So far so good, I haven't received any warnings and everything seems to be working fine.

good to hear, what did you update from? im still on 14.0, never updated, was scared to.

@Mktulio
Copy link

Mktulio commented Sep 19, 2024

Atualizei para o Sequoia tudo ok.

@itzcharlie01
Copy link

Atualizei para o Sequoia tudo ok.

Então você está dizendo que depois da atualização você não precisou executar comandos para fazê-lo funcionar, simplesmente funcionou?

@guiga1502
Copy link

has any updated to 15? im on 14, haven't updated since lol
is there any update about sequoia? anyone updated from 14.6 to 15?

I did the update yesterday. So far so good, I haven't received any warnings and everything seems to be working fine.

good to hear, what did you update from? im still on 14.0, never updated, was scared to.

I upgraded from 14.6 to 15.0. Working fine.

Atualizei para o Sequoia tudo ok.

Então você está dizendo que depois da atualização você não precisou executar comandos para fazê-lo funcionar, simplesmente funcionou?

If you have already run the commands previously in version 14.x, during the migration to 15.0 it was normal. You do not need to run it again.

@AngelCrum
Copy link

image Hi, I did have a problem, I updated and now I only get the registration alert in the configuration. I've done everything, from changing and blocking the host, to re-patching. I don't know what else I can do or what I'm doing wrong. I hope someone can help me.

THANK YOU.

@Mktulio
Copy link

Mktulio commented Sep 26, 2024

Atualizei para o Sequoia tudo ok.

Então você está dizendo que depois da atualização você não precisou executar comandos para fazê-lo funcionar, simplesmente funcionou?

yes!

@andreas-bulling
Copy link

The Workaround
(1) Disable SIP in 1 True Recovery
(2)
sudo rm /var/db/ConfigurationProfiles/Settings/.cloudConfigHasActivationRecord
sudo rm /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordFound
sudo touch /var/db/ConfigurationProfiles/Settings/.cloudConfigProfileInstalled
sudo touch /var/db/ConfigurationProfiles/Settings/.cloudConfigRecordNotFound
(3) you're all set. enjoy this boring upgrade

What is "1 True recovery" and how can I access it? Does intel Macs have a "1 True recovery" too?

do yourself a favor and use opencore on top of mac boot rom. change the SN in opencore instead of patching the OS

in this case one only has to fake the serial numbers and all should be good, i.e. no file removing etc needed - do I understand you correctly?

@Iamsheye
Copy link

when I run profiles status -type enrollment in my terminal, I get

Enrolled via DEP: No
MDM enrollment: No

Currently on Sonoma 14.7 on an M1 and there's a Sequoia 15.0.1 update, anyone with similar profile that has updated?

@ooduck
Copy link

ooduck commented Oct 29, 2024

I'm wondering if there's something like this for remote management of iPads. Is there anything we can do to bypass the remote management of an iPad?

@Aooga776
Copy link

Anyone get to 15.1? It's not showing up in my software updates. I've never had this issue before.

@hamstead
Copy link

@Aooga776 you should still be able to initiate the update through the Mac App Store

@varsh8th
Copy link

varsh8th commented Nov 1, 2024

has any updated to 15? im on 14, haven't updated since lol
is there any update about sequoia? anyone updated from 14.6 to 15?

I did the update yesterday. So far so good, I haven't received any warnings and everything seems to be working fine.

good to hear, what did you update from? im still on 14.0, never updated, was scared to.

I upgraded from 14.6 to 15.0. Working fine.

Atualizei para o Sequoia tudo ok.

Então você está dizendo que depois da atualização você não precisou executar comandos para fazê-lo funcionar, simplesmente funcionou?

If you have already run the commands previously in version 14.x, during the migration to 15.0 it was normal. You do not need to run it again.

Can confirm this works, I didn't update at all since 14, since last november and also didn't see minor updates like 14.2 or14.3 and so on, but recently saw 15.1 and just updated now and so far looks good

I prev did skipmdm steps and etc file changes but thats about it

I'll update if things change but your comment really gave me the courage to update directly, so thank you :)

@ideal2545
Copy link

I successfully upgraded to 15.1 on a m3 macbook pro but I cant get apple intelligence to activate and is just stuck on preparing, has anyone else seen this issue?

@N4ssim
Copy link

N4ssim commented Nov 8, 2024

IMG_6849

Hi, I wanted to check if my MacBook was still enrolled with the company, I deleted the hosts after a few minutes I have this page (photo), now I can do nothing

Is there a way around this? Without losing my data
Knowing that I'm on macos sonoma 14.6 and I bypassed the installation

@moo84
Copy link

moo84 commented Dec 4, 2024

At what point do you use the SkipMDM steps if you are turning on a MacBook for the first time which is marked for JAMF activation/enrolment during initial setup?

Is disabling WIFI router still a workaround to get you into the OS / restore from a backup and then run the SkipMDM script?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment