Quantcast
Channel: Authentication
Viewing all articles
Browse latest Browse all 8256

Re: Moodle 3.0 NTLM SSO Issue

$
0
0
by Mike Alavi.  

Hi Sam,

Thanks for your reply,

I've tried the blank remote user format with no success,

Please see my apache2.config as below:


Mutex file:${APACHE_LOCK_DIR} default

PidFile ${APACHE_PID_FILE}

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 5

User ${APACHE_RUN_USER}

Group ${APACHE_RUN_GROUP

HostnameLookups Off

ErrorLog ${APACHE_LOG_DIR}/error.log

LogLevel warn

IncludeOptional mods-enabled/*.load

IncludeOptional mods-enabled/*.conf

Include ports.conf

 

<Directory />

        Options FollowSymLinks

        AllowOverride None

        Require all denied

</Directory>

 

<Directory /usr/share>

        AllowOverride None

        Require all granted

</Directory>

 

<Directory /var/www/>

        Options Indexes FollowSymLinks

        AllowOverride None

        Require all granted

</Directory>

AccessFileName .htaccess

 

<FilesMatch "^\.ht">

        Require all denied

</FilesMatch>

 

 

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined

LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined

LogFormat "%h %l %u %t \"%r\" %>s %O" common

LogFormat "%{Referer}i -> %U" referer

LogFormat "%{User-agent}i" agent

IncludeOptional conf-enabled/*.conf

IncludeOptional sites-enabled/*.conf

 

<IfModule !mod_auth_ntlm_winbind.c>

      LoadModule auth_ntlm_winbind_module /usr/lib/apache2/modules/mod_auth_ntlm_winbind.so

  </IfModule>

<Directory "/var/www/html/moodle/auth/ldap/">

       <Files ntlmsso_magic.php>

           NTLMAuth on

           AuthType NTLM

           AuthName "Moodle NTLM Authentication"

           NTLMAuthHelper "/usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp"

           NTLMBasicAuthoritative on

           require valid-user

       </Files>

   </Directory>

I've added the test.php to ldap and below code to appache2.conf:

<Directory "/var/www/html/moodle/auth/ldap/">

       <Files test.php>

           NTLMAuth on

           AuthType NTLM

           AuthName "Moodle NTLM Authentication"

           NTLMAuthHelper "/usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp"

           NTLMBasicAuthoritative on

           require valid-user

       </Files>

   </Directory>

Please see the page output as below:

NTLM authentication seems to be working. User: Domain\Mysuername

Test.php code:


<?php

if (isset($_SERVER['REMOTE_USER']) && !empty($_SERVER['REMOTE_USER'])) {

echo "<p>NTLM authentication seems to be working. User: " . $_SERVER['REMOTE_USER'] . "</p>";

} else {

echo '<p>NTLM is not working</p>';

}

?>


Thanks,

Mike


Viewing all articles
Browse latest Browse all 8256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>