Problem connecting to Windows 2008 Domain Controller.

Greetings all,

I’m new to the forums, not new to Linux but not a strong user.

We have a script that used to connect to the Active Directory that holds our students accounts.

Our servers where HP UNIX based and migrated last week to SUSE Enterprise Server 11.

This is the code we are using:


use strict;
use Net::LDAP;
use Net::LDAP::Control::Paged;
use Net::LDAP::Constant qw(LDAP_CONTROL_PAGED);
use Authen::SASL qw(Perl);

my $ldap_server = "edited";

my $user = 'edited';
my $pass = 'edited';

my $domain = "dc=edited,dc=edited,dc=edited";
my $dn = 'cn=$user,$domain';

my $ldap = Net::LDAP->new($ldap_server) or warn "Can't connect to ldap.
Reason: $!

if($ldap) {
    my $sasl = Authen::SASL->new(
        mechanism => 'DIGEST-MD5',
        callback => {
            user => $user,
            pass => $pass,

    my $page = Net::LDAP::Control::Paged->new(size => 100);
    my @args = (
        base => "ou=edited,$domain",
        filter => "(cn=*)",
        attrs => 'cn'],
        scope => "one",
        control =>  $page ]

    my $mesg = $ldap->bind(dn => $dn, sasl => $sasl);

    $mesg->code and warn "Cannot bind to ldap: ",$mesg->error;

    $mesg = $ldap->search(@args);

    $mesg = $ldap->unbind;

This is the error:

Cannot bind to ldap: 80090303: LdapErr: DSID-0C0904B3, comment: The digest-uri does not match any LDAP SPN's registered for this server., data 0, v1772 at line 40, <DATA> line 465.

From the error and google I thought it was DNS, I checked my workstation which is running Windows 7 and I wasn’t able to connect to that Active Directory as well. It’s a different domain.
So, I manually entered the w.x.y.z FQDN in the hosts file in my Windows 7 and was able to connect to that active directory using DIGEST-MD5.

Thinking it would be the same in Linux I entered the IP and FQDN in /etc/hosts but still the error persists.

I can see the server logging in in Event Viewer in the Windows 2008 server.

My supervisor tells me it’s the Windows server that has the problem since the script stopped working on the UNIX server before the migration.

I’ve looked everywhere and found no solution.

Your time and help on this matter is much appreciated.

Good day,


On 2012-10-22 22:56, novellpupr wrote:

> Our servers where HP UNIX based and migrated last week to SUSE
> Enterprise Server 11.

Enterprise servers (SLES) have a different forum. This is openSUSE only.

SLES/SLED forums

Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

On 10/23/2012 01:33 AM, Carlos E. R. wrote:
> SLES/SLED forums

the user ID/Pass to here works there too!!
(but the SLES gurus are there, enjoy!!)