Skip to content

Instantly share code, notes, and snippets.

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

@secured2k
Copy link

What are the contents of any existing profiles on the system?
sudo profiles show -all

If you force restart your MacBook Air by holding the Command (⌘) and Control (Ctrl) and Power button, how long until the message shows up again when you log in?
Optionally you can also run one of the following:
These will shut off the Mac; possibly in a way that does not have the Mac re-open previously open programs on login.

sudo halt
sudo shutdown -h now

@k1ck3r
Copy link

k1ck3r commented Mar 3, 2021

i'm really glad that that i found this info.

however, i'm really new to Mac, just because decided to try it out. Once i got handed the Macbook Pro A1398 (with Big Sur) obviously decided to reset it. Now here is my issue - during the setup process, on the step with network connections popups login screen for Jamf.

What ever steps i took same result, if i choose no networkconnection - popups a window to try again later, otherwise a login screen. What do you think, will it be possible to handle it?

Interesting thing is that until i took over the laptop and until reset, everything was working

@secured2k
Copy link

Please google for additional information on the following steps.

Perform a Parameter/NVRAMReset (https://support.apple.com/en-us/HT204063)
Restore your Mac using Command+R at boot. Before installing, Wipe the HDD. (https://support.apple.com/en-us/HT208496)
Ideally you would leave the MacBook disconnected and install using a USB key with the install files created from another Mac. https://support.apple.com/en-us/HT201372

If this is not available, connect to your wired or wireless network to perform the first part of the install. When the installer finishes the first part (at the first reboot after files are copied) disconnect your wifi AP, Router, or internet connection and/or move to a location with no open WiFi available.

Complete MacOS setup without using anything that requires an internet connection. Once you are logged in as Admin, you can perform some steps to edit the hosts file as mentioned earlier in this thread.

Restore your internet/WiFi connection and perform whatever setup configuration you need in the System Preferences Application (Accounts, iCloud, etc).

@mipu268
Copy link

mipu268 commented Mar 4, 2021

I meant

What's the issues with computer cannot start up unless authenticated-root is OFF? does this affect the computer security somehow? @secured2k ?

@k1ck3r
Copy link

k1ck3r commented Mar 5, 2021

ok great, will ask a colleague to make me the usb. i've done the reset procedure (including locking with csrutil). This only thing that i didn't tested is installing from usb. reading throught it, shouldn't be a problem. However will get back here once i have proper info.

much appreciate your effort.

@secured2k
Copy link

@mipu268 - Chances are the file system was not properly blessed or Partial or Full boot Security is enabled. Since the boot volume no longer matches Apple's signed signatures, booting fails. For security concerns, see https://gist.github.com/sghiassy/a3927405cf4ffe81242f4ecb01c382ac#gistcomment-3522669

@mipu268
Copy link

mipu268 commented Mar 6, 2021

@mipu268 - Chances are the file system was not properly blessed or Partial or Full boot Security is enabled. Since the boot volume no longer matches Apple's signed signatures, booting fails. For security concerns, see https://gist.github.com/sghiassy/a3927405cf4ffe81242f4ecb01c382ac#gistcomment-3522669

Oh Thank you.
Did I do some steps wrong or it suppose to happened with BigSur? Is there a way to have no DEP notification and still can have authenticated-root ON?

@k1ck3r
Copy link

k1ck3r commented Mar 8, 2021

success when wifi/access point is turned off

@itsthomas
Copy link

Yesterday, Apple has released a new update for macOS.
Has any one updated to macOS Big Sur 11.2.3?

@sqig
Copy link

sqig commented Mar 9, 2021

Yes updated perfectly on my T2 2018 MBP 15.

@McflySavesTheWorld
Copy link

McflySavesTheWorld commented Mar 14, 2021

Guys I'm such a noob to this. I'd honestly wouldn't mind paying a pro to do this for me haha.

Im currently on a 2018 T2 Chipped MacBook Pro running Mojave 10.14.6 and need to upgrade to Big Sur.

Can someone please direct me to the right steps to follow including when to bless, and I apologize for not completely understand which is the step by step directions I should be using to make this happen.

Thank You so much for the help

@bboyadao
Copy link

Jesus Christ it's required using USB to boot. please note it in to intro

@kurtheiden
Copy link

I followed Secured2k’s instructions for Big Sur, but on the umount command it followed up by showing me a bunch of use cases:

usage: mount [-dfruvw] [-options][ [-t external_type] special mount_point
mount [-adfruvw] [-t external type]
Mount [-dfruvw] special | mount_point

...then when I do the “cd /Volumes/Macintosh\ HD/System/Library/LaunchAgents” I get no such file or directory.

I’m sure I’m doing something wrong, but I don’t know what.

I’m on a T1 chip Mac, latest version of Big Sur installed.

@time2chil
Copy link

@tapioca123 can you help me to Remove the Message From uber i have the Same issue

Hello From Germany at all

@solida-s
Copy link

Does this work for macOS Big Sur?

@teppi210
Copy link

teppi210 commented Mar 29, 2021

You can pm me on facebook: https://www.facebook.com/phung.ductho.9/
I can support you

@tapioca123 can you help me to Remove the Message From uber i have the Same issue

Hello From Germany at all

@Goldi86
Copy link

Goldi86 commented Apr 2, 2021

Guys, after disabled enrollment notification, I am able to update MacOS. I am asking because I've got Big Sur 11.1 and my software update just don't see ver.11.2.3. - just inform me that soft is up to date. Any thoughts?

@time2chil
Copy link

time2chil commented Apr 2, 2021 via email

@matthub347
Copy link

Hi all, I got a MBP 2016 with Mojave installed that used to have a dep enabled. I was able to sign in icloud, install apps, except some apps. I noticed the dep when I was resetting the computer to default mac os. Then, I did a reinstall, the remote management pops up during the process. I got blocked. After that, I called the number but nobody anwser to see if the company can removed the dep or the computer is legit. Then, I decided to do an offline install of Sierra, then upgraded to big sur.
So far no issue, no dep installed without running any above commands and editing of host files.

Questions: is there might be a dep installed in the future on my MBP? What is the risk of using the pc without running the commands above? What the former owner can do to my mac?

NB. I did not have any pop up mesage on notification or any other profiles installed on my mac, it has find my mac disabled.
I appreciate any advice and helps. Thanks guys!

@bobcatchris
Copy link

anyone know how to stop the popups? i been trying to figure this out for days

i have a 2019 16" it uses a t2 and its on big sur

@birykvlad
Copy link

@sstruta
Copy link

sstruta commented Jun 4, 2021

Screenshot 2021-06-05 at 01 55 16

hello,
I accidentally accepted and installed MDM profiles on my macbook pro 2020 Big Sur 11.4,
does anyone know a solution to remove this profile?

p.s.
I'm new to github, I didn't even know that here you can find a lot of interesting things

@birykvlad
Copy link

sstruta
Only reinstall macOS

@sstruta
Copy link

sstruta commented Jun 12, 2021

sstruta
Only reinstall macOS
I tried to reinstall macOS and nothing, all MDM profile(and some applications) is automatically installing even when I format my SSD.
Or you're talking about installing an older version of MacOS?

@secured2k
Copy link

This thread has gotten long over time but has the answer multiple times.

If re-installing, do not be connected to the internet. Do not join WiFi or power off WiFi routers or modems. If PRAM was not reset the Mac may try to automatically connect to a previous access point. When setup is complete and you have an admin account signed in, you can reconnect to the internet and review specifically blocking certain hosts listed earlier in this thread.

If you have a T2 or newer chip and the device is activation locked by the remote company or Apple, you will have to contact the company that issues the activation lock. If proof of authorized sale and ownership is provided to Apple support they can also remove the lock. Only other known hardware bypass is low level hardware replacement or serial number programming with specialized tools and software.

@secured2k
Copy link

@matthub347 - DEP must be removed by Apple or the company that enrolled the Serial Number of the device. If that happened, you are good to go. Otherwise it could return. If the company that registered the device was using their own MDM servers and those servers were shut down, then chances are there will be no further issues.
Risks for not blocking MDM at this point - Since you are logged in already with admin, MDM is not automatically applied. So the risk is getting MDM alerts to add a profile and possibly accidentally adding it. Once a profile is installed the system can be told do do just about anything the admin can do (find, lock, wipe the device, install/remove/run software/accounts, etc). While possible I find it rare to see this actually implemented. Most just use it as a theft deterrent and for asset recovery.

@sstruta
Copy link

sstruta commented Jun 12, 2021

I have a T2 chip...and I spoke with a some from this company and he told me that it will verify if my Mac was stollen or lost and after it will contact me. But after a month I have not any answer.
secured2K tell me please if I will log into my iCloud from this Mac can the MDM profile to check all my information from?
<<Excuse me if the question sounds stupid 😑>>

@secured2k
Copy link

Theoretically if an MDM profile is installed and there is an unrestricted internet connection, a profile can do anything on the Mac (because it can tell your Mac to download and run software) including accessing any information on the device or accessing gps data. I rarely see this actually done but it is possible.

In your case if your purchased the Mac through an authorized retailer, then provide Apple receipt and support will remove the enrollment. If you purchased used (eBay for example) the laptop might be “stolen” or “lost” from the company. If you contacted the company they probably are trying to contact the original owner who probably actually lost the device or is not cooperating.

@madketchup
Copy link

Fuuh... looks like a lot of People has no Idea how MacOS works. To be sure: I really don't want to blame anybody, so please don't take that personally! Nobody can't know everything...

Here is my Shortcut based on above "HowTo" which is goin' really easier - you really don't need 2 reboots or do ANYTHING with "csrutil" in that case...

  • Just boot to the "Recovery Mode" in OS X (CMD + R)
  • In Recovery Mode, start Disk Util and activate/mount your SystemDisk to Rescue System.
  • Edit "com.apple.MagagedClients.enroll.plist with vi (press "i" (for insert/edit), after editing press "esc", to save file type ":wq!" - for vi beginners.
  • Reboot

done! - Works likes a charm! I have no Idea, how you run this HowTo successfully scince Catalina. The "System" Folder mounted as "read only" and there is no possibility to change this (no "sudo" or "sudo su" will work for that).

@secured2k
Copy link

This no longer works since Big Sur and newer. The thread is long but if you go back to dates near an OS release, there are plenty of instructions posted over and over again.

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