|
149 | 149 |
|
150 | 150 | # B. Ask for password change if pi/raspberry default remains |
151 | 151 | if check_user_pwd "pi" "raspberry"; then |
152 | | - echo -e "\n\nRaspberry Pi's are COMPROMISED often if the default password is not changed!\n" |
153 | | - echo -n "What password do you want for GNU/Linux user 'pi' ? " |
154 | | - read -t 5 ans < /dev/tty # Whines but doesn't change password if [Enter] |
155 | | - echo pi:"$ans" | chpasswd || true # Overrides 'set -e' |
| 152 | + if [ $INTERACTIVE == 1 ]; then |
| 153 | + PASSWORD=$(whiptail --passwordbox " |
| 154 | +Raspberry Pi's are COMPROMISED often if the default password is not changed! |
| 155 | +What password do you want for GNU/Linux user 'pi' ? |
| 156 | +press [Enter] for no change " 12 78 --title "password dialog" 3>&1 1>&2 2>&3) |
| 157 | + echo pi:$PASSWORD | chpasswd 2>&1 > /dev/null || true # Overrides 'set -e' |
| 158 | + fi |
156 | 159 | fi |
157 | 160 |
|
158 | 161 | # C. Create user 'iiab-admin' as nec, with default password |
|
163 | 166 |
|
164 | 167 | # D. Ask for password change if iiab-admin/g0adm1n default remains |
165 | 168 | if check_user_pwd "iiab-admin" "g0adm1n"; then |
166 | | - echo -e "\n\nUser 'iiab-admin' retains default password 'g0adm1n' per http://FAQ.IIAB.IO\n" |
167 | | - |
168 | | - echo -e "This is for login to Internet-in-a-Box's Admin Console (http://box.lan/admin)\n" |
169 | 169 | if [ $INTERACTIVE == 1 ]; then |
170 | | - echo -n "What password do you want for GNU/Linux user 'iiab-admin' ? " |
171 | | - echo -n "press [Enter] for no change" |
172 | | - read -t 15 ans < /dev/tty # Whines but doesn't change password if [Enter] |
173 | | - echo iiab-admin:"$ans" | chpasswd || true # Overrides 'set -e' |
| 170 | + PASSWORD2=$(whiptail --passwordbox " |
| 171 | +User 'iiab-admin' retains default password 'g0adm1n' per http://FAQ.IIAB.IO |
| 172 | +This is for login to Internet-in-a-Box's Admin Console (http://box.lan/admin) |
| 173 | +What password do you want for GNU/Linux user 'iiab-admin' ? |
| 174 | +press [Enter] for no change " 12 78 --title "password dialog" 3>&1 1>&2 2>&3) |
| 175 | + echo iiab-admin:$PASSWORD2 | chpasswd 2>&1 > /dev/null || true # Overrides 'set -e' |
174 | 176 | fi |
175 | 177 | fi |
176 | 178 |
|
|
0 commit comments