Thanks Werner for your quickly response,

I manual create a new user "raytest" and set password to "123456". I don't 
find the crypted password of the new user match the format that you 
mention. Do you help find the crypt method? Thanks.

The below is the crypted password string in /etc/security/passwd file.
raytest:
        password = bo8Dqpvt3wnb.
        lastupdate = 1527172932
        flags = ADMCHG


Thanks
Ray

在 2018年5月23日星期三 UTC+8下午8:24:54,Werner Flamme写道:
>
> [email protected] <javascript:> [23.05.2018 13:24]: 
> > Hello everybody, 
> > 
> >      I am using Ansible user module to create Aix machine account. I 
> found 
> > that the new created user can't login Aix machine. 
> > 
> >      The below is my some test step; 
> >      1. Generate a crypted password by ansible provided method. The 
> > cleartext password is "123456" 
> > 
> http://docs.ansible.com/ansible/faq.html#how-do-i-generate-crypted-passwords-for-the-user-module
>  
> >      2. Use below command to create a new Aix user successful. 
> > ansible 192.168.2.*** -m "user" -a "state=present name=ray 
> > 
> password=$6$PbSwE6eWakaP9VSl$GjZhuR5.6ICTM6K/.91gss2iYbhJoLU1B51XXqxCMIcVi17IMAegxlcfWNfWkuYkldRuKJLw9xjTp/F4.hFYq0"
>  
>
> >      3. Login Aix machine with the new user failed. The reason is error 
> > password. 
> > 
> > If we get a crypted password by Aix from /etc/security/passwd, replace 
> the 
> > above password that was crypted by ansible doc with the new crypted 
> > password. We can login Aix with new account. 
> > 
> > So, the issue reason should be Aix machine can't accept the cryted 
> password 
> > that is generated by referring Ansible doc. 
> > How can we generate a correctly password for Aix machine?  Thank a lot. 
>
> Currently, you use the SHA512 algorithm to create a password, this is 
> recognized by $6$ at the beginning of the string. 
>
> When you create a user manually, how does the password string look like? 
>
> $1$ -> crypt; $2$, $2a$, $2y$ -> blowfish; $5$ -> sha256, $6$ -> sha512 
>
> Maybe your AIX does not support sha512 passwords, so you must look at 
> the hashing that is possible. If you create a user locally and the 
> password starts with $2y$, you have to create the ansible password with 
> blowfish algorithm instead of sha512. 
>
> HTH, Werner 
>
> -- 
>
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/84db4a9a-a822-4e92-b318-5db558bfedd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to