Base de test accessible uniquement partir d'egon.
darcs-hash:20061206185043-68412-47bb214281ed8f1bea5ff2db461cd331a8ffbdaa.gz
This commit is contained in:
parent
387299f971
commit
21a2524827
1 changed files with 5 additions and 2 deletions
|
@ -15,7 +15,7 @@ import ldap, ldap.modlist, ldap_passwd
|
||||||
|
|
||||||
import config, annuaires, iptools, chgpass, user_tests, cPickle, config_mail
|
import config, annuaires, iptools, chgpass, user_tests, cPickle, config_mail
|
||||||
from chgpass import chgpass
|
from chgpass import chgpass
|
||||||
from affich_tools import coul, prompt
|
from affich_tools import coul, prompt, cprint
|
||||||
from syslog import *
|
from syslog import *
|
||||||
|
|
||||||
date_format = '%d/%m/%Y %H:%M'
|
date_format = '%d/%m/%Y %H:%M'
|
||||||
|
@ -28,11 +28,14 @@ random.seed() # On initialise le g
|
||||||
### paramètres de connexion à la base LDAP
|
### paramètres de connexion à la base LDAP
|
||||||
|
|
||||||
if __name__ == 'ldap_crans_test' or os.environ.get('crans_ldap', '') == 'test':
|
if __name__ == 'ldap_crans_test' or os.environ.get('crans_ldap', '') == 'test':
|
||||||
|
if hostname != "egon":
|
||||||
|
cprint("La base de test n'est accessible que depuis egon !", "rouge")
|
||||||
|
sys.exit(1)
|
||||||
# Utilisation de la base de données de test (tests, séminaire...)
|
# Utilisation de la base de données de test (tests, séminaire...)
|
||||||
# Il faut au choix :
|
# Il faut au choix :
|
||||||
# - faire un import crans_ldap_test
|
# - faire un import crans_ldap_test
|
||||||
# ou - crans_ldap=test /le/script
|
# ou - crans_ldap=test /le/script
|
||||||
uri = ro_uri = 'ldap://egon.adm.crans.org/'
|
uri = ro_uri = 'ldapi://%2fvar%2frun%2fldapi/'
|
||||||
ldap_auth_dn = 'cn=admin,dc=crans,dc=org'
|
ldap_auth_dn = 'cn=admin,dc=crans,dc=org'
|
||||||
ldap_password = '75bdb64f32'
|
ldap_password = '75bdb64f32'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue