Discussion:
[rancid] .cloginrc "master" password
Tobias Brodersen
2015-01-20 08:52:31 UTC
Permalink
Hello,
Im not sure if this forum is dead, hopefully there is a kind soul here,
whos able to help me with my probably minor problem.

I work as a Network Intern at Aarhus university, and I am currently working
on a project, so that I can add a few commands to our 2500 switches.

I have already installed RANCID on ubuntu, and im able to change config
with this shell script:
for line in $(cat iplist.txt); do sudo /usr/lib/rancid/bin/clogin -x
command.cmds -f /var/lib/rancid/.cloginrc $line; done

I followed this guide to get rancid up and running, and have used Man pages
to get to paste in commands
https://help.ubuntu.com/community/RANCID

Which writes commands the commands in command.cmds to all switches in
iplist.txt
now my problem is, the way that i authenticate through the switches, is via
the clogin -f command, where the guide i found on ubuntu tells me, that i
have to add username, password, method for all the devices that i want to
connect to. Can i get around that? so that all devies will use a "master"
username, password n method for all.. because i have a list of 2500
switches, and it will take more time, adding specifik login methods for
all, than updating all switches manually.

I hope you guys know what i mean:
Else i will try to explain myself again, my English aint that great.

Thanks

- Tobias!
James Andrewartha
2015-01-21 08:11:57 UTC
Permalink
Hi Tobias,
Post by Tobias Brodersen
now my problem is, the way that i authenticate through the switches, is
via the clogin -f command, where the guide i found on ubuntu tells me,
that i have to add username, password, method for all the devices that i
want to connect to. Can i get around that? so that all devies will use a
"master" username, password n method for all.. because i have a list of
2500 switches, and it will take more time, adding specifik login methods
for all, than updating all switches manually.
In your .cloginrc, you can have wildcards. Eg:
add user * admin
add userpassword * xxxxxxx
add method * ssh
add autoenable voip*.network.example.com 1

HTH,
--
James Andrewartha
Network & Projects Engineer
Christ Church Grammar School
Claremont, Western Australia
Ph. (08) 9442 1757
Mob. 0424 160 877
Loading...