Deleted .AppleSetupDone but it still takes me to login window!

MacJunior
Contributor III

Hey guys, 

 

I have an old Mac 2018 that I wanted to add to ABM, I deleted .AppleSetupDone 

sudo rm /var/db/.AppleSetupDone

and I thought I would get the setup assistant but no, instead I got the login window, after I enter the password of the account it logins then reboots again and so forth !!

it's like running in a loop, can't boot to the desktop and can't get the setup assistant !

Any ideas please?

6 REPLIES 6

piotrr
Contributor III

If the machine is encrypted, the first log-in is to decrypt the drive. 

What version of macOS was it running, do you remember? 
Wait, add to ABM, you mean with Configurator? I wasn't sure you could even do that with T2 chip computers? 

MacJunior
Contributor III

the Mac in question is running Ventura 13.2 and yes it has Apple T2 security chip "2018 Model" 

I'm trying here to add it to ABM using Apple Configurator without removing user's data but my issue now is that the setup assistant doesn't show up at all event after deleting AppleSetupDone !

piotrr
Contributor III

Sorry. I wasn't aware that was still even possible in Ventura. Might be that I was right to suspect that. 

mm2270
Legendary Contributor III

It sounds like you have encryption enabled on the Mac and that first password login is to decrypt the drive. Removing the .AppleSetupDone file doesn't bypass disk encryption.

And as for enrolling the Mac into ABM using Apple Configurator, I haven't tried this on an already set up Mac by just forcing the Setup Assistant screen to come up again like this. The only way I've done it is to wipe and reinstall the OS. One day I'll try what you're trying and see what the results are. It's possible enrollment like this will only work with a complete wipe and reinstall though.

In terms of getting out of the loop, I'm not sure what the right thing is to do here, but I would try booting into Recovery HD and, assuming encryption is on, try disabling FileVault if you can, and then reboot it to see if it gets out of that loop it's in. Good luck and let us know what happens.

MacJunior
Contributor III

@mm2270   yeah usaully I do it by wiping and reinstalling a fresh macOS but we have some Mac in production that are not in ABM so thought I might go around it by removing .AppleSetupDone => Restart => Add the Mac to ABM => complete setup assistant and create a temp account => run "profiles renew -type enrollment" => logout of that temp account => login as the original user and delete the temp account BUT that didn't work since I couldn't get the setup assistant to show up ... I managed to disable FV in macOS recovery but now I get to see JC login window for 3-4 seconds then it reboots again .. 

doesn't seem that removing .AppleSetupDone would force Setup Assistant to show up in Ventura unless i'm still missing something here!

MacJunior
Contributor III

An update: I managed to accomplish what I mentioned above by first unenrolling the device from Jamf & turning off encryption then deleting .AppleSetupDone ... all worked well.