- Community Home
- >
- Networking
- >
- IMC
- >
- Re: How to delete SNMP Communities via IMC?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-25-2016 07:36 AM
ā07-25-2016 07:36 AM
Just starting to learn how to use IMC.
Really happy to have found the batch setting of new community names via
Resource > Batch Operation > Device/Interface Configuration Guide
But I get the impression that this is working for adding new SNMP names, but how do I batch that I want to delete the "Public" and "Private" default SNMP communities?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-25-2016 01:33 PM
ā07-25-2016 01:33 PM
SolutionI think the best way to do this will be to create a configuration template (Service -> Configuration Center), and push that out to those devices.
Create a config template that contains "no snmp-server community public", or whatever the equivalent is for your devices.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-26-2016 03:52 AM
ā07-26-2016 03:52 AM
Re: How to delete SNMP Communities via IMC?
Great, thanks a lot!
I made a script with these 2 lines and it worked perfect when testing against a HP Procurve 2520 switch:
no snmp-server community public
no snmp-server community private
May I ask you one more thing?
I thought I could add 2 more lines and have the same script add the SNMP communities I want to have:
snmp-server community donald rw
snmp-server community duck ro
But those lines fail with a "TELNET syntax error".
Is there a way to test that the commands in the script are correct or not? I tried to Telnet to the switch, went to CLI and entered as an example "no snmp-server community public" which I know works via IMC, but the Telnet window just say "Invalid input: snmp-server".
And what would be the correct syntax in my little script to have the communities added?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-26-2016 04:10 AM - edited ā07-26-2016 04:14 AM
ā07-26-2016 04:10 AM - edited ā07-26-2016 04:14 AM
Re: How to delete SNMP Communities via IMC?
I played around and actually found the answer to my own questions :-)
So to test any script commands, what I should do in CLI is to first issue the command "config" and then I can enter the lines I have in my script.
And the correct syntax to add an SNMP community is:
snmp-server community Donald unrestricted
So my tiny 4 lines that will save me some time are simply:
no snmp-server community public
no snmp-server community private
snmp-server community Donald unrestricted
snmp-server community Duck restricted
Thanks for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-26-2016 03:16 PM
ā07-26-2016 03:16 PM
Re: How to delete SNMP Communities via IMC?
Good to hear you got it working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-27-2016 06:26 PM
ā07-27-2016 06:26 PM
Re: How to delete SNMP Communities via IMC?
Also note that the CLI script execution function does not automatically save the modified configuration to memory.
So add a write memory (or equivalent for your OS) statement to the end of your script to save. Otherwise the next reboot will clear your changes.
That can be handy not to save if you are just testing or want an easy recovery - a reboot will quickly restore the old config.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-28-2016 05:52 AM
ā07-28-2016 05:52 AM
Re: How to delete SNMP Communities via IMC?
Thanks, I wouldn't have thought about that!