1,5 → 1,7 |
#!/bin/bash |
|
# $Id$ |
|
# alcasar-ldap.sh |
# by Rexy |
# This script is distributed under the Gnu General Public License (GPL) |
31,11 → 33,11 |
;; |
--on | -on) |
$SED "s/^LDAP=.*/LDAP=on/g" $CONF_FILE |
$SED "s/^server =.*/server = ldap:\/\/$LDAP_SERVER/g" $LDAP_MODULE |
$SED "s/^identity =.*/identity = $LDAP_USER/g" $LDAP_MODULE |
$SED "s/^password =.*/password = $LDAP_PASSWORD/g" $LDAP_MODULE |
$SED "s/^base_dn =.*/base_dn = \"$LDAP_BASE\"/g" $LDAP_MODULE |
$SED "s/^filter =.*/filter = \"($LDAP_UID=%{%{Stripped-User-Name}:-%{User-Name}})\"/g" $LDAP_MODULE |
$SED "s/^\tserver =.*/\tserver = \"ldap:\/\/${LDAP_SERVER//\"/\\\\\\\"}\"/g" $LDAP_MODULE |
$SED "s/^\tidentity =.*/\tidentity = \"${LDAP_USER//\"/\\\\\\\"}\"/g" $LDAP_MODULE |
$SED "s/^\tpassword =.*/\tpassword = \"${LDAP_PASSWORD//\"/\\\\\\\"}\"/g" $LDAP_MODULE |
$SED "s/^\tbase_dn =.*/\tbase_dn = \"${LDAP_BASE//\"/\\\\\\\"}\"/g" $LDAP_MODULE |
$SED "s/^\tfilter =.*/\tfilter = \"(${LDAP_UID//\"/\\\\\\\"}=%{%{Stripped-User-Name}:-%{User-Name}})\"/g" $LDAP_MODULE |
if [ ! -e /etc/raddb/mods-enabled/ldap ] |
then |
ln -s $LDAP_MODULE /etc/raddb/mods-enabled/ldap |
Property changes: |
Modified: svn:eol-style |
-native |
\ No newline at end of property |
+LF |
\ No newline at end of property |
Added: svn:keywords |
+Id |
\ No newline at end of property |