I'm using it, to authenticate against Kerberos (which is run by our AD Windows Server)
For this I've installed on our linux webserver
heimdal-kcm, perl and Authen::Simple::Kerberos
Than I created this little script:
Code:
#!/usr/bin/perl
# authentication script for mrbs to authenticate against
# windows active directory with kerberos
# makes use of Authen:Simple:Kerberos
# Code mostly copied from example under:
# http://search.cpan.org/~chansen/Auth...le/Kerberos.pm
# by Marco Tedaldi <tedaldi@hifo.uzh.ch>, 21.7.2011
use strict;
use Authen::Simple::Kerberos;
my $username;
my $password;
my $kerberos = Authen::Simple::Kerberos->new(
realm => 'MY.KERBEROS.REALM'
);
#get the values from the commandline
$username = shift;
$password = shift;
# exit, if username or password are empty
exit 1 if (!$username || !$password);
if ( $kerberos->authenticate( $username, $password ) )
{
# on success
exit 0;
}
else
{
# authentication failed
exit 1;
}
MY.KERBEROS.REALM has to be replaced...
and now our users can login to the contao frontend with the same username and password as used on the windows domain.
Bookmarks