svacmconfig

来自「开发snmp的开发包有两个开放的SNMP开发库」· 代码 · 共 39 行

TXT
39
字号
#!/bin/sh# standard V1 configuration: testcommunity1 testcommunity2# testcommunity1 can access .1.3.6.1.2.1.1.1, others are denied# generically set up the community "testcommunity1 and testcommunity2" for various snmp# version access to the agent.if [ "x$snmp_version" = "x" ]; then  snmp_version="any"fiCONFIGAGENT [snmp] persistentdir $SNMP_TMP_PERSISTENTDIRCONFIGAGENT rocommunity testrocommunity 127.0.0.1 .1.3.6.1.2.1.1.5.0CONFIGAGENT rwcommunity testrwcommunity 127.0.0.1 .1.3.6.1.2.1.1.5.0CONFIGAGENT com2sec testcommunitysec1  default testcommunity1CONFIGAGENT com2sec testcommunitysec2  default testcommunity2if [ "$SNMP_TRANSPORT_SPEC" = "udp6" -o "$SNMP_TRANSPORT_SPEC" = "tcp6" ];then CONFIGAGENT com2sec6 testcommunitysec1  default testcommunity1CONFIGAGENT com2sec6 testcommunitysec2  default testcommunity2fiif [ "$SNMP_TRANSPORT_SPEC" = "unix" ];then CONFIGAGENT com2secunix testcommunitysec1  testcommunity1CONFIGAGENT com2secunix testcommunitysec2  testcommunity2fiCONFIGAGENT group   testcommunitygroup1  $snmp_version     testcommunitysec1CONFIGAGENT group   testcommunitygroup2  $snmp_version     testcommunitysec2CONFIGAGENT view    system1     included .1.3.6.1.2.1.1.1 CONFIGAGENT view    system2     included .1CONFIGAGENT view    system2     excluded .1.3.6.1.2.1.1.1 CONFIGAGENT 'access  testcommunitygroup1  "" any noauth exact system1 none none'CONFIGAGENT 'access  testcommunitygroup2  "" any noauth exact system2 none none'

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?