ud-mailgate: remove exception for münchen.debian.net
[mirror/userdir-ldap.git] / ud-useradd
index d14edee..fcda26f 100755 (executable)
@@ -51,7 +51,7 @@ def ShouldIgnoreID(uid):
 #      search through all UIDs.
 def GetFreeID(l):
    Attrs = l.search_s(BaseBaseDn,ldap.SCOPE_SUBTREE,
-                      "uidNumber=*",["uidNumber", "gidNumber", "uid"]);
+                      "(|(uidNumber=*)(gidNumber=*))",["uidNumber", "gidNumber", "uid"]);
    HighestUID = 0;
    gids = [];
    uids = [];
@@ -390,7 +390,7 @@ if Update == 1 and ForceMail == 0:
 
 # Send the Welcome message
 print "Sending Welcome Email"
-templatepath = TemplatesDir + "/welcome-message-%d" % int(gidNumber)
+templatepath = TemplatesDir + "/welcome-message-%s" % supplementaryGid
 if not os.path.exists(templatepath):
    templatepath = TemplatesDir + "/welcome-message"
 Reply = TemplateSubst(Subst,open(templatepath, "r").read())