I have a problem:
I don't have a root password on my mac. I just have an Admin account, which can do stuff using sudo
. Now, I wanted to add my normal user to the /etc/sudoers
file as well. Since it did not let me write to that file (even writing using sudo), I did this:
sudo chmod u+w /etc/sudoers
That worked. But since then I can't do any sudo
command anymore on my system. It complains that /etc/sudoers
has the wrong mode:
$ sudo touch /etc/sudoers
sudo: /etc/sudoers is mode 0740, should be 0440
Segmentation fault
It sounds like a bad joke, because now I can't even change the mode back to 0440
:
$ sudo chmod 0440 /etc/sudoers
sudo: /etc/sudoers is mode 0740, should be 0440
Segmentation fault
Is there any way to fix this situation? I need to get my sudo
abilities back.
sudo
rights, you could add them to thewheel
group. You might be able tochmod
the file, running in single user mode, after enteringmount -uw /
. (cough, backup!, cough)