Magellan Linux

Contents of /alx-src/trunk/alxconfig-ng/functions/config_auth.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2802 - (show annotations) (download) (as text)
Mon Aug 29 20:20:48 2011 UTC (12 years, 9 months ago) by niro
File MIME type: application/x-sh
File size: 666 byte(s)
-merged branch alxconfig-0_6_0 into trunk
1 # $Id$
2 # configures the system authentification via mysql db settings
3
4 config_auth()
5 {
6 # first of all get the vars
7 evaluate_table client_auth
8
9 if [[ ! -z ${client_auth_shell} ]]
10 then
11 ( echo "${client_auth_shell}"; sleep 0.1; echo "${client_auth_shell}" ) | passwd root > /dev/null
12 fi
13
14 if [[ ! -z ${client_auth_station} ]]
15 then
16 ( echo "${client_auth_station}"; sleep 0.1; echo "${client_auth_station}" ) | passwd ${ALX_UNPRIV_USER} > /dev/null
17 fi
18
19 # vnc passwd (min 6 chars)
20 if [[ ! -z ${client_auth_vnc} ]]
21 then
22 # pipe it 2x; 1st for new pw, 2nd to validate
23 HOME=/root vncpasswd &> /dev/null << EOF
24 ${client_auth_vnc}
25 ${client_auth_vnc}
26 EOF
27 fi
28 }