Annotation of /alx-src/trunk/alxconfig-ng/functions/config_auth.sh
Parent Directory | Revision Log
Revision 2802 -
(hide annotations)
(download)
(as text)
Mon Aug 29 20:20:48 2011 UTC (12 years, 8 months ago) by niro
File MIME type: application/x-sh
File size: 666 byte(s)
Mon Aug 29 20:20:48 2011 UTC (12 years, 8 months ago) by niro
File MIME type: application/x-sh
File size: 666 byte(s)
-merged branch alxconfig-0_6_0 into trunk
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 | } |