From 7e0dd8a12e9a823626bb3840c3c7bc74a8526056 Mon Sep 17 00:00:00 2001 From: quackerd Date: Fri, 19 Feb 2021 18:52:24 -0500 Subject: [PATCH] change example --- add-user-group.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/add-user-group.py b/add-user-group.py index 37e1f74..4509a3d 100644 --- a/add-user-group.py +++ b/add-user-group.py @@ -38,15 +38,13 @@ def main(): cmd = "adduser -D -H -u " + shlex.quote(uid) + " " + shlex.quote(uname) print(cmd) subprocess.check_call(cmd, shell=True) - print("Added user " + uname + " with uid " + uid) if (len(elements) == 4): gname = elements[3] cmd = "addgroup " + shlex.quote(uname) + " " + shlex.quote(gname) print(cmd) subprocess.check_call(cmd, shell=True) - print("Added user " + uname + " to group " + gname) # set passwd - cmd = "echo -ne " + shlex.quote(passwd + "\n" + passwd + "\n") + " | smbpasswd -a -U " + shlex.quote(uname) + cmd = "echo -ne \"" + shlex.quote(passwd) + "\\n" + shlex.quote(passwd) + "\\n\" | smbpasswd -a -U " + shlex.quote(uname) print(cmd) subprocess.check_call(cmd, shell=True)