Don't expire user password on reset

This commit is contained in:
2024-06-30 15:22:01 -04:00
parent cf7245833a
commit ccf91fe0f5
3 changed files with 20 additions and 17 deletions

View File

@@ -40,10 +40,10 @@ if [[ -d /mnt/array/home-retired/$username ]]; then
fi
samba="no"
ask_ok "Enable shared file access for user $username?" && group_str="smbgrp" && samba="yes"
ask_ok "Enable shared file access for user $username?" && group_str="smbgrp," && samba="yes"
ask_ok "Make $username an admin?" && \
group_str+=",wheel"
group_str+="wheel"
useradd_cmd+=("-G" "$group_str")
useradd_cmd+=("$username")
@@ -64,6 +64,9 @@ if [[ "$samba" == "yes" ]]; then
(echo "$password"; echo "$password") | smbpasswd -a -s "$username"
fi
ask_ok "Prompt user to reset password on next login?" &&
sudo passwd --expire "$username"
# TODO check if centos 9 does by default
# Add subuids & subgids for container namespace
# id_offset=100000