I'm using Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-31-virtual x86_64) and changed the permissions of the "etc" directory to 444 (sudo chmod 444 etc).
sudo does not work.
I have installed Arch onto a USB key, using BTRFS.
The output of "sudo" is:
$ sudo
sudo: unable to stat /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
$ ls -l /etc/sudoers
-r--r----- 1 root root 2849 May 18 15:00 /etc/sudoers
$ lsattr /etc/sudoers
--------------- /etc/sudoers
$ strace -u ross sudo true
Recently I had to change the folder permissions of /usr folder. Now the whole sudo is not working.
Tried a million things but I can't restore my root access.
ubuntu@ip-10-252-139-101:~$ sudo su
sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quitting
Sadly I can't boot in restore mode because this is an AWS EC2 instance, I'm afraid I've screwed everything.
I need to sudo for one last time to start mysql service then dump a database.
I have changed the permissions of some system folders and now when i want to install a program it shows this error:
sudo: /etc/sudoers is world writable
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
Any help?
I kinda screwed up the /etc directory by running:
sudo chmod 417 /etc
Leaving me unable to use sudo:
sudo: can't open /etc/sudoers: permission denied.
sudo: no valid sudoers sources foundm quitting
Ive been trying to fix it via recovery mode but i'm not sure to what mode I should set it.
(I know sudoers is 0440, but this doesnt fix it because /etc is still messed up.)
Oh and for the future
Whenever I try to do anything at all that requires my password it returns this:
u7ur7l3@ubuntu:~$ sudo
sudo: /usr/lib/sudo/sudoers.so must be owned by uid 0
sudo: fatal error, unable to load plugins
u7ur7l3@ubuntu:~$
So I can't install anything from the Software Center / package manager or run any commands in terminal that require my password.
Following the wiki's advice, I installed ubuntu-zfs.
I am learning Linux for work, so am still a bit rusty on the edges.
I am needing to change the folder permission of folder /opt, and I know in Linux, you do the following:
chmod 775 /opt
I get a message under that saying:
chmod: WARNING: cannot change /opt/: Operation not permitted (error 1).
Does that mean I need SUDO permissions?