was changed for an existing uid. This is not permitted nor supported.
Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"keyFingerPrint=" + Keys[0][1]);
if len(Attrs) != 0:
print "*** This key already belongs to",GetAttr(Attrs[0],"uid");
account = GetAttr(Attrs[0],"uid");
Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"keyFingerPrint=" + Keys[0][1]);
if len(Attrs) != 0:
print "*** This key already belongs to",GetAttr(Attrs[0],"uid");
account = GetAttr(Attrs[0],"uid");
# Try to get a uniq account name
# Try to get a uniq account name
- Res = raw_input("Login account [" + account + "]? ");
- if Res != "":
- account = Res;
+ if Update == 0:
+ Res = raw_input("Login account [" + account + "]? ");
+ if Res != "":
+ account = Res;
Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"uid=" + account);
if len(Attrs) == 0:
privsub = "%s@debian.org"%(account);
Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"uid=" + account);
if len(Attrs) == 0:
privsub = "%s@debian.org"%(account);
if privsub == None or privsub == "":
privsub = " ";
break;
if privsub == None or privsub == "":
privsub = " ";
break;
# Prompt for the first/last name and email address
Res = raw_input("First name [" + cn + "]? ");
# Prompt for the first/last name and email address
Res = raw_input("First name [" + cn + "]? ");