mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
add modify users
This commit is contained in:
parent
e725d4f17a
commit
8028c6aa49
2 changed files with 4 additions and 4 deletions
|
@ -163,7 +163,7 @@ _configure_system() {
|
|||
fi
|
||||
#shellcheck disable=SC2086
|
||||
_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/locale.conf" "Locale Setting" \
|
||||
"/etc/locale.gen" "Glibc Locales" \
|
||||
|
|
|
@ -161,18 +161,18 @@ _user_management() {
|
|||
# add normal users
|
||||
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 _"
|
||||
_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}")
|
||||
if [[ "${_USER}" = "root" ]]; then
|
||||
_set_password Root root
|
||||
elif [[ "${_USER}" = "Done" ]]; then
|
||||
break
|
||||
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" \
|
||||
"2" "Change Comment" \
|
||||
"3" "Delete User" \
|
||||
"4" "Done" 2>"${_ANSWER}" || return 1
|
||||
"4" "Return to User Selection" 2>"${_ANSWER}" || return 1
|
||||
_USER_ACTION=$(cat "${_ANSWER}")
|
||||
if [[ "${_USER_ACTION}" = 1 ]]; then
|
||||
_set_password User "${_USER}"
|
||||
|
|
Loading…
Reference in a new issue