# Error: invalid authorization specification

**URL:** <https://forum.elixirforum.com/t/error-invalid-authorization-specification/4067>\
**Category:** Questions\
**Tags:** ecto\
**Created:** [March 9, 2017, 11:17pm UTC](https://forum.elixirforum.com/t/error-invalid-authorization-specification/4067 "2017-03-09T23:17:08Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Eiji](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eiji/32/36743_2.png) [@Eiji](https://forum.elixirforum.com/u/Eiji)\
**Post date:** [March 10, 2017, 11:14am UTC](https://forum.elixirforum.com/t/error-invalid-authorization-specification/4067/4 "2017-03-10T11:14:40Z")

</div>

@michalmuskala and @OvermindDL1: thanks, how to change it to listen on port? I saw port configuration in `postgresql.conf`, but uncommenting it not and restarting not works.

> psql -h localhost -U postgres  
> psql: FATAL: Ident authentication failed for user “postgres”

Looks like unix sockets are turn on by default with `localhost` configuration, but this is required by ecto:  
[https://github.com/elixir-ecto/ecto/issues/1207#issuecomment-172570064](https://github.com/elixir-ecto/ecto/issues/1207#issuecomment-172570064)

**Note** : this configuration now works:

```elixir
local all all md5  
 # IPv4 local connections:
host all all 127.0.0.1/32 md5
 # IPv6 local connections:
host all all ::1/128 ident

```

but is `md5` safe?

---

_[View the full topic](https://forum.elixirforum.com/t/error-invalid-authorization-specification/4067)._
