add Administrator to user adding

This commit is contained in:
Tobias Powalowski 2024-06-07 17:59:11 +02:00
parent a85f6f30d7
commit fe0a74e841

View file

@ -174,7 +174,12 @@ _user_management() {
else
_set_comment || break
_prepare_password User || break
if useradd -R "${_DESTDIR}" -c "${_FN}" -m "${_USER}" &>"${_LOG}"; then
if _dialog --defaultno --yesno "Set ${_USER} as Administrator and part of wheel group?" 3 60; then
_USER_FLAG="-aG wheel"
else
_USER_FLAG=""
fi
if useradd -R "${_DESTDIR}" -c "${_FN}" "${_USER_FLAG}" -m "${_USER}" &>"${_LOG}"; then
_set_password
_dialog --title " Success " --no-mouse --infobox "User Account ${_USER} created succesfully." 3 60
sleep 2