X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-generate;h=0ba6fa9f2eb8401271ea445f962e4bca9d3171fd;hb=5335eb0fbeb3600dfcffe9082b9c4f88ad21333b;hp=a55df5d9cc69469f42332e450834e1af3addaf02;hpb=3014669c53f7737ea33fcc2facc16d9e69b89e38;p=mirror%2Fuserdir-ldap.git diff --git a/ud-generate b/ud-generate index a55df5d..0ba6fa9 100755 --- a/ud-generate +++ b/ud-generate @@ -158,8 +158,10 @@ def GenSSHShadow(l,File): raise "No Users"; for x in PasswdAttrs: - if x[1].has_key("uidNumber") == 0 or \ - x[1].has_key("sshRSAAuthKey") == 0: + # If the account is locked, do not write it. + # This is a partial stop-gap. The ssh also needs to change this + # to ignore ~/.ssh/authorized* files. + if (string.find(GetAttr(x,"userPassword"),"*LK*") != -1): continue; if x[1].has_key("uidNumber") == 0 or \ @@ -574,6 +576,8 @@ while(1): GenPasswd(l,OutDir+"passwd",Split[1]); sys.stdout.flush(); GenGroup(l,OutDir+"group"); + if CurrentHost == "haydn.debian.org" or CurrentHost == "costa.debian.org": + continue; GenShadow(l,OutDir+"shadow"); # Link in global things