* ud-useradd: Fix usergroup support:
- Move ldap call to actually add the user to the right place,
- Properly compare strings and numbers.
+ * ud-useradd: Only ask for private subscription if this installation
+ has a debian-private like mailinglist whose membership is configured
+ by ud-ldap. (defaults to true.)
- -- Peter Palfrader <weasel@debian.org> Sat, 09 Jan 2010 00:19:44 +0100
+ -- Peter Palfrader <weasel@debian.org> Sat, 09 Jan 2010 00:27:02 +0100
userdir-ldap (0.3.75) unstable; urgency=low
from userdir_ldap import *;
from userdir_gpg import *;
+HavePrivateList = getattr(ConfModule, "haveprivatelist", True)
+
# This tries to search for a free UID. There are two possible ways to do
# this, one is to fetch all the entires and pick the highest, the other
# is to randomly guess uids until one is free. This uses the former.
emailaddr = Res;
# Debian-Private subscription
-Res = raw_input("Subscribe to debian-private (space is none) [" + privsub + "]? ");
-if Res != "":
- privsub = Res;
+if HavePrivateList:
+ Res = raw_input("Subscribe to debian-private (space is none) [" + privsub + "]? ");
+ if Res != "":
+ privsub = Res;
+else:
+ privsub = " "
(uidNumber, generatedGID) = GetFreeID(l)
if not gidNumber:
print " %s <%s@%s>:" % (FullName,account,EmailAppend);
print " Assigned UID:",uidNumber," GID:", gidNumber;
print " Email forwarded to:",emailaddr
-print " Private Subscription:",privsub;
+if HavePrivateList:
+ print " Private Subscription:",privsub;
print " GECOS Field: \"%s,,,,\"" % (FullName);
print " Login Shell: /bin/bash";
print " Key Fingerprint:",Keys[0][1];
#replaycachefile = "/tmp/replay";
fingerprintfile = "/etc/userdir-ldap/badfingerprints"
+# do we have a debian-private like list that we should ask about in ud-useradd
+haveprivatelist = True;
+
# Echelon
ech_errorlog = "/org/db.debian.org/mail/Log/ech-errors.log"
ech_mainlog = "/org/db.debian.org/mail/Log/ech.log"