[rancid] Configuration Modification with RANCID

Alex DEKKER rancid at ale.cx
Thu Oct 13 14:04:00 UTC 2016


On 11/10/16 17:14, Chris Davis wrote:
>
> for host in “list of switch IP addresses”; do clogin -c "config t;
>
> enable secret 5 $8$VNEb$ait.ADc45ru5cDNQEGa/.
>
...
>
> end; write memory;" $host > /tmp/$host.log & done
>
> The Cisco CLI barks at the encrypted string and the rest of the 
> commands work as expected.
>
> Hostname(config)#enable secret 5 .ADc45ru5cDNQEGa/.
>
> ERROR: The secret you entered is not a valid encrypted secret.
>
>
...
>
> As I write this, I suspect it’s the bash shell that’s mangling 
> things.   Any thoughts?
>
> Chris
>
>

No doubt, bash is expanding the $string to nothing. You either need to 
escape the $ or put some more/different quotes around it.


alexd

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20161013/7370ea94/attachment.html>


More information about the Rancid-discuss mailing list