Discussion:
[rancid] anyway to escape prevent expect interpretation of commands sent to clogin
d***@vmware.com
2011-10-20 04:30:37 UTC
Permalink
I would like to bulk build change some locally store hashed passwords. Unfortunately the hashed passwords contain '$' which is causing the clogin spawning of expect to crash.

example of the execution:

vyalogin -x commandsfile some-vyatta-router

commandsfile has the following:
configure
set system login user ppark authentication encrypted-password '$1$3MvsA/KO$mpbdAwnlTZEcXXT.sWXqa10'
set system login user ppark level admin
show system login
commit
save
exit

The $1$3 are causing problem in either the clogin or expect. Is there a way to escape those character?

Thanks,
Daniel Chen
john heasley
2011-10-20 14:25:11 UTC
Permalink
Post by d***@vmware.com
I would like to bulk build change some locally store hashed passwords. Unfortunately the hashed passwords contain '$' which is causing the clogin spawning of expect to crash.
\$

depending on context, it may need to be \\\$

Loading...