I want give a user "sar" permission, so I modify the sudoers file: unix1 is the group for users can use sar command
Cmnd_Alias RUN_SAR = /usr/sbin/sar
User_Alias UNIX1_USERS = %unix1
UNIX1_USERS ALL = NOPASSWD:RUN_SAR
However, when I run sar command, it shows:
$ sar 1 4
sar: The file access permissions do not allow the specified action.
grial
2
sudo /usr/sbin/sar 1 4
Though, perhaps the use of parameters might still produce errors... Check your sudo manpages for more info...
Regards.