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.


Similar Content



Sudo Issue

When I place following line in /etc/sudoers
tom ALL=NOPASSWD:/sbin/service tomcat6 start

and..
# su - tom
# sudo -s
I get following message

Sorry, user tom is not allowed to execute '/bin/bash' as root on example.com

I did not understand can some make me understand why I am getting this message.


Thank you

Why Should I Always Use Chmod When Not As A Root User

System Info:

I have normal user in CentOS 7 whose name is "mostafa" (the name of the account).

I naturally have another user called root with all privileges. User "mostafa" is put into sudoers file, too.

The OS is installed in VmWare, so the system is all mine.

Problem:

Now I create a file with touch file.sh and put a command in it, but when I want to run it with Code:
sudo ./file.sh

, an error is shown that the command Code:
./file.sh

does not exist. But if I Code:
 sudo chmod 777 ./file.sh

then it gets run. My question is that, why should I use Code:
chmod 777

when I myself have created the file, and I am in sudoers.

Can anyone explain me why shuold I still use Code:
sudo chmod 777

when the creator of the file is me.

Username Not In The Sudoers File

Hi all,
when i try to run any sudo command , it is not running
instead it gives
"username not in the sudoers file".


it is problem in my redhat computer

Thanks

Pon

Sudo Is Can Not Find Program / Path Related Issues

I am toying around with a LFS system and I am suddenly having trouble with sudo not finding binaries in the standard superuser only binary dirs (/sbin /usr/sbin). I am using sudo version 1.8.10p3. The sudoers file parses correctly and I did not modify except to allow users in the wheel group to be able use sudo to call any command. So I imaging something is wrong with the $PATH variable but I am not sure on what it is.

Pros And Cons Of SUDO Vs Wheel

So right now in some of my servers, some of my users are in the Wheel group and then I have some users who fall under /etc/sudoers. Don't have any consistency, however I want to change that.

I know that wheel group is legacy.

SUDO gives an audit trail I believe under /var/log/secure.

I'm wondering what others have experienced and setup which worked better in the long run, place users either in wheel group or in SUDO?

How To Get Around Tar'ing Up Files You Don't Have Permissions?

I would like to tar up some system logs with core files as a normal user through a script. However these core files are owned by root.

Of course I get "cannot read directory ...: Permission denied"

Is there a good way to grab these core files through a script? From searching around, I get that the best way is to modify the sudoers file, then run the script with sudo. Is this considered the safest and best way?

Thanks!

Fedora Mate Terminal

I have installed Berryboot on a Raspberry Pi and at present am running Fedora 21 Mate. I opened the Mate terminal but cannot seem to do anything with it. I tried running 'sudo apt-get update' and keep getting the message ''myname' is not in the sudoers file This incident will be reported'. I have no idea what to do.
Any help would be appreciated.

Brian

How To Run A "sudo" Script Without Password

Hi all,
I have a script where every line needs to be prefixed with sudo.
I was advised to run it as $ sudo /path/to/file.sh

This script needs to be scheduled in crontab to run. If I run it as above, will I be prompted for a password?
Also, one of the lines in the script is;
scp -r root@rem_server:/source/dir /local/dir
Does that mean I will have to provide two passwords: one for sudo and one for root?

Thanks,

Write Permissions To External Drive

I have an external disk but I can only write to it using sudo, not as my normal user.

The commands I've issued a
Code:
sudo mkdir /media/USBSSD
sudo mount -t auto /dev/sda1 /media/USBSSD
sudo chmod 777 /media/USBSSD
sudo mkdir /media/USBSSD/share

How can I set it up so that other users can write to it?

Lsof -i Issue

Hello,

I would like to use the lsof -i command without a privilege elevated user, however it doesn't work, the output is null. It does only work when I sudo it. On another server, I've got it working perfectly, without the user being root or having to use sudo (web user). How would I be able to proceed ?
Linux - Ubuntu 14.04.

Thanks.