After Ubuntu is installed through the Software center, the configuration files are located in the following directory
I created other database users with the superuser, and found that it was not necessary to log in, and it was troublesome to create Linux users with the same name. A problem was found in the configuration file pg_hba.conf.
One of the
This setting to change, the first parameter is local for localhost, the second parameter All refers to all databases, the third parameter All refers to all users, the last peer parameter refers to the authentication method, this should be changed.
Peer refers to the database users to match the Linux system users, that is, the same name, no password at this time, that is, set the password and do not enter. We're going to change to MD5 .
This allows you to log in with a password without having to build another user with the same name as Linux.
Remote logins can be allowed after the last line's IP address is set. Of course also set the listening port in another profile postgresql.conf listen_addresses = ' * '
Some issues with PostgreSQL configuration