There are several ways to disable MDM on Mac OS. If you don't know what they are, you can do a quick search on Google.
Anyway this is what needed to be done: Edit
(You might be asked for your password)
Then append these lines:
And DO NOT append this line: