Generate ssh-rsa-shadow, debianhosts and ssh_known_hosts even for untrusted hosts...
[mirror/userdir-ldap.git] / ud-generate
index 03a5186..63cf2bf 100755 (executable)
@@ -180,8 +180,7 @@ def GenSSHShadow(l,File):
       # 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) \
-             or (string.find(GetAttr(x,"userPassword"),"*PK*")  != -1):
+      if (string.find(GetAttr(x,"userPassword"),"*LK*")  != -1):
          continue;
 
       if x[1].has_key("uidNumber") == 0 or \
@@ -800,6 +799,10 @@ while(1):
      Allowed = None
    CurrentHost = Split[0];
 
+   DoLink(GlobalDir,OutDir,"ssh-rsa-shadow");
+   DoLink(GlobalDir,OutDir,"debianhosts");
+   DoLink(GlobalDir,OutDir,"ssh_known_hosts");
+
    sys.stdout.flush();
    GenPasswd(l,OutDir+"passwd",Split[1]);
    sys.stdout.flush();
@@ -809,11 +812,8 @@ while(1):
    GenShadow(l,OutDir+"shadow");
        
    # Link in global things   
-   DoLink(GlobalDir,OutDir,"ssh-rsa-shadow");
    DoLink(GlobalDir,OutDir,"markers");
    DoLink(GlobalDir,OutDir,"mail-forward.cdb");
-   DoLink(GlobalDir,OutDir,"debianhosts");
-   DoLink(GlobalDir,OutDir,"ssh_known_hosts");
    DoLink(GlobalDir,OutDir,"mail-disable");
    DoLink(GlobalDir,OutDir,"mail-greylist");
    DoLink(GlobalDir,OutDir,"mail-callout");