Cannot login to postgres with newly created users

by Brandon   Last Updated September 10, 2018 20:06 PM

I have created a number of users in postgres using createuser --interactive --password but whenever I run sudo -i -u newuser I receive the following error:

sudo: unknown user: staging
sudo: unable to initialize policy plugin

I then checked the user list when using the default postgres user to see if there were in fact any other users. It returned the following:

List of roles Role name | Attributes | Member of -----------+------------------------------------------------+----------- newuser | Superuser, Create role, Create DB | {} newuser2 | Superuser, Create role, Create DB | {} newuser3 | Superuser, Create role, Create DB, Replication | {} postgres | Superuser, Create role, Create DB, Replication | {}

So I know that they are there. Why is it failing?

My end goal is to use this local db as my database for my deployed server. They are both installed on the same vm and I just want the REST calls from my server to interact with the local database, which I assume should be no problem, if I could ever connect to it.

Related Questions

Updated April 01, 2016 08:02 AM

Updated April 15, 2019 06:06 AM

Updated February 05, 2019 16:06 PM

Updated July 14, 2015 18:02 PM

Updated August 04, 2015 16:03 PM