Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save henrik242/65d26a7deca30bdb9828e183809690bd to your computer and use it in GitHub Desktop.
Save henrik242/65d26a7deca30bdb9828e183809690bd to your computer and use it in GitHub Desktop.
@albzoon
Copy link

albzoon commented Apr 4, 2023

Cant bypass mdm on macbook m1 because when its recovered from dfu mode it install automatically ventura and also check on the profile server so the mdm enrollment catches at the beggining..
ANY HELP for bypass mdm to these models

@Aooga776
Copy link

Aooga776 commented Apr 6, 2023

Thanks for all the info @joshworksit I've run into one snag which is bypassing setup assistant. I followed this line:

Open Terminal and enter the command below and press Enter.

touch /Volumes/Macintosh\ HD\ -\ Data/private/var/db/.AppleSetupDone

Then type Reboot and press Enter or force off your Mac again using the steps above.

and I get:

touch: /Volumes/Macintosh HD/: Read-only file system
touch: - Data/private/var/db/.AppleSetupDone: No such file or directory

So I'm stuck here and can't figure out any way to bypass the setup assistant. Everything else worked flawlessly. Please let me know if you have any idea what I'm doing wrong here. Thanks again!

@razerduy
Copy link

razerduy commented Apr 7, 2023

Thanks for all the info @joshworksit I've run into one snag which is bypassing setup assistant. I followed this line:

Open Terminal and enter the command below and press Enter.

touch /Volumes/Macintosh\ HD\ -\ Data/private/var/db/.AppleSetupDone

Then type Reboot and press Enter or force off your Mac again using the steps above.

and I get:

touch: /Volumes/Macintosh HD/: Read-only file system touch: - Data/private/var/db/.AppleSetupDone: No such file or directory

So I'm stuck here and can't figure out any way to bypass the setup assistant. Everything else worked flawlessly. Please let me know if you have any idea what I'm doing wrong here. Thanks again!

If your macbook is Macbook pro M1 14 inch 2021, you can try this.
Reinstall MacOS 12.4 via usb, active without network. When active successfully, please add these lines into hosts:

0.0.0.0 iprofiles.apple.com
0.0.0.0 mdmenrollment.apple.com
0.0.0.0 deviceenrollment.apple.com
0.0.0.0 gdmf.apple.com

Then update to ventura via OTA

@Aooga776
Copy link

Aooga776 commented Apr 7, 2023

Ok. I guess I'll do that as a last ditch effort. I got through all the other steps of redoing the root password, creating an admin account, and everything else except bypassing setup. I just would rather not start over right now, but I will do that if @joshworksit doesn't know another solution for his last step that isn't working. Thank you @razerduy

@Aooga776
Copy link

Ok, So I figured it out. I went through terminal and just made a .AppleSetupDone folder in the private/var/db folder. So now I'm Logged In and it shows no MDM in Terminal. Still haven't connected to wifi. I'm now trying to restore content from a Time Machine backup. It gave me a warning to update the Mac to Ventura 13.2.1. Am I ok updating to the latest version without an issue or no?

@razerduy
Copy link

Ok, So I figured it out. I went through terminal and just made a .AppleSetupDone folder in the private/var/db folder. So now I'm Logged In and it shows no MDM in Terminal. Still haven't connected to wifi. I'm now trying to restore content from a Time Machine backup. It gave me a warning to update the Mac to Ventura 13.2.1. Am I ok updating to the latest version without an issue or no?

i think If your content that you backed up included hosts, you can restore. Otherwise, please restore later when you added hosts to block MDM.

@Aooga776
Copy link

Thank you @razerduy my bigger question is, can I update to 13.2.1 now or do I have to do something specific. I thought I did everything I needed, but I got my first enrollment prompt, so I'm going to go through those directions to suppress that. I just don't want to update and then get hit with the remote management screen again.

@Aooga776
Copy link

So weirdly enough, I added those ip addresses to the host file and I'm still getting the notification to enroll, but there are still no profiles on the machine. Anyone know what else is needed to block those popups completely? Also still wondering if I can update to the latest Ventura without any issues.

@bagofcig
Copy link

bagofcig commented Apr 12, 2023

I could not bypass the remote management on MacBook Pro M2 max Ventura, tried to boot from usb and wipe out all data from recovery mode.
Any luck finding a way to bypass that on MacBook Pro m2 max?

@Aooga776
Copy link

@bagofcig I did it on an M1 Max MacBook Pro with ventura installed. I followed @joshworksit 's directions from march 6 on booting to recovery in Ventura, changing the root password then on reboot choosing Command + Option + Control + T to show the menu bar, go in and make a new admin account. The only part I got stuck on is that the last line didn't work and I couldn't figure out how to bypass the setup assistant. Finally, I looked on my other Mac to find out where the .AppleSetupDone was and discovered it was actually a folder. So in terminal I navigated to the folder and made a new directory called .AppleSetupDone then rebooted and it went straight to the log in screen. I then went and added the ip addresses to the hosts file. Now, I'm still getting the notification to enroll, but I have no profiles and it is not managed. I can't figure out why the ip addresses in the host file isn't blocking the notification but I just click the x like two times a day until I can find a solution.

