Reply

How to see via Perl API which device uses which Credential

BBaudoux
Techie
Posts: 18
2436     0
 

sorry, the text of the

BBaudoux
Techie
Posts: 18
2436     0

sorry, the text of the question did not appear, here it is:

I'm trying to find a Perl API which would tell me the credentials (both CLI & SNMP) associated to a given device, but I do not seem to find it.

This information must exist somewhere (device details shows it).

Does anybody have a clue?

Thanks,

Bernard Baudoux.

 

For SNMP v2c community

Adviser
Posts: 357
2436     0

For SNMP v2c community strings, you can get the value by calling the DeviceCommunity method on the Device object, as long as you have view_sensitive privilege.

For CLI and SNMPv3, you can get the encryped value via the Device Password Log controller:

https://netmri/api/2.9/device_password_logs/search?DevicePwLogStatus=OK

However, there is no way to get the unencrypted value via the API.

 

 

 

Should be simple enough to

DSchmidt
Techie
Posts: 8
2436     0

Should be simple enough to make your own little rainbow table after some manual checking of the first few encrypted values you get back with what you can find in the NetMRI UI.

Thanks John.

BBaudoux
Techie
Posts: 18
2436     0

Thanks John.

I've tried, but I get an error message:

my $DevCommunity = $easy->broker->InfraDevice->DeviceCommunity->index({ DeviceID => $DeviceID });

returns NetMRI general/validation-failed The action failed because the request was not valid. DeviceID is required.

However, $DeviceID contains a valid device ID number.

Any idea why I get this message?

Thanks,

Bernard.

 

Sure. Remove the "index" part

Adviser
Posts: 357
2436     0

Sure. Remove the "index" part:

 

my $DevCommunity = $easy->broker->InfraDevice->DeviceCommunity({ DeviceID => $DeviceID });

Another way to call it is if you have a device or infradevice object, you can call the method on that object (this may only be in one of the most recent releases):

my $DevCommunity = $device->DeviceCommunity();

 

John

 

Highlighted

Working, Thanks John.

BBaudoux
Techie
Posts: 18
2436     0

Working, Thanks John.

Bernard.

 

Showing results for 
Search instead for 
Do you mean 

Recommended for You