-# Fetch all the users
-PasswdAttrs = l.search_s(BaseDn, ldap.SCOPE_ONELEVEL, "uid=*",\
- ["uid", "uidNumber", "gidNumber", "supplementaryGid",\
- "gecos", "loginShell", "userPassword", "shadowLastChange",\
- "shadowMin", "shadowMax", "shadowWarning", "shadowInactive",
- "shadowExpire", "emailForward", "latitude", "longitude",\
- "allowedHost", "sshRSAAuthKey", "dnsZoneEntry", "cn", "sn",\
- "keyFingerPrint", "privateSub", "mailDisableMessage",\
- "mailGreylisting", "mailCallout", "mailRBL", "mailRHSBL",\
- "mailWhitelist", "sudoPassword", "objectClass", "accountStatus"])
-
-if PasswdAttrs is None:
- raise UDEmptyList, "No Users"
-
-# Fetch all the hosts
-HostAttrs = l.search_s(HostBaseDn, ldap.SCOPE_ONELEVEL, "sshRSAHostKey=*",\
- ["hostname", "sshRSAHostKey", "purpose"])
-
-# Open the control file
-if len(sys.argv) == 1:
- F = open(GenerateConf, "r")
-else:
- F = open(sys.argv[1], "r")
-
-# Generate global things
-GlobalDir = GenerateDir + "/"
-GenDisabledAccounts(GlobalDir + "disabled-accounts")
-
-PasswdAttrs = filter(not IsRetired, PasswdAttrs)
-DebianUsers = filter(IsGidDebian, PasswdAttrs)
-
-CheckForward()
-
-GenMailDisable(GlobalDir + "mail-disable")
-GenAllForward(GlobalDir + "mail-forward.cdb")
-GenPrivate(GlobalDir + "debian-private")
-#GenSSHKnown(l,GlobalDir+"authorized_keys", 'authorized_keys')
-GenMailBool(GlobalDir + "mail-greylist", "mailGreylisting")
-GenMailBool(GlobalDir + "mail-callout", "mailCallout")
-GenMailList(GlobalDir + "mail-rbl", "mailRBL")
-GenMailList(GlobalDir + "mail-rhsbl", "mailRHSBL")
-GenMailList(GlobalDir + "mail-whitelist", "mailWhitelist")
-GenKeyrings(GlobalDir)
-
-# Compatibility.
-GenForward(GlobalDir + "forward-alias")
-
-PasswdAttrs = filter(lambda x: not x in DisabledUsers, PasswdAttrs)
-
-SSHFiles = GenSSHShadow()
-GenMarkers(GlobalDir + "markers")
-GenSSHKnown(GlobalDir + "ssh_known_hosts")
-GenHosts(l, GlobalDir + "debianhosts")
-
-while(1):
- Line = F.readline()
- if Line == "":
- break
- Line = Line.strip()
- if Line == "":
- continue
- if Line[0] == '#':
- continue