Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Spec : Apache 2.24 O/s : Suse /RedHat /Windows

Windows : Apache httpd Linux : Apache DS (LDAP )

Task of Implementing Apache Httpd + LDAP + SSO (mod_session.so)

Getting error as stated below

"Invalid command 'AuthzLDAPAuthoritative', perhaps misspelled or defined by a module not included in the server configuration"

The setup was working in apache Httpd 2.22 + LDAP - SSO,hence as per docs,mod_session is suppose to work with apache 2.24 ..... :(

Does some body have any solutions

with regards karthik

share|improve this question
    
quanta is probably correct, but double check the startup logs and verify that you are in fact using a 2.2 binary. I've seen this happen to people who invoke 2.0 by accident. –  Andrew B Mar 8 '13 at 5:51
add comment

4 Answers

Looks like you haven't loaded the authnz_ldap_module:

LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
share|improve this answer
    
I have already added the following header's LoadModule authnz_ldap_module modules/mod_authnz_ldap.so <Location /> AuthName "Vostron Staff Only" AuthType Basic AuthBasicProvider ldap AuthzLDAPAuthoritative off AuthLDAPUrl "ldap://192.168.4.240:10389/ou=system?uid?sub?(objectClass=*)" Require valid-user </Location> Error AH00526: Syntax error on line 580 of E:/JAVA/APACHE24/conf/httpd.conf: Invalid command 'AuthzLDAPAuthoritative', perhaps misspelled or defined by a module not included in the server configuration –  N.S.Karthik Mar 8 '13 at 5:59
    
What? E:/... on a Linux server? You should append it to your original question (to keep formatting) instead of posting here as a comment. –  quanta Mar 8 '13 at 6:02
    
Sorry the apache server is on windows and LDAP (Apache DS) is installed on Suse Linux. –  N.S.Karthik Mar 8 '13 at 6:11
    
Could you please paste the full httpd.conf into pastebin and insert link here? –  quanta Mar 8 '13 at 6:41
    
Hi This form does not allow me to paste the full "http.conf" is there any alternate for –  N.S.Karthik Mar 8 '13 at 8:36
show 1 more comment

Not sure if it is the same problem, because i switched to 2.4 not 2.2.24. Everything worked fine with httpd 2.2.22 and stoped working with 2.4.4.

I'm loading the necessary modules in my httpd.conf:

LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule ldap_module modules/mod_ldap.so

My Ldap Conf looks as following:

<Location />
       AuthType Basic
       AuthName "LDAP Authentication"
       AuthBasicProvider ldap file
       AuthzLDAPAuthoritative off
       AuthLDAPURL "URL"
       AuthLDAPBindDN "BindDN"
       AuthLDAPBindPassword "BindPassword"
       Require valid-user 
       Order allow,deny
       Allow from all
</Location>

The Error message says:

/opt/httpd/dev/bin/apachectl -f /opt/httpd/UAT/conf/httpd.conf -k start
AH00526: Syntax error on line 60 of /opt/httpd/UAT/conf/vhosts/_hobbit.conf:
Invalid command 'AuthzLDAPAuthoritative', perhaps misspelled or defined by a module not included in the server configuration
make: *** [start] Error 1

I found the same error in a Mailing List: Link to Mailinglist
It looks like he found a solution: Link to Solution

Im already compiling as he said, using my own apr/apr-util and all ldap flags (--with-ldap, --enable-ldap, ...) but i still can't get it to work.

Maybe someone can figure something out?

EDIT / SOLUTION: Okay.. Deleting "AuthzLDAPAuthoritative off" from my Virtual Host Config worked. Looks like this setting was removed with 2.4.

Settings exist in 2.2 mod_authnz_ldap Documentation and doesnt exist in 2.4 mod_authnz_ldap Documentation. (Can't post Links because of lack of reputation)

Dunno if its okay for you to just delete it from your config, but i think it should work afterwards.

share|improve this answer
    
More infos on upgrading 2.2 -> 2.4 / Topic: AuthzLDAPAuthoritative httpd.apache.org/docs/2.4/upgrading.html#run-time –  luccino Mar 20 '13 at 11:53
add comment
# sudo apt-get install libapache2-mod-authnz-external
..
# a2enmod
..
Which module(s) do you want to enable (wildcards ok)?
*authnz*
Enabling module authnz_external.
Considering dependency ldap for authnz_ldap:
Enabling module ldap.
Enabling module authnz_ldap.
To activate the new configuration, you need to run:
service apache2 restart
..
share|improve this answer
add comment

AuthLDAPBindAuthoritative off

instead of

AuthzLDAPAuthoritative off (drop the 'z')

This helped me when working with apache 2.4 The 2.2 documentation said to use AuthzLDAPAuthoritative but the 2.4 documentation said to use AuthLDAPBindAuthoritative. Plus most examples around the web still use it with the 'z'. I'm not sure which version changed in.

Hope this helps.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.