Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sudoers is world writable error [closed]

Tags:

sudo

ubuntu

neo4j

I changed the /ect file permissions on Ubuntu 12.10 so that i could edit bash.bashrc so that neo4j can see the JVM but now I am getting errors when i try run the neo4j server

I entered the code below and I managed to edit bash.bashrc but now i cant use sudo at all!

sudo chmod -R ugo+rw /ect

sudo -u neo4j /home/neo4j-community-1.8/bin/neo4j start
sudo: /etc/sudoers is world writable
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

I read a forum and a guy said I need to re-insatll ubuntu again, I hope this is not the case? Please HELP!!

like image 907
Mike Barnes Avatar asked Dec 19 '12 11:12

Mike Barnes


People also ask

How do I fix sudoers error?

The result can be an impaired instance that can't run sudo su or commands that require privileged user access. To fix this syntax error, stop the instance, detach its root volume, attach it to a recovery instance, mount the root volume as a secondary volume, and then revert the changes to the sudoers file.

What permission should sudoers file have?

The term “Sudo” means substitute user, and do. It is a program used for managing of user permission based on a system configuration file. It allows users to run programs with the privileges of another user, by default, the superuser. The program is supplied for most UNIX and Linux-based operating systems.


1 Answers

I think i have sorted it out using this command

pkexec chmod 0440 /etc/sudoers

I can now do

sudo -s
root@ubuntu:~#

Is this a good enough solution to the problem?

like image 184
Mike Barnes Avatar answered Oct 01 '22 08:10

Mike Barnes