Linux - Server This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
05-31-2011, 09:41 AM
|
#1
|
LQ Newbie
Registered: Jan 2011
Distribution: Fedora 14
Posts: 26
Rep:
|
Sudoers will not work
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
Last edited by r2g2btru; 05-31-2011 at 09:45 AM.
|
|
|
05-31-2011, 11:04 AM
|
#2
|
Member
Registered: Sep 2005
Location: Sri Lanka
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441
Rep:
|
If your user account is already having sudo privileges (default case in Ubuntu), then run
$ sudo visudo
or,
$ sudo su -
# visudo
|
|
|
05-31-2011, 12:26 PM
|
#3
|
LQ Newbie
Registered: Jan 2011
Distribution: Fedora 14
Posts: 26
Original Poster
Rep:
|
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.
Last edited by r2g2btru; 05-31-2011 at 12:35 PM.
|
|
|
05-31-2011, 01:21 PM
|
#4
|
Member
Registered: Sep 2005
Location: Sri Lanka
Distribution: Fedora (workstations), CentOS (servers), Arch, Mint, Ubuntu, and a few more.
Posts: 441
Rep:
|
Try adding your user after the root entry.
Eg:
root ALL=(ALL) ALL
r2g2btru ALL=(ALL) ALL
It's not the ideal setup, but its probably the one you want if you just want basic sudo setup.
|
|
|
05-31-2011, 02:53 PM
|
#5
|
LQ Newbie
Registered: Jan 2011
Distribution: Fedora 14
Posts: 26
Original Poster
Rep:
|
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.
|
|
|
05-31-2011, 08:10 PM
|
#6
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep:
|
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.
|
|
|
05-31-2011, 08:28 PM
|
#7
|
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187
|
Without x permission, the directory is not searchable.
|
|
1 members found this post helpful.
|
05-31-2011, 10:14 PM
|
#8
|
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,647
|
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
Last edited by John VV; 05-31-2011 at 10:16 PM.
|
|
1 members found this post helpful.
|
06-01-2011, 12:45 AM
|
#9
|
LQ Newbie
Registered: Jan 2011
Distribution: Fedora 14
Posts: 26
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 03:17 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|