From: joey <> Date: Wed, 27 Oct 2004 11:13:31 +0000 (+0000) Subject: Import from samosa: Added support for locked accounts (*LK* as X-Git-Tag: debian_userdir-ldap_0-3-7~54 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=cbdcb13fb080061527beba239aacca4e8c766914 Import from samosa: Added support for locked accounts (*LK* as password) when generating the shadow ssh key file --- diff --git a/ud-generate b/ud-generate index a55df5d..2673b1d 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 \