Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


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

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

Your Answer


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.