1. Open the Root account
Open System Preferences and go to the Users and Groups panel, remember to open the small lock in the lower left corner of the panel and select "Login Options" in the panel. On the right side of the panel you will see "Network account Server", click on the "Join ..." button next to it, then click "Open Directory Utility" in the pop-up window. A new window will pop up, open the small lock in the lower left corner, then click "Edit" on the menu bar – "Enable root user" to set the root password in the popup window.
The above step is a bit verbose, you can press the key combination "SHIFT + COMMAND + G" in the Finder to go directly to the folder/system/library/coreservices and find "directory Utility" to open the root account.
Once enabled, you can log out of the system and sign in to Mac OS X with the Root account you just opened.
Close the Root account
The root account has the highest level of access in our daily life, and in order to avoid various security issues, we recommend that you close the root account after solving the problem with the root account. Close the steps similar to the above, just after opening the "directory Utility", click "Disable Root User" in the "Edit" menu.
2. Change the file's readable permission, file owner, etc.
Execute the following command
Chown Root:wheel/etc/sudoers
chmod 440/etc/sudoers
Wheel and staff user groups
In traditional UNIX systems, the wheel user group is the Administrators group, and only members of that group can get root permissions through SU. Of course, the group should be made special settings to achieve these restrictions.
Wheel has actually become synonymous with the Administrators group.
Staff is the system of all users, all users of the system are staff members, so the change of the group permissions of the file for the employees all users have the appropriate permissions.
Mac Normal User modified the/etc/sudoers file solution