# Privelege escalation using cisco ioscommand module

**URL:** <https://forum.ansible.com/t/privelege-escalation-using-cisco-ioscommand-module/2703>\
**Category:** Get Help\
**Tags:** ios, playbook, network\
**Created:** [December 2, 2023, 11:40pm UTC](https://forum.ansible.com/t/privelege-escalation-using-cisco-ioscommand-module/2703 "2023-12-02T23:40:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![johntxjw](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/johntxjw/32/3520_2.png) [@johntxjw](https://forum.ansible.com/u/johntxjw)\
**Post date:** [December 2, 2023, 11:40pm UTC](https://forum.ansible.com/t/privelege-escalation-using-cisco-ioscommand-module/2703/1 "2023-12-02T23:40:21Z")

</div>

Hello,

I’ve been having issues with cisco modules. I keep getting a privelege escalation error when I run my playbooks against some of my inventory in my home lab which I found odd since it started once I updated my ansible version.

I’ll attach some screnshots.  
 ![Screenshot from 2023-12-02 14-55-48](https://us1.discourse-cdn.com/ansible/original/2X/0/01f27d2c0925db20b5e8d69c8769add3da224298.png)

 ![Screenshot from 2023-12-02 14-55-10](https://us1.discourse-cdn.com/ansible/original/2X/1/13efcb67354d75b1253425e2445865490d6390aa.png)

I believe I may have found fix but I’m not sure and even worse I don’t know how to apply it.

Found this on Github

 ![Screenshot from 2023-12-02 17-39-37](https://us1.discourse-cdn.com/ansible/original/2X/f/f8d46e45579221f955bc4db3b44c3a869907ee6b.png)

---

<div class="post-metadata">

**Author:** ![jbericat](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jbericat/32/627_2.png) [@jbericat](https://forum.ansible.com/u/jbericat)\
**Post date:** [December 10, 2023, 10:25pm UTC](https://forum.ansible.com/t/privelege-escalation-using-cisco-ioscommand-module/2703/2 "2023-12-10T22:25:50Z")

</div>

Hello @johntxjw,

To assist you more effectively, could you please provide further details about your environment? Specifically, sharing the playbook’s task, especially the one labeled as “reload devices,” would be immensely helpful. Additionally, obtaining the playbook’s verbose output (using -vvv) and specifying the version of `ansible-core` you’re currently running would greatly aid in troubleshooting.

As a suggestion, you might consider updating the `cisco.ios` collection—assuming that’s the one in use—by executing the following command:

```bash
ansible-galaxy collection install cisco.ios --force

```

Also, make sure you’re using the full FQCN on your task, not just the module’s name, like in this example:

```yaml
- name: Backup current switch config (ios)
  cisco.ios.ios_config:
    backup: yes
  register: backup_ios_location
  when: ansible_network_os == 'cisco.ios.ios'

```

Furthermore, I recommend reviewing all the relevant information available on these documentation pages to ensure no crucial steps are overlooked:

[https://docs.ansible.com/ansible/latest/network/user\_guide/platform\_ios.html](https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html)

[https://docs.ansible.com/ansible/latest/playbook\_guide/playbooks\_privilege\_escalation.html#become-and-network-automation](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_privilege_escalation.html#become-and-network-automation)

Hope it helps!

EDIT: I forgot to ask, What ios version you got on the managed nodes that are failing to authenticate?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [May 30, 2024, 10:41pm UTC](https://forum.ansible.com/t/privelege-escalation-using-cisco-ioscommand-module/2703/3 "2024-05-30T22:41:49Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
