[ldap.py] ldap_host contient désormais un host
This commit is contained in:
parent
b6e9d79019
commit
5fa6339cd0
4 changed files with 8 additions and 9 deletions
|
@ -1,11 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
include("secrets")
|
||||
include("ldap")
|
||||
|
||||
if has("db-replicat"):
|
||||
server = 'localhost'
|
||||
else:
|
||||
server = 'ldap.adm.crans.org'
|
||||
print """
|
||||
# -*- text -*-
|
||||
# ceci est le fichier /etc/freeradius/modules/ldap
|
||||
|
@ -177,4 +174,4 @@ ldap {
|
|||
# default: 0x0000 (no debugging messages)
|
||||
# Example:(LDAP_DEBUG_FILTER+LDAP_DEBUG_CONNS)
|
||||
#ldap_debug = 0x0028
|
||||
}""" % {'password': secrets.ldap_readonly_password, 'server': server}
|
||||
}""" % {'password': secrets.ldap_readonly_password, 'server': ldap_host}
|
||||
|
|
|
@ -7,6 +7,8 @@ Databases) et du service de noms (Name Service Switch).
|
|||
|
||||
if has("ldap"):
|
||||
db="ldap"
|
||||
else:
|
||||
db=""
|
||||
|
||||
def database(name, res):
|
||||
print name + ": " + " ".join(res)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
{% include /var/lib/bcfg2/etc/genshi/secrets.txt %}\
|
||||
|
||||
# Connexion LDAP
|
||||
server_host = $ldap_host
|
||||
server_host = $ldap_socket
|
||||
search_base = ou=data,dc=crans,dc=org
|
||||
version = 3
|
||||
bind = yes
|
||||
|
|
|
@ -12,12 +12,12 @@ include("ip")
|
|||
if has("db-server") and not has("db-replicat-test"):
|
||||
# Pour ceux qui ont la base ou une copie en locale
|
||||
# on regarde dans celle-ci
|
||||
ldap_host = "ldap://127.0.0.1/"
|
||||
ldap_host = "127.0.0.1"
|
||||
ldap_socket = "ldapi://%2fvar%2frun%2fslapd%2fldapi/"
|
||||
else:
|
||||
# On regarde dans la base principale
|
||||
ldap_host = "ldap://%s/" % admipof("ldap")
|
||||
ldap_socket = ldap_host
|
||||
ldap_host = admipof("ldap")
|
||||
ldap_socket = "ldap://%s/" % ldap_host
|
||||
|
||||
# Filtre de droits pour la connexion
|
||||
if has("users") or has("vert"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue