csrutil disable
Restart computer
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/>
So that the changes take effect
Just wanted to share my experience with OS Mojave. The Terminal codes didn't end up working for me, and kept getting "file doesn't exist" when trying to move the files via Terminal (maybe I just couldn't figure it out). What did work for me was:
Restart into recovery
Terminal command: csrutil disable
Restart into normal user mode
created folders:
/System/Library/LaunchAgentsDisabled
/System/Library/LaunchDaemonsDisabled
drag and drop (copy) files into /System/Library/LaunchAgentsDisabled:
/System/Library/LaunchAgents/com.apple.ManagedClientAgent.agent.plist
/System/Library/LaunchAgents/com.apple.ManagedClientAgent.enrollagent.plist
drag and drop (copy) files into /System/Library/LaunchDaemonsDisabled:
/System/Library/LaunchDaemons/com.apple.ManagedClient.cloudconfigurationd.plist
/System/Library/LaunchDaemons/com.apple.ManagedClient.enroll.plist
/System/Library/LaunchDaemons/com.apple.ManagedClient.plist
/System/Library/LaunchDaemons/com.apple.ManagedClient.startup.plist
delete files (also delete from trash):
/System/Library/LaunchAgents/com.apple.ManagedClientAgent.agent.plist
/System/Library/LaunchAgents/com.apple.ManagedClientAgent.enrollagent.plist
/System/Library/LaunchDaemons/com.apple.ManagedClient.cloudconfigurationd.plist
/System/Library/LaunchDaemons/com.apple.ManagedClient.enroll.plist
/System/Library/LaunchDaemons/com.apple.ManagedClient.plist
/System/Library/LaunchDaemons/com.apple.ManagedClient.startup.plist
Restart into recovery
Terminal command: csrutil enable
Restart into normal user mode
ALL DONE!!!