# Changing $HOME

**URL:** <https://forum.ansible.com/t/changing-home/13448>\
**Category:** Ansible Project\
**Created:** [September 10, 2013, 5:18pm UTC](https://forum.ansible.com/t/changing-home/13448 "2013-09-10T17:18:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skylar\_Saveland](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@Skylar\_Saveland](https://forum.ansible.com/u/Skylar_Saveland)\
**Post date:** [September 10, 2013, 5:18pm UTC](https://forum.ansible.com/t/changing-home/13448/1 "2013-09-10T17:18:27Z")

</div>

The user I’m trying to ssh in with has no home directory. In fact, the variable, $HOME, is wrong on the machine for this user’s shell. I try to set the variable to something that would be valid in the ANSIBLE\_HOSTS file eg:

myhost ansible\_connection=paramiko HOME=/tmp/home

but, it does not seem to matter. I’ve tried ssh and paramiko as the ansible\_connection to no avail.

> EXEC /bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-1378832732.2-166278481249716 && chmod a+rx $HOME/.ansible/tmp/ansible-1378832732.2-166278481249716 && echo $HOME/.ansible/tmp/ansible-1378832732.2-166278481249716’
> 
> myhost | FAILED =\> could not create temporary directory: SSH exited with return code 1

I would actually like to ssh in as userA and then su to userB. But, I would be content for the moment, if I could just run the command in the Getting Started guide on this funky host:

> $ ansible all -m ping --ask-pass

Only been at this for a few minutes so pardon me if this is obvious.

Thanks,  
Skylar

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [September 10, 2013, 6:06pm UTC](https://forum.ansible.com/t/changing-home/13448/2 "2013-09-10T18:06:43Z")

</div>

in ansible.cfg you can set remote\_tmp to something different (it defaults to $HOME/.ansible/tmp)

also you can use the ANSIBLE\_REMOTE\_TEMP env var

---

<div class="post-metadata">

**Author:** ![Skylar\_Saveland](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@Skylar\_Saveland](https://forum.ansible.com/u/Skylar_Saveland)\
**Post date:** [September 11, 2013, 4:11am UTC](https://forum.ansible.com/t/changing-home/13448/3 "2013-09-11T04:11:45Z")

</div>

Thank you very much; makes perfect sense.
