<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Honia A wrote:
<blockquote cite="mid:BAY147-w48D26E5851DB210C7B79DAAEBC0@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>Thanks
for your reply Bret. <br>
<br>
I would like the second idea (keep that message on all the pages in
that same gray box). So I looked into that directory you mentioned
(/usr/local/nagios/sbin) but they are all the compiled cgi files. When
I opened them with UltraEdit and Notepad, they were not editable, the
lines look something like this (below).<br>
<br>
Is there any way I could edit them or may be there are pre-compiled
versions of the files which I could edit?<br>
</blockquote>
<br>
you have to edit the appropriate .c files and then recompile the cgis
out of them. since this a generic box, it's only defined once.<br>
<br>
$ grep -r display_info_table *<br>
<br>
points to cgi/cgiutils.c<br>
<br>
Within this function you will see a bunch of html code within printf
calls. There you can edit/add your preferred line.<br>
<br>
e.g. adding below<br>
<br>
if(current_authdata!=NULL)<br>
printf("Logged in as
<i>%s</i><BR>\n",(!strcmp(current_authdata->username,""))?"?":current_authdata->username);<br>
<br>
this<br>
<br>
printf("<i><font color=red>beware of the nagios
root, don't change anything!</font></i><BR>\n");<br>
<br>
After that, run make clean && make cgis && sudo make
install-cgis<br>
<br>
Should do the trick ;-)<br>
<br>
Kind regards,<br>
Michael<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
DI (FH) Michael Friedrich
<a class="moz-txt-link-abbreviated" href="mailto:michael.friedrich@univie.ac.at">michael.friedrich@univie.ac.at</a>
Tel: +43 1 4277 14359
Vienna University Computer Center
Universitaetsstrasse 7 A-1010 Vienna, Austria
</pre>
</body>
</html>