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 am running ubuntu 12.04 on i3 laptop. By mistake I changed the permissions and changed the user(from root) of /etc folder and I am getting a error when trying to use sudo like:

sudo: /etc/sudoers is made 0777, should be 0440
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

I have tried going to Recovery mode and root shell prompt and then I did following

chown root:root /etc/sudoers 
chmod 440 /etc/sudoers
chown -R root:root /etc/sudoers.d
chmod 755 /etc/sudoers.d 
chmod 440 /etc/sudoers.d/*

but after every command it shows:

Read only file systems and it does nothing. Thanks in advance for your help.
share|improve this question

1 Answer 1

up vote 2 down vote accepted

Remount the filesystem as read/write

mount -o remount,rw /

and run those chown/chmod again.

share|improve this answer
    
Thank you once again :) –  rupoJS May 6 '13 at 11:02

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.