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'))