Article 6KFZJ User is not in the sudoers file. This incident will be reported.

User is not in the sudoers file. This incident will be reported.

by
HTop
from LinuxQuestions.org on (#6KFZJ)
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.

What did I do wrong?

Sudo version is 1.9.5p2
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments