Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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...

share|improve this question
    
sudo segmentation fault <- I want this to work! –  JustSid Jan 31 '12 at 21:51
add comment

migrated from stackoverflow.com Jan 31 '12 at 21:54

This question came from our site for professional and enthusiast programmers.

marked as duplicate by slhck, studiohack Jan 31 '12 at 22:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers

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".

share|improve this answer
    
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. –  Jonathan Leffler Jan 31 '12 at 21:50
    
Better put than me, but the priviligies are 640 now, it should be changed to 440. –  user1131050 Jan 31 '12 at 21:51
    
See the edit... –  Macmade Jan 31 '12 at 21:53
    
THANK YOU SO MUCH –  renatoargh Jun 6 '13 at 0:58
add comment

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|improve this answer
add comment

Change user to root (su)

chmod 0440 /etc/sudoers
exit
sudo echo LOLHELLSYEAH
share|improve this answer
    
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. –  Jonathan Leffler Jan 31 '12 at 21:50
    
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 Jan 31 '12 at 21:53
    
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. –  benzado Jan 31 '12 at 21:54
add comment