chroot.create_user(): change user password instead of root's

This commit is contained in:
InsanePrawn 2022-02-14 20:51:43 +01:00
parent 9013df51a6
commit 306aaeb9a6

View file

@ -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')