X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=blobdiff_plain;f=ud-useradd;fp=ud-useradd;h=243443fb52da5c2eaa9bb4fade1f81cb360973b0;hp=52689b3306cd2242dfb09f868f4746a71c3113c8;hb=5e4961c91009a15736f426c918c8d9dc8013cde2;hpb=849e0e4b017eea17d7a7451878ccce018ece129d diff --git a/ud-useradd b/ud-useradd index 52689b3..243443f 100755 --- a/ud-useradd +++ b/ud-useradd @@ -25,6 +25,8 @@ import email.Header 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. @@ -167,9 +169,12 @@ if Res != "": 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: @@ -226,7 +231,8 @@ print "Final information collected:" 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];