You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I must change a local user password on a large quantity of switches (cisco ios) that are all backed up in oxidized. I have tried to create a ruby script to do so, but as i change the config, I would like to save the current config with copy run start
But I don't know how to handle the "confirm" prompt.
The confirm prompt is Destination filename [startup-config]? and waits for 'y' or 'n', of course.
How to change the expected output for that very command only ?
Here is the main action inside a loop on each switch in the script :
#!/usr/bin/env rubyrequire'oxidized/script'Oxidized::Config.loadOxidized.setup_loggerOxidized::Script.new(:host=>'10.102.160.1')do |oxs|
putsoxs.cmd'conf t'putsoxs.cmd'username mylocaluser privilege 7 secret mylocalpwd'putsoxs.cmd'exit'putsoxs.cmd'copy run start'# Here I should change the expected answerputsoxs.cmd''end
The text was updated successfully, but these errors were encountered:
Hello,
I must change a local user password on a large quantity of switches (cisco ios) that are all backed up in oxidized. I have tried to create a ruby script to do so, but as i change the config, I would like to save the current config with
copy run start
But I don't know how to handle the "confirm" prompt.
The confirm prompt is
Destination filename [startup-config]?
and waits for 'y' or 'n', of course.How to change the expected output for that very command only ?
Here is the main action inside a loop on each switch in the script :
The text was updated successfully, but these errors were encountered: