From 306aaeb9a6b0de7ba7f83c71aa5e6c947c53dc18 Mon Sep 17 00:00:00 2001 From: InsanePrawn Date: Mon, 14 Feb 2022 20:51:43 +0100 Subject: [PATCH] chroot.create_user(): change user password instead of root's --- chroot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chroot.py b/chroot.py index fe07713..11edb54 100644 --- a/chroot.py +++ b/chroot.py @@ -399,7 +399,7 @@ class Chroot: if password: install_script += f'echo "{user}:{password}" | chpasswd' else: - install_script += 'echo "Set user password:" && passwd' + install_script += f'echo "Set user password:" && passwd {user}' result = self.run_cmd(install_script) if result.returncode != 0: raise Exception('Failed to setup user')