From 070c7f2bf918f63cec74c7d94c22ba753e9cf1f7 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 19 Aug 2021 21:36:49 +0100 Subject: [PATCH] use python3 to create crypt password --- coriolis2-chroot | 3 ++- mk-deb-chroot | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/coriolis2-chroot b/coriolis2-chroot index a21f023..001beae 100755 --- a/coriolis2-chroot +++ b/coriolis2-chroot @@ -45,7 +45,8 @@ texlive-latex-extra texlive-pictures xfig yosys zlib1g-dev apt-get remove -y systemd # Create user with same UID in the chroot -useradd -m -p `python -c 'import crypt; print crypt.crypt("1234","Fx")'` -s /bin/bash $SUDO_USER -k /etc/skel +useradd -m -p `python3 -c 'import crypt; print (crypt.crypt("1234","Fx"))'` \ + -s /bin/bash $SUDO_USER -k /etc/skel echo -e " Added user ${SUDO_USER} with \e[1;91mpassword: 1234\e[0m" diff --git a/mk-deb-chroot b/mk-deb-chroot index 6267491..879a22d 100755 --- a/mk-deb-chroot +++ b/mk-deb-chroot @@ -53,7 +53,8 @@ apt-get remove -y systemd echo '$SUDO_USER ALL=NOPASSWD: ALL' >> /etc/sudoers.d/$chrootdir # Create user with same UID in the chroot -useradd -m -p `python -c 'import crypt; print crypt.crypt("1234","Fx")'` -s /bin/bash $SUDO_USER -k /etc/skel +useradd -m -p `python3 -c 'import crypt; print (crypt.crypt("1234","Fx"))'` \ + -s /bin/bash $SUDO_USER -k /etc/skel echo -e " Added user ${SUDO_USER} with \e[1;91mpassword: 1234\e[0m" -- 2.30.2