add modify users

This commit is contained in:
Tobias Powalowski 2024-06-02 17:40:49 +02:00
parent e725d4f17a
commit 8028c6aa49
2 changed files with 4 additions and 4 deletions

View file

@ -163,7 +163,7 @@ _configure_system() {
fi fi
#shellcheck disable=SC2086 #shellcheck disable=SC2086
_dialog --title " System Configuration " --no-cancel ${_DEFAULT} --menu "" 19 60 13 \ _dialog --title " System Configuration " --no-cancel ${_DEFAULT} --menu "" 19 60 13 \
"Basic User Configuration" "User Management" \ "User Configuration" "User Management" \
"/etc/vconsole.conf" "Virtual Console" \ "/etc/vconsole.conf" "Virtual Console" \
"/etc/locale.conf" "Locale Setting" \ "/etc/locale.conf" "Locale Setting" \
"/etc/locale.gen" "Glibc Locales" \ "/etc/locale.gen" "Glibc Locales" \

View file

@ -161,18 +161,18 @@ _user_management() {
# add normal users # add normal users
while true; do while true; do
_USERS="root Superuser $(grep 'x:10[0-9][0-9]' ${_DESTDIR}/etc/passwd | cut -d : -f 1,5 | sed -e 's: :#:g' | sed -e 's#:# #g') Done _" _USERS="root Superuser $(grep 'x:10[0-9][0-9]' ${_DESTDIR}/etc/passwd | cut -d : -f 1,5 | sed -e 's: :#:g' | sed -e 's#:# #g') Done _"
_dialog --no-cancel --menu " Modify User " 15 40 10 ${_USERS} 2>"${_ANSWER}" || return 1 _dialog --no-cancel --menu " User Selection " 15 40 10 ${_USERS} 2>"${_ANSWER}" || return 1
_USER=$(cat "${_ANSWER}") _USER=$(cat "${_ANSWER}")
if [[ "${_USER}" = "root" ]]; then if [[ "${_USER}" = "root" ]]; then
_set_password Root root _set_password Root root
elif [[ "${_USER}" = "Done" ]]; then elif [[ "${_USER}" = "Done" ]]; then
break break
else else
_dialog --title " Modify ${_USER} " --no-cancel --menu "" 10 45 4 \ _dialog --title " Modify User ${_USER} " --no-cancel --menu "" 10 45 4 \
"1" "Change Password" \ "1" "Change Password" \
"2" "Change Comment" \ "2" "Change Comment" \
"3" "Delete User" \ "3" "Delete User" \
"4" "Done" 2>"${_ANSWER}" || return 1 "4" "Return to User Selection" 2>"${_ANSWER}" || return 1
_USER_ACTION=$(cat "${_ANSWER}") _USER_ACTION=$(cat "${_ANSWER}")
if [[ "${_USER_ACTION}" = 1 ]]; then if [[ "${_USER_ACTION}" = 1 ]]; then
_set_password User "${_USER}" _set_password User "${_USER}"