Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am in the process of merging two LDAP directories to one server. To start with I've created a LDAP server with two forests, one for each of the old servers. This went well. Now I am trying to setup access to my mediawiki so that users from both forests can access it.

I know from AD that it is possible distinguish users with a domain and username either as domain\username or username@domain

Is this possible with LDAP? I've been trying different settings in my site-configuration without any luck.

I've enabled the following modules in apache:

  • core_module (static)
  • log_config_module (static)
  • logio_module (static)
  • mpm_prefork_module (static)
  • http_module (static)
  • so_module (static)
  • alias_module (shared)
  • auth_basic_module (shared)
  • authn_alias_module (shared)
  • authn_file_module (shared)
  • authnz_ldap_module (shared)
  • authz_default_module (shared)
  • authz_groupfile_module (shared)
  • authz_host_module (shared)
  • authz_user_module (shared)
  • autoindex_module (shared)
  • cgi_module (shared)
  • deflate_module (shared)
  • dir_module (shared)
  • env_module (shared)
  • ldap_module (shared)
  • mime_module (shared)
  • negotiation_module (shared)
  • php5_module (shared)
  • reqtimeout_module (shared)
  • rewrite_module (shared)
  • setenvif_module (shared)
  • ssl_module (shared)
  • status_module (shared)

and my site configuration is:

<IfModule mod_ssl.c>
<AuthnProviderAlias ldap ldap-grid>
        AuthLDAPBindDN cn=admin,dc=grid,dc=aau,dc=dk
        AuthLDAPBindPassword ***
        AuthLDAPURL ldap://harald:389/ou=People,dc=grid,dc=aau,dc=dk?uid?sub?(objectClass=*)
</AuthnProviderAlias>

<AuthnProviderAlias ldap ldap-es>
        AuthLDAPBindDN cn=admin,dc=es,dc=aau,dc=dk
        AuthLDAPBindPassword ***
        AuthLDAPURL ldap://harald:389/ou=People,dc=es,dc=aau,dc=dk?uid?sub?(objectClass=*)
</AuthnProviderAlias>

<VirtualHost *:443>
        ServerName aggersborg.grid.aau.dk
        ServerAdmin adm@grid.aau.dk

        DocumentRoot /opt/wiki
        <Directory />
                Options FollowSymLinks
                AllowOverride None
                RedirectMatch ^/$ /wiki/
                Redirect /observium https://aggersborg.grid.aau.dk:8080
        </Directory>
        <Directory /opt/wiki/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All

                Order allow,deny
                allow from all

                AuthBasicProvider ldap-grid ldap-es
                AuthName "AAU HPC Wiki"
                AuthType Basic
                AuthzLDAPAuthoritative off

                Require valid-user
        </Directory>
...

Is there a way to allow multiple ldap bases to login to my wiki?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

So I finally found a solution to my problem for now.

By adding the following to my site config in /etc/apache2/sites-available/ i'm able to login with accounts from both DN's. It should be outside the virtualhost.

<AuthnProviderAlias ldap ldap-grid>
        AuthLDAPBindDN cn=admin,dc=grid,dc=aau,dc=dk
        AuthLDAPBindPassword ***
        AuthLDAPURL ldap://localhost:389/ou=People,dc=grid,dc=aau,dc=dk?uid?
        AuthLDAPBindAuthoritative off
</AuthnProviderAlias>

<AuthnProviderAlias ldap ldap-es>
        AuthLDAPBindDN cn=admin,dc=es,dc=aau,dc=dk
        AuthLDAPBindPassword ***
        AuthLDAPURL ldap://localhost:389/ou=People,dc=es,dc=aau,dc=dk?uid?sub?(objectClass=*)

</AuthnProviderAlias>

The following is the config from the virualhost directory:

            AuthBasicProvider ldap-grid ldap-es
            AuthType Basic
            AuthzLDAPAuthoritative off
            Require valid-user
share|improve this answer

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.