1

Terminal

This is what happens when i use sudo.

Plus I can't update Ubuntu and I can't open the Software Center.

9
  • 2
    The error message clearly tells you the problem. Fix the file permissions on your system. Why did you change them in the first place?
    – dobey
    Jan 12, 2016 at 22:45
  • Seems like your /etc/sudoers file (the one which controls who can use root privileges) had its permissions messed up. If you have an Ubuntu (or another GNU/Linux) live media I can give an answer. Jan 12, 2016 at 22:46
  • @dobey If he can't use sudo how would he do it? Root's password is unwritable by default in Ubuntu. Jan 12, 2016 at 22:47
  • what is the original file permission and how do I change it
    – Bobj2008
    Jan 12, 2016 at 22:47
  • I did not change it
    – Bobj2008
    Jan 12, 2016 at 22:49

2 Answers 2

6

sudo is unuseable, but you still have pkexec.

So:

pkexec chmod 440 /etc/sudoers
3
  • @Bobj2008 No problem :). You may accept this answer by clicking on the tick under the answer's score to indicate that this answer solved your problem: askubuntu.com/help/accepted-answer.
    – kos
    Jan 12, 2016 at 23:07
  • Uh oh... i.stack.imgur.com/HerYz.png
    – Bobj2008
    Jan 12, 2016 at 23:12
  • @Bobj2008 Ok pkexec chmod 755 /etc/sudoers.d should fix that as well, however that's not normal. Did you run some strange command recently? Let me know if pkexec chmod 755 /etc/sudoers.d fixes that for good, however be aware that your installation looks corrupted. There might be other folders / files with the wrong permissions, or even worse things. If you remember having run some command which changed some permissions recursively please post it.
    – kos
    Jan 12, 2016 at 23:18
1

Okay, so your main problem is that /etc/sudoers is "writable." as stated by that error message you were getting

chmod 440 /etc/sudoers

that changes the file permission so that it isn't "global writable" and rather just readable to root.

also ensure that the file is owned by root

ls -l /etc/sudoers

that should give you something that looks like

-r--r----- 1 root root     745 Feb 10  2014 sudoers

the -r--r----- root root is the important part. If it's different, then you'll have to change the files ownership, but I doubt that could get screwed up.

I'm thinking that should fix your problem. Try that and let me know if it doesn't work.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .