mon.cgi + auth
Hello! I just configured mon (mon-0-99-3.39) for my site and it works well. But I have problems with auth trough mon.cgi. I have default auth.cf with one uncommented line: * mon monpassword When I logged in mon.cgi (via http) and made some requests to mon, I got the following messages from mon: Jan 5 19:18:50 gw mon[55907]: user '' tried 'reset', not authenticated Jan 5 19:19:09 gw mon[55907]: user '' tried 'reload', not authenticated Jan 5 19:20:00 gw mon[55907]: user '' tried 'test', not authenticated And from mon.cgi: Could not reload auth mon server on server nss.paco.net: 520 command could not be executed (perhaps you don't have permissions in auth.cf?) Please, give me an advise how I can fix this problem? What I did wrong? Thanks for any ideas. Best Regards, mailto:[EMAIL PROTECTED] Eugene. ___ mon mailing list [EMAIL PROTECTED] http://linux.kernel.org/mailman/listinfo/mon
Re: mon.cgi + auth
On Tue, Jan 06, 2004 at 11:06:25AM +0200, Eugene Filatov wrote: Hello! I just configured mon (mon-0-99-3.39) for my site and it works well. But I have problems with auth trough mon.cgi. I have default auth.cf with one uncommented line: * mon monpassword That looks like an entry for the trap section - the user passwords go in monusers.cf, in standard Unix encrypted format. Suggest you go over the mon manpage again, and read up on monusers.cf and auth.cf. Remember, auth.cf is just authorization, not authentication. ___ mon mailing list [EMAIL PROTECTED] http://linux.kernel.org/mailman/listinfo/mon
[PATCH] reload mon configuration automatically
Jim, Saw a post that you were beinning to roll 0.99.3.. Here is a short patch that will enable mon to reload/reread the configuration file whenever it's modification timestamp has changed: --- mon.origTue Jan 6 15:17:51 2004 +++ mon Tue Jan 6 15:23:51 2004 @@ -361,6 +361,25 @@ $tm = time; # +# For each loop of the main daemon, re-check the +# config file for changes, reload if necessary +# +my $config_file_mod_time = (stat($CF{CF}))[9]; # modification time +if (length($CF{CONF_MOD_TIME}) == 0) { # not set + $CF{CONF_MOD_TIME} = $config_file_mod_time; + syslog (notice, reloading config .$CF{CF}); + reset_server; +} elseif ($config_file_mod_time $CF{CONF_MOD_TIME}) { + # + # If the current mod time of the config file is + # greater than the stored config time... + # + $CF{CONF_MOD_TIME} = $config_file_mod_time; + syslog(notice, reloading config .$CF{CF}); + reset_server; +} + +# # step through the watch groups, decrementing and # handing expired timers # -- Christopher R Key - We sleep safe in our beds because rough men stand ready in the night to visit violence on those who would do us harm -- George Orwell ___ mon mailing list [EMAIL PROTECTED] http://linux.kernel.org/mailman/listinfo/mon