Parental Controls was enabled for the only administrator user of my mac (as a result, this admin was converted to a managed user). When I tried to install some software later, I was asked to enter an administrator username and password, which I no longer had.
The only solution seems to be adding an administrator user. There are many discussions on the web. On my Sierra 10.12.6, the process is a bit different from others:
- Press power button, and quickly press and hold CMD + S to enter Single User Mode (i.e. root in console);
- The problem I encountered is, after Step 1, the screen flashes an error message “BuildUser(): error building a user of type xxx“, and then shows the normal user login window. After a few tries, I found I need to enter the password of a current user, and then the system enters Single User Mode. (Update: this is because FileVault is turned on, ref: https://support.apple.com/en-us/HT201573);
- In Single User Mode, mount the startup drive: /sbin/mount -uw /
- Then remove (or I think better rename) file: rm /var/db/.applesetupdone
- Reboot: reboot
- After rebooting, the system shows the login window again. Enter the password for the current user, and then the system will go through the process of creating a new admin user (like setting up the Mac for the first time).
Some other words: it seems the above process can be used to bypass parental controls (?).