# Backup - user issues

**URL:** <https://forum.ansible.com/t/backup-user-issues/26705>\
**Category:** Ansible Project\
**Created:** [February 12, 2018, 10:51am UTC](https://forum.ansible.com/t/backup-user-issues/26705 "2018-02-12T10:51:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DOkuwa](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dokuwa/32/1471_2.png) [@DOkuwa](https://forum.ansible.com/u/DOkuwa)\
**Post date:** [February 12, 2018, 10:51am UTC](https://forum.ansible.com/t/backup-user-issues/26705/1 "2018-02-12T10:51:55Z")

</div>

Hello guys

I am trying to backup my config on a router  
but I want to use the login details on the router for ansible e.g admin as written below to use to log into the router and not the ansible user on the ansible server  
Please tell me how I can do this .  
when this playbook is run it uses the ansible user to log in

- name: collect default set of facts  
hosts: 10.101.250.41  
tasks:
- name: collect default sets of facts and configuration  
junos\_facts:  
gather\_subset: config  
username: admin  
password: xxxxx

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [February 12, 2018, 2:40pm UTC](https://forum.ansible.com/t/backup-user-issues/26705/2 "2018-02-12T14:40:44Z")

</div>

When connecting to network devices you need to use "connection: local" on the play or "delegate\_to: localhost" on the task.

---

<div class="post-metadata">

**Author:** ![DOkuwa](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dokuwa/32/1471_2.png) [@DOkuwa](https://forum.ansible.com/u/DOkuwa)\
**Post date:** [February 12, 2018, 2:58pm UTC](https://forum.ansible.com/t/backup-user-issues/26705/3 "2018-02-12T14:58:33Z")

</div>

Thanks  
I am still getting another error message

ansible@ansible-new:/etc/ansible$ ansible-playbook -i hosts backup\_config-junos-facts.yml  
PLAY [collect default set of facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
TASK [Gathering Facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [10.101.250.41]: FAILED! =\> {“msg”: “failed to transfer file to /tmp/tmpoJI85F error: unknown command: /bin/sh/setup.py:\n\nscp: error: unknown command: /bin/sh/setup.py: No such file or directory\n”}  
[WARNING]: Could not create retry file ‘/etc/ansible/backup\_config-junos-  
facts.retry’. [Errno 13] Permission denied: u’/etc/ansible  
/backup\_config-junos-facts.retry’

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
10.101.250.41 : ok=0 changed=0 unreachable=0 failed=1

ansible@ansible-new:/etc/ansible$ tail -f ansible.log 2018-02-12 14:48:12,297 p=31643 u=ansible | 10.101.250.41 : ok=0 changed=0 unreachable=0 failed=1  
2018-02-12 14:52:07,004 p=31666 u=ansible | PLAY [collect default set of facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
2018-02-12 14:52:07,011 p=31666 u=ansible | TASK [Gathering Facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
2018-02-12 14:52:12,906 p=31666 u=ansible | fatal: [10.101.250.41]: FAILED! =\> {“msg”: “failed to transfer file to /tmp/tmpoJI85F error: unknown command: /bin/sh/setup.py:\n\nscp: error: unknown command: /bin/sh/setup.py: No such file or directory\n”}  
2018-02-12 14:52:12,908 p=31666 u=ansible | [WARNING]: Could not create retry file ‘/etc/ansible/backup\_config-junos-  
facts.retry’. [Errno 13] Permission denied: u’/etc/ansible  
/backup\_config-junos-facts.retry’  
2018-02-12 14:52:12,908 p=31666 u=ansible | PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
2018-02-12 14:52:12,908 p=31666 u=ansible | 10.101.250.41 : ok=0
