windows authentication

windows authentication

by solmaz naderi -
Number of replies: 8

Hi every one

I'm using moodle 2.9+ on windows server OS with xampp server (Apache 2.4.12 & php 5.6.8) and authentication is working by ldap. I'm trying to change authentication to windows authentication, for this goal I have done fallowing steps:

1- copied mod_auth_sspi.so in bin directory (xampp/apache/bin) and in xampp/apache/modules

2-add fallowing code to end of httpd.conf:

<IfModule !mod_auth_sspi.c>
        LoadModule sspi_auth_module modules/mod_auth_sspi.so
</IfModule>

 <Directory "C:/xampp/htdocs/moodle/auth/ldap">
         < Files ntlmsso_magic.php>
         AuthName "solico-group.com"
         AuthType SSPI
         SSPIAuth On
         SSPIOfferBasic Off
         SSPIAuthoritative On
         SSPIDomain solico-group.com
         require valid_user
       </Files>
</Directory>

3- configure ldap setting to fallwing image:



when I stop apache and want to start again, it can't start and show this error:


please help me how can I fix that?

warm regards

Solmaz

Average of ratings: -
In reply to solmaz naderi

Re: windows authentication

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Shock, horror! And you won't like the answer..... dump Xampp. 

You have a workable Apache Server? And have mySQL and PHP successfully running? Install Moodle into the Apache server and lose Xampp. 

If you have these things running in Xampp, then I suggest you try and migrate everything away from Xampp, (Never tried this but there is no reason this should not work.) If it is too difficult to achieve, then take your database backups and hide them somewhere. Dump the entire Xampp assembly reinstall Apache as an individual server environment. Add mySQL then PHP. Make sure it is all working, then install Moodle. Restore your database and everything should work again. 

Why dump Xampp? I have my own personal horror story here, which ended badly and I have never used the Xampp installer since. Would not recommend it. 

 On a more practical side, the additional overhead required to run Xampp reduces the overall number of simultaneous users, quite dramatically. Xampp may be considered ideal for a smaller environment, or market or whatever, but really, it ain't. Some people love it and swear by it, but I respectfully suggest that you try the alternative.  

Average of ratings: Useful (1)
In reply to Colin Fraser

Re: windows authentication

by solmaz naderi -

Hi Mr Fraser

first of all thanks for prompt response,

I will do your suggestion in future surely, I agree with you but I don't have enough time for migration.

I'm in critical situation and must solve this problem by current config .

please help me how can I fix problem by using xampp server?

thanks in advance

In reply to solmaz naderi

Re: windows authentication

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Hi Solmaz, I am sorry but I have no solution, other than the one given. I must admit I do not understand why you edited the httpd.conf file though. Even in Xampp using the LDAP protocols is easier to set up from within Moodle. Perhaps you might try deleting the changes you made, and resetting the server adding these changes in the admin of Moodle. 

The documentation is here  for all the settings you need to look at. That should get you back on track, at least. Good luck....

In reply to Colin Fraser

Re: windows authentication

by solmaz naderi -

Hi Mr Fraser

Finally, According to your suggestion I have migrated from Xampp to standalone, so I want to set Authentication By SSO, Whould you help me please

OS= windows server 2012

web server= apache

moodle version =2.9+

database =mysql

Thanks in advance

Solmaz


In reply to solmaz naderi

Re: windows authentication

by solmaz naderi -

any suggestion?


In reply to solmaz naderi

Re: windows authentication

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Migrate to a 'proper' installation - no xampp. It'll be quicker/better in the end. 

There's no point asking for advice, getting it and then saying "I don't like that advice" wink

In reply to Howard Miller

Re: windows authentication

by solmaz naderi -

Hi Mr Miller

Finally, According to your suggestion I have migrated from Xampp to standalone, so I want to set Authentication By SSO, Whould you help me please

OS= windows server 2012

web server= apache

moodle version =2.9+

database =mysql

Thanks in advance

Solmaz

In reply to solmaz naderi

Re: windows authentication

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Hi Solmaz, glad to hear you took the chance, now you have much better control over your Moodle. If you want to use a CAS, then the first place to look would be at this document. (Opens in new tab/window.) This gives full outline of what to do if you want a single sign on. If you have any issues, and you might, I suggest you post in the Authentication Forum for real help. 

Good luck. 

<background>BTW, Using XAMPP was designed as a short term solution for a number of smallish sites, and I mean very small, by admins who have very little idea of how to set up anything in a Web Server and to get them up and running quickly. It was never designed to be used as a long term solution, a marriage of convenience. While it was clever, and filled a niche for Moodle Users, like myself when I first started out using, and admin of, a Moodle. In the end, it became a nightmare because I expected it to do far, far more and I got burnt on it. It was handy at the time, that's all.  </background>