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

33 views
Skip to first unread message

saravan...@gmail.com

unread,
Nov 22, 2017, 7:25:10 PM11/22/17
to Ansible Project
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

Nigel Metheringham

unread,
Nov 23, 2017, 8:07:24 AM11/23/17
to ansible...@googlegroups.com
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 for some info on how to get crypted passwords.

    Nigel.
23 November 2017 at 00:25
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e78d6168-fdd5-46a4-a271-6e5c1b407369%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
[ Nigel Metheringham ------------------------------ ni...@dotdot.it ] 
[                 Ellipsis Intangible Technologies                  ]
 

saravan...@gmail.com

unread,
Nov 23, 2017, 5:47:05 PM11/23/17
to Ansible Project
HI

Thanks for the update.

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

Regards
Saravana
Reply all
Reply to author
Forward
0 new messages