From 6b4e580c40515d092c447f1c2dd50d534f815262 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Mon, 29 May 2023 00:04:50 +0000 Subject: [PATCH] Add a comment about password hashing in adduser --- adduser | 1 + 1 file changed, 1 insertion(+) diff --git a/adduser b/adduser index faf2183..492e722 100755 --- a/adduser +++ b/adduser @@ -21,6 +21,7 @@ def adduser(username, firstname, lastname, email, password): else: fullname = f'{firstname} {lastname}' + # Generate password hash using OpenSSL with open('password', 'w') as f: f.write(password) hashed_password = check_output(['openssl', 'passwd', '-6', '-in', 'password']).decode('utf-8')[:-1]