change user without closing browser!

rpatl at gmx.at rpatl at gmx.at
Thu Nov 28 14:31:05 CET 2002


The script does not work with Konquerer!!
Sorry, but we checked that just some minutes ago.

hans-peter and patrick


> We probably found a solution, for the problem mentioned last week!
> 
> We have a kind of solution to change the current htaccess-user without
> closing the browser.
> 
> First do the changes below!!
> 
> Usage:
> You press the link “Change User” to change the user. Then the
> authentification window appears. You have to enter the new username and
> its
> password and click OK. The authentification window appears again, but you
> click
> only CANCEL this time without any changes. Now you are logged in with the
> new
> user.
> 
> Might be not the most elegant way. If anyone knows, how to do it better
> (without closing), please let us know.
> 
> 
> Greetings from Austria
> 
> Hans-Peter and Patrick
> 
> 
> Changes:
>
____________________________________________________________________________
> Insert into the „General“ – Section of the file
> „side.html“
> 
> ------------------------------------- BEGIN
> /usr/local/nagios/share/side.html -------------------------
> <tr>
>     <td width=13><img src="images/greendot.gif" width="13" height="14"
> name="relogin-dot"></td>
>     <td nowrap><a href="relogin.php" target="main"
> onMouseOver="switchdot('relogin-dot',1)"
> onMouse-Out="switchdot('relogin-dot',0)"
> class="NavBarItem">Change User</a></td>
>   </tr>
> ------------------------------------- END
> -----------------------------------
> Create the following
> File:
>
-------------------------------------/usr/local/nagios/share/relogin.php-------------------------------
> <?php
> 	Header ('WWW-Authenticate: Basic realm="Nagios Access"');
> 	    Header ("HTTP/1.0 401 Unauthorized");
> 	    echo '<html>';
> 	    echo '<head>';
> 	    echo '<meta http-equiv="refresh" content="0; URL=main.html">';
> 	    echo '</head>';
> 	    echo '<body bgcolor="#FFFFFF">';
> 	    echo '</body>';
> 	    echo '</html>';
> 	   
> exit;
> ?>
>
--------------------------------------------------------------------------------------
> Do not forget that the users must exist in the nagios "htpasswd.users"
> File!
> HOWTO: http://nagios.sourceforge.net/docs/1_0/cgiauth.html   
> section: "setting up authenticated users"
> 
> -- 
> +++ GMX - Mail, Messaging & more  http://www.gmx.net +++
> NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Get the new Palm Tungsten T 
> handheld. Power & Color in a compact size! 
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> 

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!



-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en




More information about the Users mailing list