Created
June 16, 2016 15:49
-
-
Save dalehamel/a198859845d04530f6f2ca15158662e9 to your computer and use it in GitHub Desktop.
enable snmp via web interface hack for supermircro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Enable SNMP | |
| USER= | |
| PASS= | |
| IPMI_HOST= | |
| SESSION_ID=$(curl -d "name=${USER}&pwd=${PASS}" "https://${IPMI_HOST}/cgi/login.cgi" --silent --insecure -i | awk '/Set-Cookie/ && NR != 2 { print $2 }') | |
| curl -X POST -H "Cookie: ${SESSION_ID}" --insecure "https://${IPMI_HOST}/cgi/op.cgi" -d "&op=config_snmp&en_snmp=on&ver_snmp=v2&rocommunity=public&rwcommunity=public" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you very much for idea =)
i have fixed one my needs with your help
https://gist.github.com/mykolq/b0cd188cd5fc6f3296c55e98bc9ba121