That's what worked for me on Ventura. I don't think it matters if it's m1 or m2 but more ventura vs Monterey. I never went through and wiped the drive. Mine was fresh from the factory.

I'm still trying to find out if it is ok to update to the latest version of ventura though, that's where I'm currently stuck.

Hope that helps!

@bagofcig
Copy link

@Aooga776 i could not pass the first command I get operation failed with error: not a known Dirstatus
I’m not sure what I’m doing wrong tried both variation.

@Aooga776
Copy link

@bagofcig so you used this command?

dscl -f /Volumes/Macintosh\ HD\ -\ Data/private/var/db/dslocal/nodes/Default localhost -passwd /Local/Default/Users/root

@Nisounas
Copy link

@bagofcig
Copy link

@Aooga776 yes, sure that’s what i have been trying.
image

@anktababa
Copy link

anktababa commented Apr 15, 2023 via email

@Vicki-Olesen
Copy link

M2 ventura how to remove mdm ?

https://github.com/Kaitiz/Bypass-MDM-Ventura?fbclid=IwAR21FSn00vhU2hNk5sxLRxsAI_XWvgqF1mbyh_OY7T3gdLqHxk0fEnNQs7w

Did anyone check this method with M2 an device and saw if it works?

@Vicki-Olesen
Copy link

Would like to know if there is any way to bypass MDM on an M2 MacBook pro.. many thanks

@Danricardolara
Copy link

I was able to enter into MacOS after bypassing, but once inside Ventura, I can’t actually add a different user. I tried to use both “System Administrator”, and “root” but neither work. Strangely other settings that need authentication work with the password I created, as well as logging into the machine.

image

@hellokuls
Copy link

"Will the device still be controlled after disabling DEP? Is it safe not to install the device management profile?"

@sire901
Copy link

sire901 commented Apr 22, 2023

HI COULD SOMEONE DIRECT ME IN THE RIGHT PLACE I HAVE A MacBook Pro 13-inch, 2020 AND I CANT SEEM TO GET PAST ACTIVATION LOCK AFTER ERASING MAC... ANY HELP IS GREATLY APPRECIATED

@Simmpa
Copy link

Simmpa commented Apr 22, 2023

What am I doing wrong ? Command not found. I did a reinstall of Ventura .. when is restarted I went into terminal but, I'm getting bash

IMG_0272

@Simmpa
Copy link

Simmpa commented Apr 22, 2023

.. and another prob. In recovery I erased the disc, then proceeded to install Ventura and before the install begins you must join a wifi network .. I guess this bypasses DEP
IMG_0273

@aviloveN
Copy link

Hi even after holding on recovery it still opens up this screen, any way to bypass this?
20230423_125104

@alucardness
Copy link

Hi even after holding on recovery it still opens up this screen, any way to bypass this? 20230423_125104

It's a bit late, your only option is another mac with Apple Configurator.

@Vicki-Olesen
Copy link

Hi even after holding on recovery it still opens up this screen, any way to bypass this? 20230423_125104

It's a bit late, your only option is another mac with Apple Configurator.

Could you please advise how to prevent/avoid this locking issue? As it happened to me before. Thanks

@aviloveN
Copy link

Hi even after holding on recovery it still opens up this screen, any way to bypass this? 20230423_125104

It's a bit late, your only option is another mac with Apple Configurator.

I have another mac, what exactly needs to be done with another mac? I got another MAC and scratching my head apparently

@aviloveN
Copy link

Hi even after holding on recovery it still opens up this screen, any way to bypass this? 20230423_125104

It's a bit late, your only option is another mac with Apple Configurator.

Could you please advise how to prevent/avoid this locking issue? As it happened to me before. Thanks

were you able to bypass this ?

@aviloveN
Copy link

My MBP M1 bypass MDM completely on MacOS 11.6. Can I upgrade to MacOS 13.3 via Setting? Do I need to bypass MDM again after upgrade? Thanks.

How did you bypass? Kindly help, thanks in advance

@aviloveN
Copy link

Hi even after holding on recovery it still opens up this screen, any way to bypass this? 20230423_125104

It's a bit late, your only option is another mac with Apple Configurator.

16822544005062759789331733032619

I get this on a second apple mac with Apple authenticator

@Vicki-Olesen
Copy link

Vicki-Olesen commented Apr 23, 2023

Hi even after holding on recovery it still opens up this screen, any way to bypass this? 20230423_125104

It's a bit late, your only option is another mac with Apple Configurator.

16822544005062759789331733032619

I get this on a second apple mac with Apple authenticator

What are the specs of your Macbook Pro? and installed OS version?

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