From 29068d185d841b987fac1c40bee99d909eb1dfb1 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 19 Jan 2026 10:18:21 -0600 Subject: feat(archsetup): add --no-root-lock flag for testing --- archsetup | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'archsetup') diff --git a/archsetup b/archsetup index 7873f5b..731ae0d 100755 --- a/archsetup +++ b/archsetup @@ -34,6 +34,7 @@ fresh_install=false show_status_only=false skip_gpu_drivers=false enable_autologin="" # empty=auto-detect, true=force enable, false=skip +skip_root_lock=false while [ $# -gt 0 ]; do case "$1" in @@ -61,6 +62,10 @@ while [ $# -gt 0 ]; do enable_autologin=false shift ;; + --no-root-lock) + skip_root_lock=true + shift + ;; --help|-h) echo "Usage: $0 [OPTIONS]" echo "" @@ -71,6 +76,7 @@ while [ $# -gt 0 ]; do echo " --no-gpu-drivers Skip GPU driver detection/installation" echo " --autologin Enable automatic console login" echo " --no-autologin Disable automatic console login" + echo " --no-root-lock Skip locking root account (for testing)" echo " --help, -h Show this help message" exit 0 ;; @@ -1613,12 +1619,17 @@ EOF outro() { action="Cleanup" && display "title" "$action" - action="forcing user password change on first login" && display "task" "$action" - chage -d 0 "$username" >> "$logfile" 2>&1 || error "error" "$action" "$?" - # Lock root account last - if script fails earlier, root is still available for recovery - action="locking root account (use sudo instead)" && display "task" "$action" - passwd -l root >> "$logfile" 2>&1 || error "error" "$action" "$?" + if $skip_root_lock; then + display "task" "skipping security locks (--no-root-lock)" + else + action="forcing user password change on first login" && display "task" "$action" + chage -d 0 "$username" >> "$logfile" 2>&1 || error "error" "$action" "$?" + + # Lock root account last - if script fails earlier, root is still available for recovery + action="locking root account (use sudo instead)" && display "task" "$action" + passwd -l root >> "$logfile" 2>&1 || error "error" "$action" "$?" + fi display "subtitle" "Statistics" action="identifying newly installed packages" && display "task" "$action" -- cgit v1.2.3