diff --git a/libexec/render.py b/libexec/render.py index 6cb1bb1..ade2085 100755 --- a/libexec/render.py +++ b/libexec/render.py @@ -206,12 +206,16 @@ class LoginPart(Part): self.fragments.append(style_reset()) def list_homes(): + already_listed = set() + with open("/etc/passwd") as f: for line in f: tokens = line.split(":") if tokens[5] != "/dev/null": - yield (tokens[5], tokens[0]) + if tokens[5] not in already_listed: + already_listed.add(tokens[5]) + yield (tokens[5], tokens[0]) class Dir: def __init__(self, path, name=None, slash="/"):