--- alx-src/trunk/alxconfig-ng/functions/config_auth.sh 2005/08/28 19:28:16 302 +++ alx-src/trunk/alxconfig-ng/functions/config_auth.sh 2005/09/07 18:41:29 329 @@ -1,14 +1,14 @@ -# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_auth.sh,v 1.3 2005-08-28 19:28:16 niro Exp $ +# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_auth.sh,v 1.4 2005-09-07 18:41:29 niro Exp $ # configures the system authentification via mysql db settings get_auth_settings() { local x i all count - #all arrays: + # all arrays: # -> session1 session2 ... sessionN - #get settings from database + # get settings from database ALX_AUTH_SHELL_PW=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ "select shell from client_auth where serial='${ALX_SERIAL}'") ALX_AUTH_VNC_PW=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ @@ -26,7 +26,7 @@ config_auth() { - #first of all get the vars + # first of all get the vars get_auth_settings [ -n "${ALX_AUTH_SHELL_PW}" ] && \ @@ -49,9 +49,19 @@ fi fi + # vnc passwd (min 6 chars) + if [ -n "${ALX_AUTH_VNC_PW}" ] + then + # pipe it 2x; 1st for new pw, 2nd to validate + vncpasswd &> /dev/null << EOF +${ALX_AUTH_VNC_PW} +${ALX_AUTH_VNC_PW} +EOF + fi # unset vars unset ALX_AUTH_SHELL_PW unset ALX_AUTH_VNC_PW unset ALX_AUTH_SAMBA_PW unset ALX_AUTH_STATION_PW } +