LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache authentucation (https://www.linuxquestions.org/questions/linux-server-73/apache-authentucation-929044/)

evocage 02-12-2012 11:54 PM

Apache authentucation
 
Hi Guys,

I just configured apache2 in ubuntu 11.04. I used basic authentication. But authentication is happening only one time. When browser is closed completely then its again asking for authentication. But it should be authenticate each time without closing the browser.

Have any idea then share it.

I also want to authenticate using ldap user but its giving error like :

Unknown Authn provider: ldap

how can I resolve it ?



Thanks

EricTRA 02-13-2012 12:58 AM

Hello,

How did you configure authentication? Post your configuration file (masking/hiding personal info) so that we can have a look at it. What module are you using for LDAP authentication?

Kind regards,

Eric

j-ray 02-13-2012 01:17 AM

Http basic auth is always valid until you quit the browser. Do you have an ldap server running within reach?

evocage 02-13-2012 01:19 AM

Hi Eric,

My configuration details are as follows:

AuthBasicProvider ldap
AuthType Basic
AuthzLDAPAuthoritative on
AuthLDAPUrl ldap://ldap.example.com/ou=users,dc=example,dc=com
AuthName "Permission Denied"
AuthUserFile /usr/local/secret
Require user admin jack
Have any suggestion ..

bathory 02-13-2012 02:06 AM

Quote:

Unknown Authn provider: ldap
You should make sure that you load both the authnz_ldap_module and ldap_module modules in your apache config file

Regards

evocage 02-13-2012 02:35 AM

Hi bathory,

I installed from apt-get then is it necessary to include these module in apache2.conf file.

Please let me know.



Thanks

bathory 02-13-2012 02:45 AM

AFAIK in debian based distros, you need to use a2enmod to enable apache modules. So try:
Code:

a2enmod ldap
a2enmod authnz_ldap


evocage 02-13-2012 03:23 AM

Hey,

Can you tell me how to add in apache2.conf file.

When I run this command

a2enmod ldap
Module ldap already enabled

# a2enmod authnz_ldap
Considering dependency ldap for authnz_ldap:
Module ldap already enabled
Module authnz_ldap already enabled



Thanks

bathory 02-13-2012 04:05 AM

Quote:

Originally Posted by evocage (Post 4601058)
Hey,

Can you tell me how to add in apache2.conf file.

When I run this command

a2enmod ldap
Module ldap already enabled

# a2enmod authnz_ldap
Considering dependency ldap for authnz_ldap:
Module ldap already enabled
Module authnz_ldap already enabled

So the modules are enabled. You don't need to add anything in apache2.conf as a2enmod has taken care to create the needed files/symlinks in /etc/apache2/mods-enabled.
Restart apache and see if you still get that error "Unknown Authn provider: ldap"


All times are GMT -5. The time now is 08:36 PM.