Authentication

This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.

I get the problem with RADIUS plugin, when I enable it and try to login with a username/password in Domain controller. It gives me an error

"PHP Fatal error:  Call to undefined function mhash() in /var/www/html/moodle/lib/pear/Crypt/CHAP.php on line 447"

Line 447:

"return substr(mhash(MHASH_SHA1, $this->peerChallenge .$this->authChallenge . \$this->username), 0, 8);"

I have hash enable in PHP module. I'm using CentOS.

Any help is appreciate.

Average of ratings: -
Re: RADIUS plugin problem
You need to either compile PHP with the mhash option enabled (note that this is different from hash option/module) or compile mhash extension as a module (and then make sure you load the module).

Saludos.
Iñaki.

Average of ratings: -
Re: RADIUS plugin problem

Thanks so much!

We install php by 'yum'. Could you please show me where to get 'mhash extension'?

Average of ratings: -
Re: RADIUS plugin problem
It should be available in the usual CentOS repositories (but I don't use CentOS, so I'm not sure if it's there or not).

If you don't find it there, as a last resort you can edit lib/pear/Crypt/CHAP.php and change all the instances of 'mhash' to 'hash'

Saludos.
Iñaki.

Average of ratings: -
Re: RADIUS plugin problem

I know this was an old discussion but I've just submitted a patch to update the PEAR library that the RADIUS auth plug-in uses to address this problem.

MDL-37625

Average of ratings: Useful (1)