When I try to use sudo, I get this error message.
Please help!Code:sudo: /etc/sudoers is owned by uid 1000, should be 0 sudo: no valid sudoers sources found, quitting
When I try to use sudo, I get this error message.
Please help!Code:sudo: /etc/sudoers is owned by uid 1000, should be 0 sudo: no valid sudoers sources found, quitting
CPU: AMD FX 8120 8-Core Black Edition OC'd to 4.3GHz | Motherboard: Gigabyte GA-990FXA-UD3 | Graphics: Twin Radeon 7870's | Memory: 16GB G.SKILL Ripjaw Series DDR3 1600
did you take ownership of your sudoers file? lets restore it to its default ownership and permissions.
ok, first open a terminal as root, by hitting Alt + F2, and entering
then in the shell that pops up, enter:Code:gksu gnome-terminal
then open a new terminal (however you usually do it) and see if sudo works again.Code:chown root:root /etc/sudoers chmod 440 /etc/sudoers
remember, always use visudo to edit your sudoers.
https://help.ubuntu.com/community/Sudoers
Last edited by doas777; June 1st, 2011 at 12:55 AM.
Things are rarely just crazy enough to work, but they're frequently just crazy enough to fail hilariously.
Nice idea, but I think if sudo does not work, neither will gksu, so I suspect the command you suggest using gksu won't work either.
I think you may need to do all this from recovery mode, so from grub choose that option (usually second in the grub menu), go to a command line and then run those commands direct from the command line interface that you will get.
DISTRO: Xubuntu 16.04-64bit --- Code-tags --- Boot-Repair --- Grub2 wiki & Grub2 Basics --- RootSudo --- Wireless-Info --- SolvedThreads
Can youand then chown the file?Code:su -
Last edited by redbikemaster; June 1st, 2011 at 01:30 AM. Reason: Needed to give appreciation where it is due!
CPU: AMD FX 8120 8-Core Black Edition OC'd to 4.3GHz | Motherboard: Gigabyte GA-990FXA-UD3 | Graphics: Twin Radeon 7870's | Memory: 16GB G.SKILL Ripjaw Series DDR3 1600
usually when I get messages about sudo not working (usually a host name not found in the hosts file), gksu still works for me. if the op is lucky, that is the case, if not, recovery mode is the way to go.
@op, here is what your permissions should be for /etc/sudoers and /etc/sudoers.d/
so based on this, try these modified commands:Code:user@host:~$ ls -al /etc | grep sudoers -r--r----- 1 root root 609 2010-05-31 14:53 sudoers drwxr-xr-x 2 root root 4096 2011-01-22 00:21 sudoers.d user@host:~$ ls -al /etc/sudoers.d total 20 drwxr-xr-x 2 root root 4096 2011-01-22 00:21 . drwxr-xr-x 146 root root 12288 2011-05-31 02:10 .. -r--r----- 1 root root 819 2010-04-13 13:37 README
recovery mode works as well as any other root shell.Code: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/*
Last edited by doas777; June 1st, 2011 at 02:05 AM. Reason: updated command to ensure dir permissions are right.
Things are rarely just crazy enough to work, but they're frequently just crazy enough to fail hilariously.
Done. And fixed.
Thread is now marked as solved!
CPU: AMD FX 8120 8-Core Black Edition OC'd to 4.3GHz | Motherboard: Gigabyte GA-990FXA-UD3 | Graphics: Twin Radeon 7870's | Memory: 16GB G.SKILL Ripjaw Series DDR3 1600
Hey there I am having the same issues but when I do what needs to be done it says the files are read only. I am not sure how to fix my issue.
Ubuntu 13.04
AMD Phenom II X6 1100T
Asus M3N-HT Deluxe
OCZ 8GB Of Ram
"the files are read only"
Edit: even after copying that I misread it as ownership...my reply was bogus, but it won't let me delete it (?), so maybe try "sudo chmod +r filename" ... via LiveCD/whatever, then the others.
Edit2: if that doesn't work, make sure the disk isn't mounted read-only (use gparted or palimpsest).
Last edited by flemur13013; March 27th, 2012 at 05:43 PM.
I am facing the same problem, gksu is not opening. Getting this msg repeatedly.
sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
Kindly let me know what I can do. Tried all soln., none found working.
TY.
Bookmarks