Compare commits

...

3 Commits

  1. 2
      auth.py
  2. 2
      tools/add_users.py

@ -9,4 +9,4 @@ def authenticate(u, p):
def get_real_users():
f = [i.split(":") for i in open("/etc/shadow").read().split("\n")]
return [i[0] for i in filter(lambda a: len(a) > 1, f) if not(i[1] in ["*", "!"])]
return [i[0] for i in filter(lambda a: len(a) > 1, f) if not(i[1] in ["*", "!", "!!", "!*"])]

@ -33,7 +33,7 @@ def generate_list_from_emails(infile):
usr = addy.split("@")[0]
if usr in cur:
continue
pwd = crypt.crypt(secrets.token_urlsafe(10), crypt.mksalt())
pwd = secrets.token_urlsafe(10)
key.append((usr, pwd))
add_user(usr, pwd)
print(key)

Loading…
Cancel
Save