# Nagios not prompting for username/password

## cuban

All.

I'm using nagios with apache1. I've put .htaccess in /usr/sbin/nagios and nagios is not prompting me when I go to the website. Anyone have any idea why?

Thanks,

Daniel

----------

## kashani

/usr/sbin/nagios is a binary on my system, though I am running 2.0 instead of 1.2. I'd check /etc/apache/conf.d/nagios.conf to see where Apache thinks it needs to be. If it's like my system it'll be in /usr/nagios/share/

kashani

----------

## cuban

Sorry, it's /usr/nagios/sbin is where instructions said to put it. I put it in /usr/nagios/share and /usr/nagios/sbin and it still does not prompt me for un/pw.

----------

## kashani

edit to fix grammar

Are you doing anything interesting in the allow portion of /etc/apache/conf.d/nagios.conf ? IP's on the allow from line are *not* prompted for a password. You'll want a deny from any line and then maybe allow specific IP's if you're loke. Mine looks like this:

```

ScriptAlias /nagios/cgi-bin/ /usr/nagios/sbin/

<Directory /usr/nagios/sbin/>

   AllowOverride AuthConfig

   Options ExecCGI

   order deny,allow

   deny from all

   allow from 127.0.0.1 

   AuthType Basic

   AuthName "Nagios"

   AuthUserFile /usr/nagios/sbin/.htpasswd

   require valid-user

   Satisfy Any

</Directory>

Alias /nagios/ /usr/nagios/share/

<Directory /usr/nagios/share/>

   AllowOverride AuthConfig

   Options None

   order deny,allow

   deny from all

   allow from 127.0.0.1

   AuthType Basic

   AuthName "Nagios"

   AuthUserFile /usr/nagios/share/.htpasswd

   require valid-user

   Satisfy Any

</Directory>

```

kashani

----------

## cuban

```
ScriptAlias /nagios/cgi-bin/ /usr/nagios/sbin/

<Directory "/usr/nagios/sbin/">

        AllowOverride AuthConfig

        Options ExecCGI

        order deny,allow

        allow from all

        AuthType Basic

        AuthName "Nagios"

        AuthUserFile /etc/nagios/htpasswd.users

        require valid-user

        Satisfy Any

</Directory>

Alias /nagios /usr/nagios/share/

<Directory "/usr/nagios/share">

        AllowOverride AuthConfig

        Options ExecCGI

        order deny,allow

        allow from all

        AuthType Basic

        AuthName "Nagios"

        AuthUserFile /etc/nagios/htpasswd.users

        require valid-user

        Satisfy Any

</Directory>
```

All that is there and I'm still not even prompted for a username/password.

----------

## kashani

Of course you're not getting prompted. You've got that big fat "allow from all" line sitting in your config. 

Looking at my previous post that should read "IP in the allow from line are NOT prompted for passwords" which might be your problem. Make it look like mine and it should work.

kashani

----------

