From sudo 1.9.X , onwards , in visudo , a fully-qualified path for sudoedit is now treated as error.
https://github.com/sudo-project/sudo/commit/635445d4714b0de19b56957ece3767a15800b62f
The sudo version you have in linux will be below than 1.9.X
------------------------------
Ayappan P
------------------------------
Original Message:
Sent: Thu February 17, 2022 06:16 PM
From: Santhosh Padiyath
Subject: sudo - not able to disable sudoedit
Trying to prevent user from editing sudoers once they have root privilege. The same syntax working on linux but error outs on AIX.
[root@tpolaunix0002d:/nfs/infra/aix/bin]# visudo
/etc/sudoers:111:113: sudoedit should not be specified with a path
%odin_cnsdDEVapp_a ALL=(root) NOPASSWD: NOEXEC: ALL,!/usr/bin/passwd *,!/usr/sbin/shutdown *,!/sbin/shutdown *,!/bin/sudoedit /etc/sudoers.d/*,!/bin/sudoedit /etc/sudoers
^~~~~~~~~~~~~
/etc/sudoers:111:145: sudoedit should not be specified with a path
%odin_cnsdDEVapp_a ALL=(root) NOPASSWD: NOEXEC: ALL,!/usr/bin/passwd *,!/usr/sbin/shutdown *,!/sbin/shutdown *,!/bin/sudoedit /etc/sudoers.d/*,!/bin/sudoedit /etc/sudoers
^~~~~~~~~~~~~
What now?
# lslpp -Lcq sudo.rte
sudo:sudo.rte:1.9.8.2: : :C: :Configurable super-user privileges runtime: : : : : : :0:0:/:
------------------------------
Santhosh Padiyath
------------------------------
#AIXOpenSource