in reply to sudo setting to read auth log

What's the permission of /var/log/authlog? What happens if you run this when logged in as root? How does your sudo config look like? Are you using any ACL on the file? Are there any OS level roles that come in play?

Replies are listed 'Best First'.
Re^2: sudo setting to read auth log
by BradV (Sexton) on Apr 16, 2012 at 15:34 UTC

    The permission is 600. Running it as root works fine. I have in /etc/sudoers:

    Host_Alias THIS=thishost User_Alias BB=bbuser Cmnd_Alias BB_C=/usr/local/bbuser/ext/bb-audit.pl, /usr/bin/perl BB THIS=NOPASSWD:BB_C

    No ACL or roles are involved.

    The bash script just runs

    sudo /usr/local/bbuser/ext/bb-audit.pl

    I've even tried putting in "/usr/bin/perl" after the sudo. It still fails when trying to open the log file. Doing a sudo -l as the bbuser does show that bbuser can run as root those commands above. So, I don't believe it is an "error" in sudo.

      Then I don't know; my Solaris knowledge is too rusty. It doesn't look like a Perl problem though -- perhaps you're better off asking the question in a Solaris forum.
        Roger that. Thanks!