# user module on IBM AIX

**URL:** <https://forum.ansible.com/t/user-module-on-ibm-aix/30101>\
**Category:** Ansible Project\
**Created:** [April 12, 2019, 8:56am UTC](https://forum.ansible.com/t/user-module-on-ibm-aix/30101 "2019-04-12T08:56:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bruno\_Cochofel](https://avatars.discourse-cdn.com/v4/letter/b/4da419/32.png) [@Bruno\_Cochofel](https://forum.ansible.com/u/Bruno_Cochofel)\
**Post date:** [April 12, 2019, 8:56am UTC](https://forum.ansible.com/t/user-module-on-ibm-aix/30101/1 "2019-04-12T08:56:07Z")

</div>

Hi,

I’m trying to use the user module to create users on AIX, but I’m getting errors and I think the problem comes from the password hash that I’m using.  
The role runs fine on Linux, but not on AIX.

What is the best way to have a role running on both Linux and AIX to create users with passwd?

Thanks,  
Bruno

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [April 18, 2019, 4:18pm UTC](https://forum.ansible.com/t/user-module-on-ibm-aix/30101/2 "2019-04-18T16:18:38Z")

</div>

if the hash is the problem, probably a conditional assignment

password: {{ ansible\_os\_distribution == 'AIX'|ternary( 'aix hashed',  
'linux hashed') }}

---

<div class="post-metadata">

**Author:** ![klaasdemter](https://avatars.discourse-cdn.com/v4/letter/k/3bc359/32.png) [@klaasdemter](https://forum.ansible.com/u/klaasdemter)\
**Post date:** [April 18, 2019, 5:54pm UTC](https://forum.ansible.com/t/user-module-on-ibm-aix/30101/3 "2019-04-18T17:54:26Z")

</div>

You can also use the linux hashes on AIX.  
[https://www-01.ibm.com/support/docview.wss?uid=isg3T1027597](https://www-01.ibm.com/support/docview.wss?uid=isg3T1027597)
