User is not in the sudoers file. This incident will be reported.
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.
User is not in the sudoers file. This incident will be reported.
Hello,
I use RHEL 8.9 update today.
I joined my Active Directory domain animals.internal with realm join.
I permitted users of group koalas@animals.internal to log on through SSH.
Then the user pete (member of koalas) is able to log on on RHEL server.
I created a file called /etc/sudoers.d/animals.internal with the following text:
%koalas@animals.internal ALL=(ALL) NOPASSWD:ALL
But when pete runs "sudo su -", he gets pete@animals.internal is not in the sudoers file. This incident will be reported.
I checked the syntax and it's ok.
visudo -c /etc/sudoers.d/animals.internal
/etc/sudoers.d/animals.internal: parsed OK
If I move the line %koalas@animals.internal ALL=(ALL) NOPASSWD:ALl on /etc/sudoers file, it works.
/etc/sudoers last line is #includerdir /etc/sudoers.d/
The command ls -la /etc/sudoers.d/animals.internal
returns -r--r-----
Selinux is disabled.
in that case I think the permissions on that file is not accepted by sudo. Or something similar happened.
by the way sudo and su should not be used together (but it is another issue).
That seems like a "lazy hack" on the part of the original programmer in question. Why not use another preceding character, like '$'? Oh well, water under the bridge now.
That seems like a "lazy hack" on the part of the original programmer in question. Why not use another preceding character, like '$'? Oh well, water under the bridge now.
You say "lazy hack." I say it's just dumb. I wonder what possessed that developer? <sigh>
In the file I keep the original line
#includedir /etc/sudoers.d/
I wrote here as "#includerdir /etc/sudoers.d/" but it's "#includedir /etc/sudoers.d/" indeed.
Maybe I'll do some syscall tracking to address this strange behavior.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.