How to solve error message on terminal when you execute command with sudo on Mac
1. Open terminal and make a copy of sudoers file
cp /etc/sudoers /etc/sudoers.bck
2. Check the current permissions
1. Open terminal and make a copy of sudoers file
cp /etc/sudoers /etc/sudoers.bck
2. Check the current permissions
ls -l /etc/sudoe*
result:
-rwxrwxrwx+ 1 root wheel 1563 Jul 17 11:07 /etc/sudoers
su
4. Change the permissions of file to -r--r---- using the command chmod 440 /etc/sudoers
5. Exit su
exit
6. Check again the permissions
ls -l /etc/sudoe*
result:
-r--r-----+ 1 root wheel 1563 Jul 17 11:07 /etc/sudoers