You are not logged in.
Pages: 1
Topic closed
I have an entry in a file called losetup that is located in /etc/sudoers.d. Until recently when I would run "sudo losetup", sudo would use the permissions configured in the /etc/sudoer.d/losetup file.
Now it is not working anymore. It appears that sudo is not reading the contents of the /etc/sudoer.d/losetup file. If I comment out this file and add it's contents to the standard sudo file using visudo, then everything works ok.
Any ideas why sudo is not accessing sudoers.d?
The code that I'm using in the losetup file is as follows:
gumper ALL=NOPASSWD: /sbin/losetupReady yourselves, ready yourselves
Let us shine the light of Jesus in the darkest night
Ready yourselves, ready yourselves
May the powers of darkness tremble as our praises rise .... Casting Crowns-Until The Whole World Hears.
Offline
Maybe the syntax is wrong.
https://wiki.archlinux.org/index.php/Sudo#Using_visudo
^ I wonder if you can change this alias to edit (with a sanity check) the /etc/sudoer.d/losetup instead of /etc/sudoers. Hmmm... But why do you need a separate file for anyway? I thought the whole point of the rc.conf file (which is specific to Arch and to *BSD) was to bring several settings in one place, instead of scattered across the system.
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
Maybe the syntax is wrong.
I don't think that is the issue as it worked correctly before. Plus when I add the exact same lines to the /etc/sudoers file, it works ok.
But why do you need a separate file for anyway? I thought the whole point of the rc.conf file (which is specific to Arch and to *BSD) was to bring several settings in one place, instead of scattered across the system.
From what I've read my understanding is that it's better to use sudoer.d and keep the /etc/sudoers file unchanged. The files in /etc/sudoers.d are not changed when upgrades or changes to sudo are made. Whereas /etc/sudoers could be changed.
Ready yourselves, ready yourselves
Let us shine the light of Jesus in the darkest night
Ready yourselves, ready yourselves
May the powers of darkness tremble as our praises rise .... Casting Crowns-Until The Whole World Hears.
Offline
Nah. I'm still using the exact same /etc/sudoers file (permissions and all) from the install I did 3 years ago on a different computer. The sudo package has been updated several times since then. No issues whatsoever.
Have you tried rebooting?
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
Yes, I tried rebooting. Same results.
Ready yourselves, ready yourselves
Let us shine the light of Jesus in the darkest night
Ready yourselves, ready yourselves
May the powers of darkness tremble as our praises rise .... Casting Crowns-Until The Whole World Hears.
Offline
Just a note:
sudo will read each file in /etc/sudoers.d, skipping file names that
end in ~ or contain a . character ...
This solve my sudoers.d/ file not working problem, found here:
http://bugs.centos.org/view.php?id=5017
Hope this helpful.
Offline
@fwolf, that is good information in general, but if you read the thread, you would have seen that the file in question is /etc/sudoers.d/losetup (I see no ~ or . there).
Offline
Also, since he's new here he might want to read the forum rules as this is a bit of a necrobump. https://wiki.archlinux.org/index.php/Forum_Etiquette
Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz
Offline
A...as this is a bit of a necrobump. https://wiki.archlinux.org/index.php/Forum_Etiquette
A bit old. but relevant. Leaving open...
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
I had the same problem. Turned out there was a group setting in the sudoers file, after the include statement, that is overwriting the permissions set in the file included from /etc/sudoers.d
eg
#includedir /etc/sudoers.d
%group ALL=(ALL) ALLif the user, is part of the group, then the specific user permissions set in the included file will be trashed by the group statement in sudoers
Offline
Offline
Pages: 1
Topic closed