Magellan Linux

Annotation of /alx-src/branches/alxconf-060/functions/config_auth.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2144 - (hide annotations) (download) (as text)
Tue May 17 10:57:35 2011 UTC (13 years ago) by niro
File MIME type: application/x-sh
File size: 666 byte(s)
-get database data via evaluate_table() function and use the advantages of xml (no problems with empty values anymore)
1 niro 1969 # $Id$
2 niro 245 # configures the system authentification via mysql db settings
3    
4     config_auth()
5     {
6 niro 329 # first of all get the vars
7 niro 2144 evaluate_table client_auth
8 niro 245
9 niro 2144 if [[ ! -z ${client_auth_shell} ]]
10 niro 2023 then
11 niro 2144 ( echo "${client_auth_shell}"; sleep 0.1; echo "${client_auth_shell}" ) | passwd root > /dev/null
12 niro 2023 fi
13 niro 245
14 niro 2144 if [[ ! -z ${client_auth_station} ]]
15 niro 2023 then
16 niro 2144 ( echo "${client_auth_station}"; sleep 0.1; echo "${client_auth_station}" ) | passwd ${ALX_UNPRIV_USER} > /dev/null
17 niro 2023 fi
18 niro 245
19 niro 329 # vnc passwd (min 6 chars)
20 niro 2144 if [[ ! -z ${client_auth_vnc} ]]
21 niro 329 then
22     # pipe it 2x; 1st for new pw, 2nd to validate
23 niro 330 HOME=/root vncpasswd &> /dev/null << EOF
24 niro 2144 ${client_auth_vnc}
25     ${client_auth_vnc}
26 niro 329 EOF
27     fi
28 niro 245 }