summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2020-03-31 13:06:00 +0200
committer Eric Hameleers <alien@slackware.com>2020-03-31 13:06:00 +0200
commit3217807ae10ec6d62284764811be651dfe7e4049 (patch)
treeb4d2d4b82e2beb549bb69097469f2caeb6efdbb1
parent2f1e0f5ab0605725c6952d171439a48c14fa9e18 (diff)
downloadliveslak-3217807ae10ec6d62284764811be651dfe7e4049.tar.gz
liveslak-3217807ae10ec6d62284764811be651dfe7e4049.tar.xz
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'.
-rw-r--r--make_slackware_live.conf3
-rwxr-xr-xmake_slackware_live.sh5
2 files changed, 7 insertions, 1 deletions
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: