Thank you!!!!!  That was so simple, and yet, no matter where I tried searching, I could not come up with it!!!<br><br>It worked like a champ!<br><br>Tom<br><br>And, thanks again for the previous help ;-)<br><br><br><div class="gmail_quote">
On Wed, May 13, 2009 at 10:44 AM, Marc Powell <span dir="ltr"><<a href="mailto:marc@ena.com">marc@ena.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
On May 13, 2009, at 7:17 AM, Thomas Stearn wrote:<br>
<br>
> I have a Nagios server 3.0.6 running on Ubuntu 8.04 Server.  It is<br>
> monitoring all things fine on multiple targets except the one below.<br>
><br>
> On a certain target, I am trying to monitor my /var/log/auth.log<br>
> file for bad activity, such as failed password attempts, or attempts<br>
> to login as invalid users, etc.<br>
><br>
> I am trying to do this via the check_log plugin via nrpe, but, I get<br>
> a "Log check error: Log file /var/log/auth.log is not readable!"<br>
> when the server checks on it.<br>
><br>
> The easiest way I have to reproduce the error is the following<br>
> manually executed command from the host server:<br>
> /usr/local/nagios/libexec/check_nrpe -H target -c check_badpw<br>
><br>
> I know that it means that the file cannot be opened during the<br>
> check, but, I don't understand why.<br>
><br>
> ls -l of /var/log/auth.log:<br>
> -rw-r----- 1 syslog adm 1590863 2009-05-12 10:47 /var/log/auth.log<br>
><br>
> In /etc/groups, I have added the "nagios" user to the adm group, so<br>
> I would think it should work.<br>
<br>
</div>[chop]<br>
<div class="im"><br>
> So, I know it will work if I loosen the permissions on /var/log/<br>
> auth.log, but, I'd prefer to keep them as tight as possible.<br>
><br>
> When I am logged into the target as nagios and execute "id", I get,<br>
> uid=5308(nagios) gid=5309(nagios) groups=4(adm),5309(nagios)<br>
><br>
> When I embed "id" into the check_log script, I get:<br>
> uid=5308(nagios) gid=5309(nagios)<br>
><br>
> so, it would seem that it does not inherit the groups as I would<br>
> assume it would.<br>
<br>
</div>I'm certain this was recently discussed but my search-fu is weak this<br>
morning. It might have been on -devel or nagios-plugins though... I<br>
didn't follow closely but the gist of it (I believe) is that xinetd<br>
drops/ignores any secondary groups the user is a member of before<br>
starting the server. No secondary groups, no access in your case.<br>
Looking at my xinetd.conf man page, I see the following which may<br>
help. You may also have better search-fu than me and can find the<br>
original thread...<br>
<br>
        groups           Takes  either  "yes" or "no".  If the groups<br>
attribute<br>
                         is set to "yes", then  the  server  is<br>
executed  with<br>
                         access  to  the groups that the server's<br>
effective UID<br>
                         has access to.  If the  groups  attribute<br>
is  set  to<br>
                         "no",  then  the  server  runs  with  no<br>
supplementary<br>
                         groups.  This attribute must be set to "yes"<br>
for  many<br>
                         BSD  systems.   This  attribute  can  be<br>
set  in  the<br>
                         defaults section as well.<br>
<br>
<br>
--<br>
Marc<br>
<br>
<br>
------------------------------------------------------------------------------<br>
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your<br>
production scanning environment may not be a perfect world - but thanks to<br>
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700<br>
Series Scanner you'll get full speed at 300 dpi even with all image<br>
processing features enabled. <a href="http://p.sf.net/sfu/kodak-com" target="_blank">http://p.sf.net/sfu/kodak-com</a><br>
_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br>
</blockquote></div><br>