Sudo segmentation fault in Terminal

5,263

Solution 1

Log in as root and change the permissions on that file:

su

Will log you as root (will ask your password).
Then:

chmod 440 /etc/sudoers

To change the permissions.
Finally:

exit

To exit the root session.

You may also try to repair your disk permissions with Disk Utility.

EDIT

To log-in as root in a terminal, you will first need to "activate" the root user.
Open the Directory Utility.app application, in /System/Library/Core Services, and from the Edit menu, select "Enable root user".

Solution 2

As your administrative user, launch the Disk Utility from the Utilites folder in Applications. Select your disk. Use the Verify Disk Permissions and Repair Disk Permissions options to deal with the problem (with luck -- I haven't actually tried it).

Share:
5,263

Related videos on Youtube

Community
Author by

Community

Updated on September 18, 2022

Comments

  • Community
    Community over 1 year

    Possible Duplicate:
    Cannot do sudo: “/etc/sudoers is mode 0740, should be 0440”

    sudo: /etc/sudoers is mode 0640, should be 0440
    Segmentation fault
    

    Any time I am trying to do something which requires login as a super user, I get this error message; why do I get that? And what can I do about it? I am really clueless, I was also trying to install flink, but don't know how to...

  • joaquin
    joaquin about 12 years
    By default, on a Mac, you cannot login as root. I don't have a root password set on my Mac, and don't expect to. That means that su doesn't work, either.
  • joaquin
    joaquin about 12 years
    By default, on a Mac, you cannot login as root. I don't have a root password set on my Mac, and don't expect to. That means that su doesn't work, either.
  • Reinhardt Ratkas van Rooyen
    Reinhardt Ratkas van Rooyen about 12 years
    Better put than me, but the priviligies are 640 now, it should be changed to 440.
  • Macmade
    Macmade about 12 years
    See the edit...
  • benzado
    benzado about 12 years
    Try booting up with the Cmd and S keys held down, this puts the Mac in single-user mode and gives you a command prompt.
  • benzado
    benzado about 12 years
    Worst case: mount the disk on another Mac and change the permissions from there. You'll have to use Target Disk Mode or just yank the hard disk and plug it in to another computer.