I created one sudoer conf(testSudoers) in /etc/sudoers.d.
cat testSudoers we can see
User_Alias DEVGRP=bqdev1, bqdev2, bqdev3
Cmnd_Alias RDOE_CMD=/bin/su - -c /usr/sbin/lsof *
## Allow dev group to run selected commands
DEV ALL=NOPASSWD:DEVGRP
Now after switch to bqdev1, and run command
[bqdev1@devsandbox ~]$ sudo su - -c "/usr/sbin/lsof /var/log/bqt/monitor13211.out"
[sudo] password for bqdev1:
This looks like the sudoer entry in my /etc/sudoers.d/testSudoers does not work directly.
But the same case works on Redhat 7 and Redhat 8.
Kindly advise.
Thanks
Boyka