On Jul 24, 2009, at 5:01 PM, Edward Trochim wrote: > Is a configuration like this possible? I've read the documentation on > authentication and default users but I didn't see anything that helped > me with this particular setup.
It's almost entirely .htaccess configuration that you need, I expect. Try this -- In cgi.cfg, set default_user_name to what you want non-logged in users to be set to. You many need to set additional authorized_for values for this user or ensure that they are a contact for all hosts and services you want them to see. Change your htaccess for sbin and share to include the Order, Deny, Allow From and Satisfy directives -- AuthName "Monitor System Access" AuthType Basic AuthUserFile /usr/local/nagios/etc/htpasswd.users require valid-user Order deny,allow Deny from all Allow from 192.168.1.14 172.27.31 # allows from the single ip 192.168.1.14 and the entire 172.27.31.0/24 Satisfy Any The magic is in the Satisfy Any. The user can come from an Allowed IP _or_ authenticate. The server is smart enough not to present authentication if the IP Allow is satisfied. -- Marc ------------------------------------------------------------------------------ _______________________________________________ Nagios-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
