From: Luke Kenneth Casson Leighton Date: Thu, 19 Aug 2021 20:36:49 +0000 (+0100) Subject: use python3 to create crypt password X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=070c7f2bf918f63cec74c7d94c22ba753e9cf1f7;p=dev-env-setup.git use python3 to create crypt password --- 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"