Don't expire user password on reset
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user