AUTO Authentification.

AUTO Authentification.

by Peter Wallis -
Number of replies: 2

Hi peoples.

we are running moodle 1.9 and have ntlm setup and working to a point....

what we are wanting however, is that when a user logs onto the computer and then proceeds to log into moodle that it automatically pulls the authentification into moodle and doesnt come up with the login page instead routing straight to the users homepage. so in effect uses the windows domain login to access moodle.

Is this possible.

we have active directory passing users into moodle with all cridentials being pulled from the AD.

we are not mass adding into the moodle database, only when they login does the users account get created in Moodle....

Average of ratings: -
In reply to Peter Wallis

Re: AUTO Authentification.

by Methodical Linuxuser -

Hi Peter,

Any luck with this?  I too installed 1.9 - I can authenticate to the AD but I want the SSO solution you're seeking.  I followed the Moodle docs on NTLM and have joined the domain sucessfully and can wbinfo -u (although it doesn't seem to bring all of my users thru - perhaps it just limits results mixed?)  I get up to this step:

 $ ls -ald /var/run/samba/winbindd_privileged drwxr-x--- 2 root winbindd_priv 60 2007-11-17 16:18 /var/run/samba/winbindd_privileged/ 

                                    
In reply to Methodical Linuxuser

Re: AUTO Authentification.

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

First you need to know the user Apache is running with. Have a look at Apache's main configuracion file and look for the 'User' directive. In a Debian machine I have:

User www-data

RHEL can have httpd, or apache, or something similar. Let's say it's 'httpd' for this example.

Then have a look at the permissions of /var/cache/samba/winbindd_privileged, and note down the group of the directory. In the Moodle docs example (that you've pasted above), this is winbindd_priv, but RHEL will probably have another value. Let's say it's 'wbd_priv' for this example.

You need to make the Apache user ('httpd') a member of the 'wbd_priv' group. You can either use the GUI, or edit /etc/group, or use the 'adduser' command if it's available in RHEL. Editing /etc/group always works, so you just need to edit that file, search for the line that starts with (the number will differ, but this is not important):

wbd_priv:x:123:

(please note that there can be user account names after the ':' if there are already members of that group), and just add 'httpd' to the end of the user account list, separated by a comma like in the following example:

wbd_priv:x:123:oneuser,anotheruser,httpd

If this is the first member of the group, just add the user name after the ':', like this:

wbd_priv:x:123:httpd

Then you need to stop and start the Apache service. This is very important. Otherwise it won't work.

Saludos. Iñaki.