Discussion:
[rancid] cloginrc order
heasley
2015-04-18 14:40:06 UTC
Permalink
.cloginrc is read strictly in order so if you have "add user * joe" at
the very top, it will be used everywhere.
Check the ordering of .loginrc as step one.
Step 2 is to run clogin manually and check the output
Would it be useful if clogin et al with an option printed the cloginrc line
that matched?
Alan McKinnon
2015-04-19 08:16:05 UTC
Permalink
Post by heasley
.cloginrc is read strictly in order so if you have "add user * joe" at
the very top, it will be used everywhere.
Check the ordering of .loginrc as step one.
Step 2 is to run clogin manually and check the output
Would it be useful if clogin et al with an option printed the cloginrc line
that matched?
I think that would be very useful indeed.

I've had to rationalize very large .cloginrc files in the past, it
wasn't fun when I got the order wrong :-)
--
Alan McKinnon
***@gmail.com
Howard Jones
2015-04-20 09:21:07 UTC
Permalink
I think that would be very useful indeed. I've had to rationalize very
large .cloginrc files in the past, it wasn't fun when I got the order
wrong :-)
Also something to list all the possible hits (not just the one used) for
a given device would be handy, so you can see where something is
unintentionally masking your (for example) ACS credentials at the bottom
of the last included file.

Howie
heasley
2015-04-23 15:51:59 UTC
Permalink
Post by Howard Jones
I think that would be very useful indeed. I've had to rationalize very
large .cloginrc files in the past, it wasn't fun when I got the order
wrong :-)
Also something to list all the possible hits (not just the one used) for
a given device would be handy, so you can see where something is
unintentionally masking your (for example) ACS credentials at the bottom
of the last included file.
Howie
You can try ftp://ftp.shrubbery.net/pub/rancid/alpha/rancid-3.2.99.tar.gz
which adds the -m and -M options:

unix% ./clogin -m router
router
autoenable:/home/heas/.cloginrc:375: *
password:/home/heas/.cloginrc:363: router*
user:/home/heas/.cloginrc:360: router*
userpassword:/home/heas/.cloginrc:362: router*
method:/home/heas/.cl:1: router
unix%

unix% ./clogin -M router
router
autoenable:/home/heas/.cloginrc:375: *
password:/home/heas/.cloginrc:363: router*
password:/home/heas/.cloginrc:378: *
user:/home/heas/.cloginrc:360: router*
user:/home/heas/.cloginrc:373: *
userpassword:/home/heas/.cloginrc:362: router*
method:/home/heas/.cl:1: router
method:/home/heas/.cloginrc:376: *
unix%

its only supported by clogin ATM and may yet change. suggestions welcome.
Loading...