Commit 38690891 authored by Sven  's avatar Sven
Browse files

Removed default password

As a default password caused some problems and didn't improve the security,
it was now removed. As sudo can now be run without password, the sudoers file
for the setup scripts was also removed.

Fixes #32
parent d21002cd
Pipeline #2352 passed with stage
in 24 minutes and 33 seconds
......@@ -89,9 +89,11 @@ ubiquity ubiquity/use_nonfree boolean true
# User configuration
d-i passwd/user-fullname string schule
d-i passwd/username string schule
d-i passwd/user-password-crypted password $6$mzYTK1/8GB/8wON$QF5UDc.KYd9Hv/kR8s7j7yZo/Wheya4rNGBJ5kJd8ryplNEj.u5QUo.IkY07ZOBboEn3X3N5c2buD.DOasuNn1
d-i passwd/auto-login boolean true
d-i user-setup/allow-password-empty boolean true
d-i user-setup/allow-password-weak boolean true
d-i passwd/user-password password
d-i passwd/user-password-again password
d-i passwd/auto-login boolean true
## Low Level Format
#d-i s390-dasd/auto-format boolean true
......
schule ALL=(ALL) NOPASSWD: ALL
--- usr/lib/ubiquity/user-setup/user-setup-apply.bak 2022-05-12 19:13:00.093291044 +0000
+++ usr/lib/ubiquity/user-setup/user-setup-apply 2022-05-12 19:41:29.790407040 +0000
@@ -30,6 +30,10 @@
USER="$1"
PASSWD="$2"
+ if [ -z "$PASSWD" ]; then
+ set -- "$1" "$2" true "$4"
+ fi
+
local VERSION=$($chroot $ROOT dpkg-query -W -f '${Version}\n' passwd)
PAM_SET_PWD=false
if $chroot $ROOT dpkg --compare-versions "$VERSION" ge "1:4.1.4-1"; then
......@@ -25,10 +25,6 @@ rm -R -f "$SQUASHFS_EXTRACTED_DIR/etc/dconf/db/local.d"
cp -R files/local.d "$SQUASHFS_EXTRACTED_DIR/etc/dconf/db/local.d"
fakechroot chroot "$SQUASHFS_EXTRACTED_DIR" dconf update
log "Sudoers"
cp files/sudoers "$SQUASHFS_EXTRACTED_DIR/etc/sudoers.d/schule"
chmod 440 "$SQUASHFS_EXTRACTED_DIR/etc/sudoers.d/schule"
log "Hey Alter release information"
cp "$ARTIFACTS_DIR/$IMAGE_META_NAME" "$SQUASHFS_EXTRACTED_DIR/etc/heyalter-release"
......@@ -43,3 +39,6 @@ cp -R files/homeschule "$ISO_EXTRACTED_DIR/"
cp usb_after_install/* "$ISO_EXTRACTED_DIR"
chown 1000:1000 "$ISO_EXTRACTED_DIR/setup_lokal.sh"
log "Patching Installer"
patch -d "$SQUASHFS_EXTRACTED_DIR" -p0 --forward -r - < files/ubiquity.patch || true
......@@ -11,8 +11,5 @@ rm -r /opt/setup
# WLAN Einstelllungen entfernen
rm -f /etc/NetworkManager/system-connections/*
# sudo Passwort wieder erzwingen
rm -r /etc/sudoers.d/schule
# AutoLogin wieder deaktivieren
sed -i 's/AutomaticLogin/#AutomaticLogin/g' /etc/gdm3/custom.conf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment