Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netmiko nornir send_command needs enable= #64

Closed
jeffkala opened this issue Sep 22, 2022 · 6 comments · Fixed by #144
Closed

Netmiko nornir send_command needs enable= #64

jeffkala opened this issue Sep 22, 2022 · 6 comments · Fixed by #144

Comments

@jeffkala
Copy link
Contributor

result = task.run(task=netmiko_send_command, command_string=command)

Right now if you go into > mode on cisco_ios and you don't have permissions to run show run it isn't going to try the DEVICE_SECRET and go into enable mode to get the config.

The job itself shows successful but the backup itself in Git is saved as:

                      ^
% Invalid input detected at '^' marker.
@jeffkala
Copy link
Contributor Author

@merriry
Copy link

merriry commented Sep 22, 2022

changing line 237 to
result = task.run(task=netmiko_send_command, command_string=command, enable=True)

does work as a workaround.

@jeffkala
Copy link
Contributor Author

Duplication steps:

  1. Use either creds_env or settings_env credential paths.
  2. Have your PASSWORD and SECRET be different values. (not positive this matters)
  3. Run a backup on a device that drops the user into > and user doesn't have show run access unless they go into enable mode.

@jvanderaa
Copy link
Contributor

Run a backup? What is this in relation to? @jeffkala

@jeffkala
Copy link
Contributor Author

jeffkala commented Oct 3, 2022

@jvanderaa this is related to GC plugin, where I was able to duplicate this.

@JostLuebbe
Copy link

Hey guys, any chance we could get @merriry's suggestion merged into the main library? The fix works great, but I'm currently having to maintain this workaround as part of our build process and its such a small thing I was hoping we could just make make it available by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants