From b3e305578bc327b221c0b4ed7f74731c8e296308 Mon Sep 17 00:00:00 2001 From: cohen Date: Thu, 7 Dec 2006 23:46:55 +0100 Subject: [PATCH] On utilise le secrets.py situ dans le repertoire secrets dont les droits ne bougeront pas. (Suggestion de Vincent) darcs-hash:20061207224655-f6463-db93f0867483d96682d32371169a46d3e6011d81.gz --- gestion/chgpass.py | 1 + gestion/gen_confs/switchs.py | 1 + gestion/hptools.py | 1 + gestion/ldap_crans.py | 1 + 4 files changed, 4 insertions(+) diff --git a/gestion/chgpass.py b/gestion/chgpass.py index e87b3881..4cf67f22 100755 --- a/gestion/chgpass.py +++ b/gestion/chgpass.py @@ -23,6 +23,7 @@ from user_tests import getuser from affich_tools import cprint try : + sys.path.append('/usr/scripts/gestion/secrets') from secrets import ldap_password, ldap_auth_dn except : ldap_password = '' diff --git a/gestion/gen_confs/switchs.py b/gestion/gen_confs/switchs.py index 54de0b90..d5bde7c3 100755 --- a/gestion/gen_confs/switchs.py +++ b/gestion/gen_confs/switchs.py @@ -239,6 +239,7 @@ exit sw_num = int(switch[5]) # Conf radius + sys.path.append('/usr/scripts/gestion/secrets') from secrets import radius_key shuffle(self.rad_servs) rad = self.rad_template * len(self.rad_servs) diff --git a/gestion/hptools.py b/gestion/hptools.py index cfcfb4a4..74e3f4e8 100755 --- a/gestion/hptools.py +++ b/gestion/hptools.py @@ -19,6 +19,7 @@ from os import system from sre import findall try: + sys.path.append('/usr/scripts/gestion/secrets') from secrets import config_snmp_secrete, reconf_snmp except : # Si a pas le droit de lire config_snmp_secrete diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 62b7c989..3b323ace 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -51,6 +51,7 @@ else: # avec le secret try: + sys.path.append('/usr/scripts/gestion/secrets') from secrets import ldap_password, ldap_auth_dn except: sys.stdout.write(coul('Warning : impossible de lire le fichier de secret !\n', 'jaune'))