Were are trying to set-up a new instance off our Intranet, The requirement we have is that Drupal must be able to authenticate with Active Directory to get Windows Authentication working using the LDAPbeta module. The system set-up we have running is drupal 7 running on apache2, ubuntu box, which has got ntlm authentication enabled. i need single sign on to drupal, so downloaded the LDAP module and set up ldap server and tested it which communicates to Microsoft AD. The module on its own works fine and users can log on with AD's user details. However, if i enable single sign-on then its displays "You were not authenticated by the server. You may log in with your credentials below". The log file in drupal identifies the following error. MESSAGE : $_SERVER['REMOTE_USER'] not found message.
tried accessing the php.info module and it displays the remote_user as currently logged on user name.
Can anyone advise what were missing here, we realise that this module is still in beta version but hope that someone has managed to set-up correctly.

Within this module we have enabled the following;
LDAP Authentication
LDAP Authorisation
LDAP Authorisation - Drupal Roles
LDAP Servers.

Do we have to create a user role in order to handle the authentication, if so how can this be achieved?

Comments

johnbarclay’s picture

The basic logic of it all is in ldap_authentication.inc:

    switch($implementation) {
      case 'mod_auth_sspi' :
        if(isset($_SERVER['REMOTE_USER']))
          $remote_user = $_SERVER['REMOTE_USER'];
        elseif(isset($_SERVER['REDIRECT_REMOTE_USER']))
          $remote_user = $_SERVER['REDIRECT_REMOTE_USER'];
        else
          $remote_user = false;
        break;
    }

The single sign on requires that these variables be set by the SSO mechanism in the webserver.

just do a print "<pre>"; print_r($_SERVER); die; in index.php to see if the SSO mechanism is setting these or not.

If you have any luck debugging this, add your method to the documentation at: http://drupal.org/node/1065900

The best documentation on ntlm and php is at: http://docs.moodle.org/20/en/NTLM_authentication

johnbarclay’s picture

Status: Active » Closed (duplicate)

Also you can follow up on this issue: #1227088: Patch to add single sign on and seamless SSO to ldap_authentication since its a new patch.