修改snmp的community string

sed '/com2sec/s*mynetwork/s*default/c com2sec mynetwork default haha'  snmpd.conf  > tmp.conf

awk '{if($1=="com2sec"&&$2=="mynetwork")printf("com2sec mynetwork default hehe/n");else print $0}' snmp/snmpd.conf  >tmp.conf 

 

你可能感兴趣的:(修改snmp的community string)