Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: ciscodump - dump config info from routers into files

by stevieb (Canon)
on Nov 06, 2015 at 15:30 UTC ( #1147105=note: print w/replies, xml ) Need Help??

in reply to ciscodump - dump config info from routers into files

One way to avoid having the password documented in the config file, is to provide the user of the script the option of setting it in their shell's ENV instead. This would be temporary and only visible within the current shell running the script. If they have different passwords for each device, it would be cumbersome (it could be done though). Here's an (untested) example:

my $pass; if (defined $ENV{PASS}){ $pass = $ENV{PASS}; } elsif (defined $ini->{$host}{pass}){ $pass = $ini->{$host}{pass}; } elsif (defined $ini->{_}{pass}) { $pass = $ini->{_}{pass} } else { die "no password could be found"; }

Replies are listed 'Best First'.
Re^2: ciscodump - dump config info from routers into files
by soonix (Canon) on Nov 06, 2015 at 20:44 UTC

    Yes, that would have been an option, as in my case, there was only 1 system with a different password.

    But as we are using KeePass already, the next step may probably incorporating File::KeePass. Now, the password for the KeePass database… ;-)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1147105]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2021-09-17 00:48 GMT
Find Nodes?
    Voting Booth?

    No recent polls found