Mac Normal User modified the/etc/sudoers file solution

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.