/ Scripts / Menu / menu-system2.sh
menu-system2.sh
 1  #!/bin/bash
 2  
 3  # shellcheck source=./Scripts/defaults.sh
 4  . "$HOME"/RoninDojo/Scripts/defaults.sh
 5  
 6  # shellcheck source=./Scripts/functions.sh
 7  . "$HOME"/RoninDojo/Scripts/functions.sh
 8  
 9  _load_user_conf
10  
11  OPTIONS=(1 "Networking"
12           2 "Change User Password"
13           3 "Change Root Password"
14           4 "Lock Root User"
15           5 "Unlock Root User"
16           6 "Go Back")
17  
18  CHOICE=$(dialog --clear \
19                  --title "$TITLE" \
20                  --menu "$MENU" \
21                  "$HEIGHT" "$WIDTH" "$CHOICE_HEIGHT" \
22                  "${OPTIONS[@]}" \
23                  2>&1 >/dev/tty)
24  
25  clear
26  case $CHOICE in
27      1)
28          bash -c "${ronin_networking_menu}"
29          exit
30          ;;
31      2)
32          _print_message "Prepare to type new password for ${ronindojo_user} user..."
33          _sleep
34          sudo passwd "${ronindojo_user}"
35          ;;
36      3)
37          _print_message "Prepare to type new password for root user..."
38          _sleep
39          sudo passwd
40          ;;
41      4)
42          _print_message "Locking Root User..."
43          _sleep
44          sudo passwd -l root
45          ;;
46      5)
47          _print_message "Unlocking Root User..."
48          _sleep
49          sudo passwd -u root
50          ;;
51      6)
52          bash -c "${ronin_system_menu}"
53          exit
54          ;;
55  esac
56  
57  _pause return
58  bash -c "${ronin_system_menu2}"