cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5916
Views
0
Helpful
1
Replies

use snmp to add user and password to a router/switch

hanwucisco
Level 1
Level 1

I am trying to add a user/pass to a switch that I lost login credentials, but it was unsuccessful. Any help would be appreciated.

two commands that I used, where 3.155 is tfpt server, where htest.txt file is stored.

====

snmpset -v 2c -c test *.120.112.49  1.3.6.1.4.1.9.9.96.1.1.1.1.5.222 a *.120.3.155

snmpset -v 2c -c test *.120.112.49  1.3.6.1.4.1.9.9.96.1.1.1.1.6.222 s htest.txt

=====

the htest.txt is only one line inside,

username hhh pass hhh

I do it from a linux box, this is that it reponses

[h@Jumper2 ~]$ snmpset -v 2c -c test *.120.112.49  1.3.6.1.4.1.9.9.96.1.1.1.1.5.222 a *.120.3.155

SNMPv2-SMI::enterprises.9.9.96.1.1.1.1.5.222 = IpAddress: *.120.3.155

[h@Jumper2 ~]$ snmpset -v 2c -c test *.120.112.49  1.3.6.1.4.1.9.9.96.1.1.1.1.6.222 s htest.txt

SNMPv2-SMI::enterprises.9.9.96.1.1.1.1.6.222 = STRING: "htest.txt"

thanks,

Han

1 Reply 1

Martin Ermel
VIP Alumni
VIP Alumni

if you are only using 2 snmp commands  to let the switch pull the config from your tftp server, than there are some commands missing ...

have a look here to get a documentation about this process:

https://supportforums.cisco.com/docs/DOC-1860

http://www.cisco.com/en/US/tech/tk648/tk362/technologies_configuration_example09186a0080094aa6.shtml

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: