[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

setting up sudo for tail

Somebody mentioned on here that they always have an open terminal
running tail -f /var/log/syslog.  I thought that I might try doing
this, but since /var/log/syslog is only readable by root, I decided to
try setting up sudo.  I also want access to any log in /var/log.  This
is what I have so far:

Cmnd_Alias      TAIL = /usr/bin/tail -f /var/log/[a-z0-9.]*, \
!/usr/bin/tail -f /var/log/*..*, !/usr/bin/tail -f /var/log/.*
rhamph          ALL = TAIL

(linebreak inserted for ease of reading)
Now, that *does* let me view the logs.  But it also lets me do sudo
tail /var/log/syslog /etc/shadow, which is not so good.  I've also
figured out that the period in [a-z0-9.] is pointless, as * matches
any character, not a multiple of what's on it's left.

So my question: how do I set this up properly?

Adam Olsen, aka Rhamphoryncus

Reply to: