Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-15-2012, 04:15 PM   #1
Registered: Jul 2011
Location: FL, USA
Distribution: Linux Mint 13
Posts: 169

Rep: Reputation: Disabled
no valid sudoers sources found

I was trying to create an SSH tunnel the other day and somehow my sudoers config got messed up.

When I try to run sudo, this is what I get:

jonquil@jonquil-HP-Pavilion-dv6-Notebook-PC ~ $ sudo apt-get update
sudo: >>> /etc/sudoers: syntax error near line 29 <<<
sudo: parse error in /etc/sudoers near line 29
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
I would post the contents of my sudoers file, but unfortunately it says it's too busy when I try to open it, so I'm going to have to restart. However, when I initially opened it there was no entry for my user, so I added the line "jonquil ALL=(ALL) ALL" to it and restarted. It's still doing the same thing.

I've also tried "pkexec chmod 0440 /etc/sudoers".

Last edited by xjonquilx; 09-15-2012 at 04:20 PM.
Old 09-15-2012, 10:42 PM   #2
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
How did you add yourself to the /etc/sudoers files, using a text editor, or with the visudo utility.

If you did not use visudo, try it with that. This will check the /etc/sudoers file for errors before saving it.
Old 09-16-2012, 02:12 AM   #3
Senior Member
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,734
Blog Entries: 12

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
/etc/sudoers on my system
# cat /etc/sudoers
# This file MUST be edited with the 'visudo' command as root.
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
# See the man page for details on how to write a sudoers file.
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
# ls -la /etc/sudoers
-r--r----- 1 root root 669 Jan 11 2012 /etc/sudoers
Old 09-16-2012, 10:45 AM   #4
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870
If sudo is the only way to get root rights on your system then you have to fix that syntax error using a live-CD. This is the reason why you should always use visudo to edit that file, it will prevent you from saving the file when it contains syntax errors.
Old 09-18-2012, 09:53 AM   #5
Registered: Jul 2011
Location: FL, USA
Distribution: Linux Mint 13
Posts: 169

Original Poster
Rep: Reputation: Disabled
I used visudo. I tried taking out the line with my username and instead took the comment off the line that gives all administrators access. This worked. No idea why my username wouldn't work, but at least I can use sudo again.

I also DO have a known root password on my system. I've had so many weird things happen with sudo and user groups lately in different distros I don't feel comfortable without knowing the root password.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
No valid devices/drviers found Bharat Kumar pankaj Linux - Server 1 04-21-2009 08:53 PM
VIA (0) No valid modes found n0idx80 Slackware 4 04-12-2008 05:58 PM
No valid devices were found jerryau Linux - Software 3 01-27-2008 05:27 AM
No valid device were found...... burnaws Linux - Software 3 08-22-2006 08:12 AM
no valid devices were found..... joeslazenger Linux - Software 3 08-22-2003 11:44 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:48 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration