20 |
# first of all get the vars |
# first of all get the vars |
21 |
get_auth_settings |
get_auth_settings |
22 |
|
|
23 |
[ -n "${ALX_AUTH_SHELL_PW}" ] && \ |
if [[ ! -z ${ALX_AUTH_SHELL_PW} ]] |
24 |
usermod -p $(openssl passwd -1 ${ALX_AUTH_SHELL_PW}) root |
then |
25 |
|
( echo "${ALX_AUTH_SHELL_PW}"; sleep 0.1; echo "${ALX_AUTH_SHELL_PW}" ) | passwd root |
26 |
|
fi |
27 |
|
|
28 |
[ -n "${ALX_AUTH_STATION_PW}" ] && \ |
if [[ ! -z ${ALX_AUTH_STATION_PW} ]] |
29 |
usermod -p $(openssl passwd -1 ${ALX_AUTH_SHELL_PW}) ${ALX_UNPRIV_USER} |
then |
30 |
|
( echo "${ALX_AUTH_STATION_PW}"; sleep 0.1; echo "${ALX_AUTH_STATION_PW}" ) | passwd ${ALX_UNPRIV_USER} |
31 |
|
fi |
32 |
|
|
33 |
# vnc passwd (min 6 chars) |
# vnc passwd (min 6 chars) |
34 |
if [ -n "${ALX_AUTH_VNC_PW}" ] |
if [[ ! -z ${ALX_AUTH_VNC_PW} ]] |
35 |
then |
then |
36 |
# pipe it 2x; 1st for new pw, 2nd to validate |
# pipe it 2x; 1st for new pw, 2nd to validate |
37 |
HOME=/root vncpasswd &> /dev/null << EOF |
HOME=/root vncpasswd &> /dev/null << EOF |