Magellan Linux

Contents of /alx-src/tags/alxconf-0_6_0-rc10/functions/config_auth.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2580 - (show annotations) (download) (as text)
Mon Jul 4 21:28:46 2011 UTC (12 years, 11 months ago) by niro
File MIME type: application/x-sh
File size: 666 byte(s)
tagged 'alxconf-0_6_0-rc10'
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 }