From 3217807ae10ec6d62284764811be651dfe7e4049 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Tue, 31 Mar 2020 13:06:00 +0200 Subject: Allow cusomization of the UidNumber for the live user account By default the UidNumber which is used to create the live account is: 1000. The variable LIVEUIDNR can be set to another unused value if you want. Remember, customizations go into 'make_slackware_live.conf' so that you do not have to edit 'make_slackware_live.sh'. --- make_slackware_live.conf | 3 +++ make_slackware_live.sh | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/make_slackware_live.conf b/make_slackware_live.conf index beb0480..69f7e1a 100644 --- a/make_slackware_live.conf +++ b/make_slackware_live.conf @@ -25,6 +25,9 @@ # What runlevel to use if adding a DE like: XFCE, KDE4, PLASMA5 etc... #RUNLEVEL=4 +# Number of the 'live' user account in the Live image: +#LIVEUIDNR="1000" + # Name of the 'live' user account in the Live image: #LIVEUID="live" diff --git a/make_slackware_live.sh b/make_slackware_live.sh index 84e4548..ba3241c 100755 --- a/make_slackware_live.sh +++ b/make_slackware_live.sh @@ -83,6 +83,9 @@ THEDATE=$(date +%Y%m%d) # The live username of the image: LIVEUID=${LIVEUID:-"live"} +# The number of the live account in the image: +LIVEUIDNR=${LIVEUIDNR:-"1000"} + # The root and live user passwords of the image: ROOTPW=${ROOTPW:-"root"} LIVEPW=${LIVEPW:-"live"} @@ -1440,7 +1443,7 @@ EOL 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,input -u 1000 -d /home/${LIVEUID} -m -s /bin/bash ${LIVEUID} +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,input -u ${LIVEUIDNR} -d /home/${LIVEUID} -m -s /bin/bash ${LIVEUID} echo "${LIVEUID}:${LIVEPW}" | chroot ${LIVE_ROOTDIR} /usr/sbin/chpasswd # Configure suauth: -- cgit v1.2.3