From c7543591ef269cc2b1314506f240fbe57f77956b Mon Sep 17 00:00:00 2001 From: dimino Date: Fri, 12 Oct 2007 05:59:33 +0200 Subject: [PATCH] vive les vieux hack bien moches. darcs-hash:20071012035933-7b604-d3fc15ab7c3b30118984a2625a29973fbb1aef24.gz --- gestion/hptools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gestion/hptools.py b/gestion/hptools.py index 316276ac..c664eeb2 100755 --- a/gestion/hptools.py +++ b/gestion/hptools.py @@ -20,7 +20,7 @@ from sre import findall try: path.append('/usr/scripts/gestion/secrets') - from secrets import config_snmp_secrete, reconf_snmp + from secrets import config_snmp_secrete, reconf_snmp, engineid except: # Si a pas le droit de lire config_snmp_secrete # on va tenter de tout faire en snmpv1 et communauté public @@ -120,7 +120,7 @@ class snmp : if version == '1' or version == '2c' : self.options = "-v %s -c '%s' %s " % ( version, community, host ) elif version =='3' : - self.options = "-v 3 -u %s -a %s -A '%s' -l authNoPriv" % ( username, authentication_protocol, authentication_pass ) + self.options = "-v 3 -e %s -u %s -a %s -A '%s' -l authNoPriv" % ( engineid[host.split('.',1)[0]], username, authentication_protocol, authentication_pass ) if privacy_pass : self.options += " -x DES -X '%s' -l authPriv" % privacy_pass self.options += " %s " % host