# Using ansible changing password for root account -- password error after changing

**URL:** <https://forum.ansible.com/t/using-ansible-changing-password-for-root-account-password-error-after-changing/26111>\
**Category:** Ansible Project\
**Created:** [November 23, 2017, 12:25am UTC](https://forum.ansible.com/t/using-ansible-changing-password-for-root-account-password-error-after-changing/26111 "2017-11-23T00:25:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![saravana102030](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@saravana102030](https://forum.ansible.com/u/saravana102030)\
**Post date:** [November 23, 2017, 12:25am UTC](https://forum.ansible.com/t/using-ansible-changing-password-for-root-account-password-error-after-changing/26111/1 "2017-11-23T00:25:10Z")

</div>

Hi

I am executing playbook for changing password but its password not working after changing it,

Playbook as follows

- hosts: all  
tasks:
- name: Change root password  
user: name=test update\_password=always password=“test123”

Please help in resolve

Regards  
Saravana

---

<div class="post-metadata">

**Author:** ![Nigel\_Metheringham](https://avatars.discourse-cdn.com/v4/letter/n/3ec8ea/32.png) [@Nigel\_Metheringham](https://forum.ansible.com/u/Nigel_Metheringham)\
**Post date:** [November 23, 2017, 1:06pm UTC](https://forum.ansible.com/t/using-ansible-changing-password-for-root-account-password-error-after-changing/26111/2 "2017-11-23T13:06:29Z")

</div>

The password entry for the user module is a crypted password, not a clear text one.

That will, on a relatively modern system, look something like  
$6$saltchars$passchars

for example:-  
`$6$0JvQ1LLFESzA16.I$JVdKAIq0igudTq06BMqzT9rL1gRawMPwLr9U3/kBMKUqZdONfa0wubC89C35LKl3aE16CRH57BfGb4ygPLggL1`

[Yes they really are that long]

See [https://unix.stackexchange.com/questions/52108/how-to-create-sha512-password-hashes-on-command-line](https://unix.stackexchange.com/questions/52108/how-to-create-sha512-password-hashes-on-command-line) for some info on how to get crypted passwords.

Nigel.

---

<div class="post-metadata">

**Author:** ![saravana102030](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@saravana102030](https://forum.ansible.com/u/saravana102030)\
**Post date:** [November 23, 2017, 10:47pm UTC](https://forum.ansible.com/t/using-ansible-changing-password-for-root-account-password-error-after-changing/26111/3 "2017-11-23T22:47:04Z")

</div>

HI

Thanks for the update.

i have one more query how to do ansible without copying the keys to remote host.

Regards  
Saravana
