X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=blobdiff_plain;f=ud-gpgimport;h=8c7ad738fa21ceeeb99f3baa154fdba5f1d2592a;hp=1229e57e9753904bffa86ae721e45c285f727c39;hb=9e1e7b0639b1265bf39acd330122f40123451c56;hpb=f4a76efad948fdf652f86095b43e11caf746352f diff --git a/ud-gpgimport b/ud-gpgimport index 1229e57..8c7ad73 100755 --- a/ud-gpgimport +++ b/ud-gpgimport @@ -51,13 +51,10 @@ if len(arguments) == 0: # Main program starts here # Connect to the ldap server -l = ldap.open(LDAPServer); if NoAct == 0: - print "Accessing LDAP directory as '" + AdminUser + "'"; - Password = getpass(AdminUser + "'s password: "); - UserDn = "uid=" + AdminUser + "," + BaseDn; - l.simple_bind_s(UserDn,Password); + l = passwdAccessLDAP(LDAPServer, BaseDn, AdminUser) else: + l = ldap.open(LDAPServer); l.simple_bind_s("",""); # Download the existing key list and put it into a map