ud-generate: deal with users without loginShell
[mirror/userdir-ldap.git] / ud-generate
index eb38748..db6770d 100755 (executable)
@@ -215,6 +215,8 @@ def GenPasswd(accounts, File, HomePrefix, PwdMarker):
       userlist = {}
       i = 0
       for a in accounts:
+         if 'loginShell' not in a:
+             continue
          # Do not let people try to buffer overflow some busted passwd parser.
          if len(a['gecos']) > 100 or len(a['loginShell']) > 50: continue