X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=blobdiff_plain;f=ud-userimport;h=335978279d0871bce6d47922a6c597ea7d70904b;hp=cbb6bac19249394dbeffff748abaff752ed027fc;hb=9e1e7b0639b1265bf39acd330122f40123451c56;hpb=f4a76efad948fdf652f86095b43e11caf746352f diff --git a/ud-userimport b/ud-userimport index cbb6bac..3359782 100755 --- a/ud-userimport +++ b/ud-userimport @@ -220,13 +220,9 @@ for (switch, val) in options: AdminUser = val # Main program starts here -print "Accessing LDAP directory as '" + AdminUser + "'"; -Password = getpass(AdminUser + "'s password: "); # Connect to the ldap server -l = ldap.open(LDAPServer); -UserDn = "uid=" + AdminUser + "," + BaseDn; -l.simple_bind_s(UserDn,Password); +l = passwdAccessLDAP(LDAPServer, BaseDn, User) if (Passwd != ""): DoPasswd(l,Passwd);