0

I've seen plenty of answers across the internet saying that to combat the

psql:FATAL: role <username> does not exist

one must use the createuser command, but about a dozen different attempts with that command have only yielded a similar error message.

I've installed PostgreSQL using Ubuntu 15.04's sudo apt-get install postgresql, but PostgreSQL permits to do absolutely nothing.

Do I need to install some dependencies or something?

Ben Sandeen
  • 1,403
  • 3
  • 14
  • 17
  • Here are some links that I unsuccessfully consulted: [http://stackoverflow.com/questions/15301826/psql-fatal-role-postgres-does-not-exist] [http://postgresql.nabble.com/role-does-not-exist-td5730246.html] [http://www.linuxquestions.org/questions/*bsd-17/psql-fatal-role-postgres-does-not-exist-error-935394/] – Ben Sandeen Sep 02 '15 at 21:34
  • change to the postgres user. from the command line `su - postgres` – Panama Jack Sep 02 '15 at 21:35
  • just tried that; it asked for a password, and when I entered my system password, it failed to authenticate :( – Ben Sandeen Sep 02 '15 at 21:36
  • Then you need to use `sudo` before the command. – Panama Jack Sep 02 '15 at 21:42
  • Please see https://help.ubuntu.com/community/PostgreSQL – Craig Ringer Sep 03 '15 at 00:03

1 Answers1

4

Try doing these actions as the postgres user:

$ sudo -u postgres -i

The PostgreSQL installation makes a postgres user which runs the PostgreSQL service. It is essentially the superuser of your database. In most cases, you don't know the password for this user but any superuser of a system can log in to other accounts.

Craig Ringer
  • 307,061
  • 76
  • 688
  • 778
Sam
  • 20,096
  • 2
  • 45
  • 71