<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:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>RE : [Nagios-users] Logged in as ? or Sorry, but you are not authorized
to commit the specified command.</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Tahoma;
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

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

<div class=Section1>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'>I already have that<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma;color:blue'><o:p> </o:p></span></font></p>

<div>

<p class=MsoNormal><font size=2 color=blue face="Times New Roman"><span
style='font-size:10.0pt;color:blue'># grep authorized_for cgi.cfg <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Times New Roman"><span
style='font-size:10.0pt;color:blue'>authorized_for_system_information=nagios<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Times New Roman"><span
style='font-size:10.0pt;color:blue'>authorized_for_configuration_information=nagios<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Times New Roman"><span
style='font-size:10.0pt;color:blue'>authorized_for_system_commands=nagios<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Times New Roman"><span
style='font-size:10.0pt;color:blue'>authorized_for_all_services=nagios<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Times New Roman"><span
style='font-size:10.0pt;color:blue'>authorized_for_all_hosts=nagios<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Times New Roman"><span
style='font-size:10.0pt;color:blue'>authorized_for_all_service_commands=nagios<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Times New Roman"><span
style='font-size:10.0pt;color:blue'>authorized_for_all_host_commands=nagios<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Times New Roman"><span
style='font-size:10.0pt;color:blue'>#<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Times New Roman"><span
style='font-size:10.0pt;color:blue'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Times New Roman"><span
style='font-size:10.0pt;color:blue'> </span></font><o:p></o:p></p>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> François
Laupretre [mailto:francois.laupretre-prestataire@calyon.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Tuesday, May 31, 2005 9:18
AM<br>
<b><span style='font-weight:bold'>To:</span></b> 'alexus'<br>
<b><span style='font-weight:bold'>Cc:</span></b>
nagios-users@lists.sourceforge.net<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE : [Nagios-users]
Logged in as ? or Sorry, but you are not authorized to commit the specified
command.</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>Your
problem is not related to the file permissions. As Mr Gosh told you, you must
be a declared contact in order to issue a command against a given object. Or
you must be listed in the authorized_for_all_*_commands parameter in cgi.cfg.</span></font><o:p></o:p></p>

<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>If you
really want nagios to issue any command, put the following lines in your
cgi.cfg :</span></font> <o:p></o:p></p>

<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>authorized_for_all_service_commands=nagios</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>authorized_for_all_host_commands=nagios</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>authorized_for_system_commands=nagios</span></font>
<o:p></o:p></p>

<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>>
-----Original Message-----</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> From: alexus [<a
href="mailto:tmda@alexus.org">mailto:tmda@alexus.org</a>] </span></font><br>
<font size=2><span style='font-size:10.0pt'>> Sent: Tuesday, May 31, 2005
2:47 PM</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> To: 'Subhendu Ghosh'</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> Cc:
nagios-users@lists.sourceforge.net</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> Subject: RE: [Nagios-users]
Logged in as ? or Sorry, but you </span></font><br>
<font size=2><span style='font-size:10.0pt'>> are not authorized to commit
the specified command.</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> My nagios.cmd have enough
permition to be read and written by nobody</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> (apache) and nagios itself</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> # ls -ld
~nagios/var/rw/nagios.cmd </span></font><br>
<font size=2><span style='font-size:10.0pt'>> -rw-rw----  1
nagios  nobody  0 May 30 23:33 </span></font><br>
<font size=2><span style='font-size:10.0pt'>>
/usr/local/nagios/var/rw/nagios.cmd</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> # ls -ld ~nagios/var/rw/</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> drwsr-sr-x  2
nobody  nagios  512 May 30 23:33 </span></font><br>
<font size=2><span style='font-size:10.0pt'>> /usr/local/nagios/var/rw/ #</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> I loged in as
"nagios"</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> It is only when I confirm an
actual manual commmand it </span></font><br>
<font size=2><span style='font-size:10.0pt'>> changes myself as "Logged
in as ?" and "Logged in as ? or </span></font><br>
<font size=2><span style='font-size:10.0pt'>> Sorry, but you are not
authorized to commit the specified command."</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> at all other time it shows me
"Logged in as nagios"</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>>  </span></font><br>
<font size=2><span style='font-size:10.0pt'>> -----Original Message-----</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> From: Subhendu Ghosh [<a
href="mailto:sghosh@sghosh.org">mailto:sghosh@sghosh.org</a>] </span></font><br>
<font size=2><span style='font-size:10.0pt'>> Sent: Monday, May 30, 2005
11:56 PM</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> To: alexus</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> Cc:
nagios-users@lists.sourceforge.net</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> Subject: RE: [Nagios-users]
Logged in as ? or Sorry, but you </span></font><br>
<font size=2><span style='font-size:10.0pt'>> are not authorized to commit
the specified command.</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> file permissions should allow
the web server process to write </span></font><br>
<font size=2><span style='font-size:10.0pt'>> and nagios </span></font><br>
<font size=2><span style='font-size:10.0pt'>> process to read.</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> But before the data i actually
written to the cmd file, the </span></font><br>
<font size=2><span style='font-size:10.0pt'>> authentication </span></font><br>
<font size=2><span style='font-size:10.0pt'>> code checks to see if you are
allowed to do so.  If you are </span></font><br>
<font size=2><span style='font-size:10.0pt'>> logged in as </span></font><br>
<font size=2><span style='font-size:10.0pt'>> "?" then by default
you are not allowed to send commands.</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> If you want non-contacts to
send commands, edit cgi.cfg and updated </span></font><br>
<font size=2><span style='font-size:10.0pt'>>
"authorized_for_*_commands"</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> You have to login and
authenticate in the web interface </span></font><br>
<font size=2><span style='font-size:10.0pt'>> before sending </span></font><br>
<font size=2><span style='font-size:10.0pt'>> commands.</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> On Mon, 30 May 2005, alexus
wrote:</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> > Once again..</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> > My
~nagios/var/rw/nagios.cmd</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> > I even tried with 777.
didn't help.</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> > What else I can try to
get it to work? Is there a way to </span></font><br>
<font size=2><span style='font-size:10.0pt'>> run nagios in</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> debug</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> > mode where I can see what
is happening and where the problem is?</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> > I even tried to use user
nobody to write and read from/to </span></font><br>
<font size=2><span style='font-size:10.0pt'>> that file..</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> >  _____</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> > From: <st1:PersonName
w:st="on">Dan Davis</st1:PersonName> [<a href="mailto:hokie99cpe@gmail.com">mailto:hokie99cpe@gmail.com</a>]</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> > Sent: Sunday, May 29,
2005 9:44 PM</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> > To: alexus</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> > Cc:
nagios-users@lists.sourceforge.net</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> > Subject: Re:
[Nagios-users] Logged in as ? or Sorry, but </span></font><br>
<font size=2><span style='font-size:10.0pt'>> you are not </span></font><br>
<font size=2><span style='font-size:10.0pt'>> > authorized to commit the
specified command.</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> > all files have
nagios:nagios as their ownership/group..</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> > ~nagios have 755
nagios:nobody</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> > Maybe that?</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> > Everything else looks
ok... and the nagios home directory is not the</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> problem</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> > in and of itself... but
the nagios.cmd file needs to be writable by </span></font><br>
<font size=2><span style='font-size:10.0pt'>> > your</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> web</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> > server user. Be sure of
that and you should be good to go.</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> > -Dan</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> ></span></font> <br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> -- </span></font><br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> -------------------------------------------------------</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> This SF.Net email is sponsored
by Yahoo.</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> Introducing Yahoo! Search
Developer Network - Create apps </span></font><br>
<font size=2><span style='font-size:10.0pt'>> using Yahoo! Search APIs Find
out how you can build Yahoo! </span></font><br>
<font size=2><span style='font-size:10.0pt'>> directly into your own Applications
- visit </span></font><br>
<font size=2><span style='font-size:10.0pt'>> <a
href="http://developer.yahoo.net/?fr=offad-ysdn-" target="_blank">http://developer.yahoo.net/?fr=offad-ysdn-</a>>
ostg-q22005</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>>
_______________________________________________</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> </span></font><br>
<font size=2><span style='font-size:10.0pt'>> Nagios-users mailing list</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> Nagios-users@lists.sourceforge.net</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> <a
href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a></span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> ::: Please include Nagios
version, plugin version (-v) and OS </span></font><br>
<font size=2><span style='font-size:10.0pt'>> when reporting any issue. </span></font><br>
<font size=2><span style='font-size:10.0pt'>> ::: Messages without
supporting info will risk being sent to /dev/null</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> </span></font><o:p></o:p></p>

</div>

</body>

</html>