I would suggest the following changes:

===============

# diff -w -u /usr/share/perl5/smbldap_tools.pm.orig 
/usr/share/perl5/smbldap_tools.pm
--- /usr/share/perl5/smbldap_tools.pm.orig      2007-09-24 11:07:11.000000000 
+0200
+++ /usr/share/perl5/smbldap_tools.pm   2011-02-02 14:07:48.000000000 +0100
@@ -296,6 +296,10 @@
     $mesg = $ldap_master->bind ( "$config{masterDN}",
                                 password => "$config{masterPw}"
                                 );
+    if ($mesg->is_error()) {
+        warn qq[Cannot bind to $config{masterLDAP}:$config{masterPort} as 
"$config{masterDN}": ], $mesg->error_text();
+        return undef;
+    }
     $ldap=$ldap_master;
     return($ldap_master);
 }

===============

and

===============

# diff -w -U 1 /usr/sbin/smbldap-useradd.orig /usr/sbin/smbldap-useradd
--- /usr/sbin/smbldap-useradd.orig      2007-09-24 12:18:51.000000000 +0200
+++ /usr/sbin/smbldap-useradd   2011-02-02 14:03:04.000000000 +0100
@@ -73,3 +73,4 @@
 
-my $ldap_master=connect_ldap_master();
+my $ldap_master=connect_ldap_master()
+    or die "Error binding to ldap server\n";
 
===============

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/680177

Title:
  smbldap-useradd fails to authenticate to allow changes to LDAP server

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to