about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authoradmins <admins@tilde.institute>2020-04-15 01:06:24 -0400
committeradmins <admins@tilde.institute>2020-04-15 01:06:24 -0400
commit7d6d08b217c904387d15a12260d7ad34e439d580 (patch)
treefe3de79338420ccda2546d5ce4c3ca11ecf902ea
parente07a340e052449e4434c62d4064104926add954b (diff)
downloadadmin-7d6d08b217c904387d15a12260d7ad34e439d580.tar.gz
ignoring system users if they drop a homedir
-rwxr-xr-xbin/regusers.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/regusers.py b/bin/regusers.py
index 2c482d9..3fbb9df 100755
--- a/bin/regusers.py
+++ b/bin/regusers.py
@@ -22,6 +22,8 @@ if __name__ == "__main__":
     regusers = get_regusers("/home")
     usertable.write("<ul>\n")
     for user in sorted(regusers):
-        if user != "lost+found" and user != ".git" and user != "uucp" and user != "admins":
+        is_system = user.startswith("_")
+        is_hidden_dir = user.startswith(".")
+        if user != "lost+found" and user != "uucp" and user != "admins" and is_system == False and is_hidden_dir == False:
             usertable.write("<li><a href=\"https://"+ user +".tilde.institute\">"+ user +"</a></li>\n")
     usertable.write("</ul>\n")