Contents of /alx-src/branches/alxconf-060/functions/config_auth.sh
Parent Directory | Revision Log
Revision 2144 -
(show annotations)
(download)
(as text)
Tue May 17 10:57:35 2011 UTC (13 years, 4 months ago) by niro
File MIME type: application/x-sh
File size: 666 byte(s)
Tue May 17 10:57:35 2011 UTC (13 years, 4 months 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 | # $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 | } |