0,0 → 1,61 |
#!/bin/bash |
|
# alcasar-ldap.sh |
# by Rexy |
# This script is distributed under the Gnu General Public License (GPL) |
|
# activation / désactivation de l'authentification des utilisateurs via un serveur LDAP externe |
# enable / disable authentication of users via an extern LDAP server |
|
# TODO |
# - modif files "site-enabled/alcasar" + "mods-available/ldap" |
# - add / remove "ln -s mods-available/ldap mods-enabled/ldap" |
# - /usr/local/bin/alcasar-iptables.sh"); |
# - /usr/bin/systemctl restart radiusd"); |
|
# Modif "sites-enabled/alcasar" |
# Configure autorize section with: |
# ldap { |
# fail=1 |
# } |
# Configure authenticate section with |
# Auth-Type LDAP { |
# ldap |
# } |
|
# Modif "mods-available/ldap" |
# host = $ldap_server; |
# identity = $ldap_user; |
# password = $ldap_password; |
# basedn = $ldap_base_dn; |
# filter = $ldap_filter; |
# uid = $ldap_filter; |
# base_filter = $ldap_base_filter; |
|
usage="Usage: alcasar-ldap.sh {--on or -on } | {--off or -off}" |
SED="/bin/sed -i" |
CONF_FILE="/usr/local/etc/alcasar.conf" |
INTIF=`grep ^INTIF= $CONF_FILE|cut -d"=" -f2` # INTernal InterFace |
|
nb_args=$# |
args=$1 |
if [ $nb_args -eq 0 ] |
then |
nb_args=1 |
args="-h" |
fi |
case $args in |
-\? | -h* | --h*) |
echo "$usage" |
exit 0 |
;; |
--on | -on) |
;; |
--off | -off) |
;; |
*) |
echo "Argument inconnu :$1"; |
echo "$usage" |
exit 1 |
;; |
esac |
Property changes: |
Added: svn:eol-style |
+native |
\ No newline at end of property |
Added: svn:executable |
+* |
\ No newline at end of property |