summaryrefslogtreecommitdiffstats
path: root/make_slackware_live.sh
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2016-12-13 13:17:51 +0100
committer Eric Hameleers <alien@slackware.com>2016-12-13 13:17:51 +0100
commitf9fec3d3f989359ed3bdf3bbf256891b3add5779 (patch)
treee1726b599e2d83db1c05b962af21649583e5acf6 /make_slackware_live.sh
parent6e47691161338870d923b63a72d967a8135e8f05 (diff)
downloadliveslak-f9fec3d3f989359ed3bdf3bbf256891b3add5779.tar.gz
liveslak-f9fec3d3f989359ed3bdf3bbf256891b3add5779.tar.xz
Make setting of the root & live user's password a bit safer.
Additionally, this should work better with a PAM based system.
Diffstat (limited to 'make_slackware_live.sh')
-rwxr-xr-xmake_slackware_live.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh
index c781413..a11a617 100755
--- a/make_slackware_live.sh
+++ b/make_slackware_live.sh
@@ -1205,11 +1205,11 @@ KERNEL=="loop*", ENV{UDISKS_IGNORE}="1"
EOL
# Set a root password.
-echo "root:${ROOTPW}" | chpasswd --root ${LIVE_ROOTDIR}
+echo "root:${ROOTPW}" | chroot ${LIVE_ROOTDIR} /usr/sbin/chpasswd
# Create a nonprivileged user account (called "live" by default):
chroot ${LIVE_ROOTDIR} /usr/sbin/useradd -c "Slackware Live User" -g users -G wheel,audio,cdrom,floppy,plugdev,video,power,netdev,lp,scanner,kmem,dialout,games,disk -u 1000 -d /home/${LIVEUID} -m -s /bin/bash ${LIVEUID}
-echo "${LIVEUID}:${LIVEPW}" | chpasswd --root ${LIVE_ROOTDIR}
+echo "${LIVEUID}:${LIVEPW}" | chroot ${LIVE_ROOTDIR} /usr/sbin/chpasswd
# Configure suauth:
cat <<EOT >${LIVE_ROOTDIR}/etc/suauth