<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:1763993091;
        mso-list-type:hybrid;
        mso-list-template-ids:1088984814 1691113804 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:5;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Calibri","sans-serif";
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi Paul. <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> I really have no idea if this might be the problem, but it
is an easy test to do.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I would suggest trying to run the webinject from the command
line like you have been but add a minus sign in the “su”:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>e.g. sudo su – nagios<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>The minus sign will force it to become more like a true login (the
way cron or Nagios would likely run it) and not potentially carry over your
current PATH and other environment variables.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><span
style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>         
</span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Brent<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div>

<p class=MsoNormal><o:p> </o:p></p>

<div>

<p class=MsoNormal><o:p> </o:p></p>

<div>

<p class=MsoNormal>On Mon, Jun 7, 2010 at 1:17 AM, PRP <<a
href="mailto:f.hugh@comcast.net">f.hugh@comcast.net</a>> wrote:<o:p></o:p></p>

<p class=MsoNormal>Well after some work I found a few issues with the <a
href="http://webinject.pl" target="_blank">webinject.pl</a>  script that<br>
I introduced.  Anyone new to this world like me if you need to run tests
as<br>
the nagios user use "sudo su nagios"  That will give you a shell
running<br>
under the nagios user.  That took me some time to figure that out.<br>
Unfortunately, that did not solve my problem.  I can run my script under
the<br>
nagios user without issue, but if I allow the service to run it in the same<br>
nature, it fails.  I am perplexed so if anyone has any ideas I would
greatly<br>
appreciate it.<o:p></o:p></p>

<div>

<p class=MsoNormal><br>
-----Original Message-----<br>
From: <a href="mailto:f.hugh@comcast.net">f.hugh@comcast.net</a> [mailto:<a
href="mailto:f.hugh@comcast.net">f.hugh@comcast.net</a>]<br>
Sent: Friday, May 28, 2010 12:04 PM<br>
To: <a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><o:p></o:p></p>

</div>

<div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'>Subject: [Nagios-users] Nagios
and a custom <a href="http://webinject.pl" target="_blank">webinject.pl</a><br>
<br>
   We just deployed a new site that requires client certificates so I
found<br>
a discussion thread on how to make a few changes to the script so that it<br>
would use the client certificate that I specified.  I left the original<br>
script intact along with all the nagios configs and named this new script<br>
<a href="http://webinjectcert.pl" target="_blank">webinjectcert.pl</a>.  I
wanted 2 separate scripts and configs so that I did not<br>
disrupt what I already had running successfully<br>
   The new script works perfectly as long as I run it manually as
sudo.<br>
The problem is when I configure it for nagios with the same script, config<br>
file, and test case, it returns results that claim it could not log onto the<br>
site.  I have enabled debugging in the nagios.cfg, but I just can't see
what<br>
the problem is.  I looked at the permissions on the new script and<br>
certificate to make sure that wasn't it and they look fine.  I am not
really<br>
sure how to run it as the nagios user since I can't remember what the<br>
password is and don't want to make a mess and change it.<br>
   Any ideas?<br>
   Paul<br>
<br>
<br>
<br>
<o:p></o:p></p>

</div>

</div>

</div>

<p class=MsoNormal><o:p> </o:p></p>

</div>

</div>

</div>

</body>

</html>