Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've been trying to install lamp server onto my ubuntu 12.04 LTS and i cannot get the sudo command to work. Been getting the following error everytime i hit/install anything with sudo.enter image description here

After performing the Operation suggested by @oli

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted
  1. Reboot into recovery. Hold Left Shift at boot, select "Other options" then pick the latest recovery mode.
  2. Pick "root shell prompt" when the recovery menu loads.
  3. Run the following:

    mount -o remount,rw /
    chown -R root: /etc/sudoers{,.d}
    chmod -R 440 /etc/sudoers{,.d}
    chmod 755 /etc/sudoers.d 
    reboot
    
share|improve this answer
    
thank you finally got it. I swear now i won't mess with the permissions. let alone leave it as it is. –  Kanthala Raghu Oct 14 '13 at 7:58
    
@KanthalaRaghu , it would make your question "more complete" if you mention in the question itself that you had modified the sudoers file or its permissions. In general, any supplementary information you add should be incorporated in the question itself. –  user25656 Oct 15 '13 at 3:04
    
I'll keep that in mind, thank you. –  Kanthala Raghu Oct 15 '13 at 4:06
add comment

You have to boot into the recovery mode to fix this problem.

Tutorial

In case 3 (Tutorial) instead of the chmod command, you need to use:-

chown root:root /etc/sudoers
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.