LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-25-2015, 06:46 AM   #1
jojanmpaul
Member
 
Registered: Sep 2012
Location: Bangalore
Posts: 80

Rep: Reputation: Disabled
sudo: no valid sudoers sources found, quitting


Hello,

I am getting the follwoing error for Red Hat Enterprise Linux Server release 6.6

sudo su -
sudo: >>> /etc/sudoers: syntax error near line 118 <<<
sudo: parse error in /etc/sudoers near line 118
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

cd /etc/sudoers.d/
-bash: cd: /etc/sudoers.d/: Permission denied

Could you help me to figure it out. As a root user am able to access but as normal user it is not allowing to sudo su - command.

vi /etc/sudoers.d/access
username ALL=(ALL) NOPASSWD: ALL

Please let me know if any additional formation required.

Last edited by jojanmpaul; 02-25-2015 at 08:02 AM.
 
Old 02-25-2015, 07:49 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
This is why you should use visudo to edit /etc/sudoers -- it will warn you about syntax errors when you try to write the file. The error message is pretty obvious -- there's a syntax error around line 118 of your /etc/sudoers. You need to fix it before sudoers can run again. If you can't find the error, you can post that section of the config file. Since you're running RHEL, you're also assumedly paying for Red Hat support and you can also ask them to help you.
 
Old 02-25-2015, 08:01 AM   #3
jojanmpaul
Member
 
Registered: Sep 2012
Location: Bangalore
Posts: 80

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jojanmpaul View Post
Hello,

I am getting the follwoing error for Red Hat Enterprise Linux Server release 6.6

sudo su -
sudo: >>> /etc/sudoers: syntax error near line 118 <<<
sudo: parse error in /etc/sudoers near line 118
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

cd /etc/sudoers.d/
-bash: cd: /etc/sudoers.d/: Permission denied

Could you help me to figure it out. As a root user am able to access but as normal user it is not allowing to sudo su - command.

vi /etc/sudoers.d/access
username ALL=(ALL) NOPASSWD: ALL

Please let me know if any additional formation required.

Regards,
Jojan Paul
Hi all,

I have got solution for the same,

vi /etc/sudoers.d/access
username ALL=(ALL) NOPASSWD: ALL

there was one username in capital letter, I removed and issue got resolved.
 
  


Reply


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 sudoers sources found xjonquilx Linux - Software 4 09-18-2012 09:53 AM
[SOLVED] Need help with sudo and /etc/sudoers jonaskellens Linux - Newbie 7 11-06-2009 10:58 AM
sudo(/etc/sudoers) issue knockout_artist Linux - Newbie 2 03-24-2009 05:39 PM
Help with sudo and sudoers zeeple Linux - Newbie 2 12-06-2008 12:51 PM
sudo and sudoers syntax mikemrh9 Linux - Security 7 06-04-2005 08:54 PM


All times are GMT -5. The time now is 03:11 AM.

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