Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have tried several things to attempt to fix my sudoers file however it is still coming up with errors. The error says
sudu: can't open /etc/sudoers: permission denied
sudo: no valid sudoers sources found, quitting
my permissions for /etc/sudoers are -r--r-----
my permissions for /etc are drw-r--r--
my permissions for /usr/bin/sudo are -rwsr-xr-x
the sudoers configuration file is set to the default as I have ran a dpkg on it, have also uninstalled and reinstalled it, and went over the configuration file ensuring it looked like the defaults I had seen online. Could somebody please help me get this fixed I have been trying everything to get this to work, and have used vast amounts of google research but to no avail. Thank you.
By the way the pertinent information from my uname -a is 2.6.35-28-generic-pae #50-Ubuntu SMP i686 GNU/Linux
Yeah sudo won't even work from root. It has the default configuration, and I have tried it from a user that I added to the sudo group, and I still get the same error. I can edit the configuration file using visudo from root though. I am attaching a copy of my configuration file.
I tried adding the user manually like that but it still doesn't work, remember it doesn't even work with root, the issue is whatever is causing this error code "sudu: can't open /etc/sudoers: permission denied
sudo: no valid sudoers sources found, quitting" I tried to check /var/log/messages and /var/log/secure to figure out what is causing this error but to no avail, is there a log specific to sudo, or is there a way to make sudo log is errors in a specific file? Does anybody know how to fix this issue, its been causing me headaches, it should be simple but for some reason everything I try fails.
Are you sure that your /etc directory's permissions are 0644? My /etc directory is 0755 (drwxr-xr-x) - when I set a directory to 0644 and try to list the files I get the same permission denied error you described.
r2g2btru
Did sudo ever work?
fedora dose NOT set it by default nor uses it by default
Quote:
Yeah sudo won't even work from root
so you used the not recomended fedora hack to allow root to loggin into the GUI ( gnome/KDE)
if so that hack can have unknown bad consequences , like things NOT WORKING .
or
sudo dose not work from the terminal after su -
but if this -- why???
to edit that file
run it as root
Code:
su -
--- your root password when asked ---
vi /etc/sudoers
Thank you so much that resolved my issue. I figured it was something that simple, I just couldn't figure it out, I tried all the more difficult steps first like dpkg, and reconfiguring, and so on. Thank you for your assistance. The other guy that was working on this server had switched these permissions in his attempt to get ftp working, which he failed at, in the end I got sftp and ssh working and have been trying to get sudo to work for a week. Thank you for your assistance.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.