|
128 | 128 |
|
129 | 129 | # B. Ask for password change if pi/raspberry default remains |
130 | 130 | if check_user_pwd "pi" "raspberry"; then |
131 | | - echo -e "\n\nRaspberry Pi's are COMPROMISED often if the default password is not changed!\n" |
132 | | - echo -n "What password do you want for GNU/Linux user 'pi' ? " |
133 | | - read -t 5 ans < /dev/tty # Whines but doesn't change password if [Enter] |
134 | | - echo pi:"$ans" | chpasswd || true # Overrides 'set -e' |
| 131 | + if [ $INTERACTIVE == 1 ]; then |
| 132 | + whiptail --msgbox "\ |
| 133 | +Raspberry Pi's are COMPROMISED often if the default password is not changed! |
| 134 | +What password do you want for GNU/Linux user 'pi' ? |
| 135 | +press [Enter] 3 times for no change \ |
| 136 | +" 20 60 1 |
| 137 | + passwd pi && |
| 138 | + whiptail --msgbox "done" 20 60 1 |
| 139 | + #chpasswd || true # Overrides 'set -e' |
| 140 | + fi |
135 | 141 | fi |
136 | 142 |
|
137 | 143 | # C. Create user 'iiab-admin' as nec, with default password |
|
143 | 149 | # D. Ask for password change if iiab-admin/g0adm1n default remains |
144 | 150 | if check_user_pwd "iiab-admin" "g0adm1n"; then |
145 | 151 | echo -e "\n\nUser 'iiab-admin' retains default password 'g0adm1n' per http://FAQ.IIAB.IO\n" |
146 | | - |
147 | 152 | echo -e "This is for login to Internet-in-a-Box's Admin Console (http://box.lan/admin)\n" |
148 | 153 | if [ $INTERACTIVE == 1 ]; then |
149 | | - echo -n "What password do you want for GNU/Linux user 'iiab-admin' ? " |
150 | | - echo -n "press [Enter] for no change" |
151 | | - read -t 15 ans < /dev/tty # Whines but doesn't change password if [Enter] |
152 | | - echo iiab-admin:"$ans" | chpasswd || true # Overrides 'set -e' |
| 154 | + whiptail --msgbox "\ |
| 155 | +What password do you want for GNU/Linux user 'iiab-admin' ? |
| 156 | +press [Enter] 3 times for no change / |
| 157 | +" 20 60 1 |
| 158 | + passwd iiab-admin && |
| 159 | + whiptail --msgbox "done" 20 60 1 |
| 160 | + #chpasswd || true # Overrides 'set -e' |
153 | 161 | fi |
154 | 162 | fi |
155 | 163 |
|
|
0 commit comments