1 |
# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_auth.sh,v 1.2 2005-04-13 18:55:25 niro Exp $ |
# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_auth.sh,v 1.3 2005-08-28 19:28:16 niro Exp $ |
2 |
# configures the system authentification via mysql db settings |
# configures the system authentification via mysql db settings |
3 |
|
|
4 |
get_auth_settings() |
get_auth_settings() |
35 |
[ -n "${ALX_AUTH_STATION_PW}" ] && \ |
[ -n "${ALX_AUTH_STATION_PW}" ] && \ |
36 |
usermod -p $(perl -e "printf(crypt('${ALX_AUTH_SHELL_PW}','AD'))") ${ALX_UNPRIV_USER} |
usermod -p $(perl -e "printf(crypt('${ALX_AUTH_SHELL_PW}','AD'))") ${ALX_UNPRIV_USER} |
37 |
|
|
38 |
[ -n "${ALX_AUTH_SAMBA_PW}" ] && \ |
if [ -n "${ALX_AUTH_SAMBA_PW}" ] |
39 |
smbpasswd -a root ${ALX_AUTH_SAMBA_PW} |
then |
40 |
|
# >smb3 smbpasswd -a user password does not work anymore |
41 |
|
if [[ $(smbd --version | cut -d' ' -f2) > 2.999 ]] |
42 |
|
then |
43 |
|
smbpasswd -a root -s << EOF |
44 |
|
${ALX_AUTH_SAMBA_PW} |
45 |
|
${ALX_AUTH_SAMBA_PW} |
46 |
|
EOF |
47 |
|
else |
48 |
|
smbpasswd -a root ${ALX_AUTH_SAMBA_PW} |
49 |
|
fi |
50 |
|
fi |
51 |
|
|
52 |
# unset vars |
# unset vars |
53 |
unset ALX_AUTH_SHELL_PW |
unset ALX_AUTH_SHELL_PW |