LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 05: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 07:02 AM.
 
Old 02-25-2015, 06:49 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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, 07: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.
 
Old 12-20-2017, 07:10 AM   #4
manoranjan28
LQ Newbie
 
Registered: Dec 2017
Posts: 1

Rep: Reputation: Disabled
Sudoer

Quote:
Originally Posted by jojanmpaul View Post
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.
Try with your user first. If it does not work try with others or root with command below
/usr/local/bin/sudo su -
Give the password.

You can use the below command again. The old user having wrong info will be updated with below.

echo 'YOUR_USERNAME ALL=(ALL) ALL' >> /etc/sudoers
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:39 PM.

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
Open Source Consulting | Domain Registration