# postgresql\_user module: fe\_sendauth: no password supplied

**URL:** <https://forum.ansible.com/t/postgresql-user-module-fe-sendauth-no-password-supplied/17104>\
**Category:** Ansible Project\
**Created:** [December 19, 2014, 5:57am UTC](https://forum.ansible.com/t/postgresql-user-module-fe-sendauth-no-password-supplied/17104 "2014-12-19T05:57:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Shi](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Michael\_Shi](https://forum.ansible.com/u/Michael_Shi)\
**Post date:** [December 19, 2014, 5:57am UTC](https://forum.ansible.com/t/postgresql-user-module-fe-sendauth-no-password-supplied/17104/1 "2014-12-19T05:57:46Z")

</div>

I’m trying to use the postgresql\_user module, but I keep getting **unable to connect to database: fe\_sendauth: no password supplied**

Doing the same on postgresql\_db module seems to work  
Is it a problem authenticating as the postgres user?

# users.yml

- name: PostgreSQL | Make sure the PostgreSQL users are present  
postgresql\_user:  
name: “{{item.name}}”  
password: “{{item.password | default(‘pass’)}}”  
state: present  
login\_host: “{{item.host | default(‘localhost’)}}”  
with\_items: postgresql\_users  
when: postgresql\_users|length \> 0

# main.yml

- include: users.yml  
tags: [postgresql, postgresql-users]  
sudo: yes  
sudo\_user: postgres

---

<div class="post-metadata">

**Author:** ![Michael\_Shi](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Michael\_Shi](https://forum.ansible.com/u/Michael_Shi)\
**Post date:** [December 20, 2014, 2:48pm UTC](https://forum.ansible.com/t/postgresql-user-module-fe-sendauth-no-password-supplied/17104/2 "2014-12-20T14:48:25Z")

</div>

Any ideas anyone?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [December 22, 2014, 12:28pm UTC](https://forum.ansible.com/t/postgresql-user-module-fe-sendauth-no-password-supplied/17104/3 "2014-12-22T12:28:49Z")

</div>

sudo\_user: postgres should not require a password on normal setups as  
it should use the local socket directly. Try setting it on the task  
in users.yml instead of on the include.
