- There are two levels to configure network access. In postgresql.conf (listen_addresses), you can configure the bind addresses, and open remote connections. In pg_hba.conf, you can tell PostgreSQL how to authenticate network connections. Depending on the IP range that a request comes from, different rules can be applied.Â
- Basically, the difference between a user and a role is academic. When creating a role, the default value is NOLOGIN, which is not the case when you use CREATE USER. Otherwise, roles and users can be considered to be the same.Â
- This is simple. You can use ALTER USER to do the job, as shown in the following example:
test=# ALTER USER hs PASSWORD 'abc';
ALTER ROLE
Keep in mind that passwords are not necessarily stored in PostgreSQL. If you are using LDAP authentication, or some other external method,...