I have this line in my /etc/sudoers file:
Cmnd_Alias MSGES = /usr/bin/tail -* /var/log/*, /bin/more * /var/log/*, /bin/cat * /var/log/*, /bin/grep * /var/log/*
And I have this:
level2 ALL = NOPASSWD: MSGES
The object is to allow the level2 user the ability to read log files in the /var/log folder.
But it ain't workin'. Is this the wrong way to do this? Do I have to set rights on the file differently?
Here's the rights on /var/log/messages:
-rw-r----- 1 root root 174161 2011-10-31 15:30 /var/log/messages