A
A
Alexander Koshelev2018-10-13 22:16:21
PostgreSQL
Alexander Koshelev, 2018-10-13 22:16:21

Why is asking for a password in postgres?

Good evening everyone!
I transfer my project to the server and I need postgres to work.
I followed this
manual Manual
but I don’t understand a dick !!!! It seems that I created a new user alejandro and another alejandroPG,
I go into postgres,
sudo -i -u postgres
and then I want to go into my role alejandro, which was created in postgress, but it asks for a password from postgress, nothing asked for a password during installation, here is the log

[email protected]:~$ sudo -i -u postgres
[sudo] password for alejandro: 
[email protected]:~$ sudo -i -u alejandro
[sudo] password for postgres: 
Sorry, try again.
[sudo] password for postgres:

I need to create a table with a non-default role and a non-default schema, but I'm stuck at such an early stage, please tell me who can correctly create a role and then create a schema and table on its behalf ???(((
PS By the way, all the roles yes, checked now
Role name  |                         Attributes                         | Member of 
-------------+------------------------------------------------------------+-----------
 alejandro   | Superuser, Create role, Create DB                          | {}
 alejandroPG | Superuser, Create role, Create DB                          | {}
 postgres    | Superuser, Create role, Create DB, Replication, Bypass RLS | {}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2018-10-13
@Xandr24

[email protected]:~$ sudo -i -u postgres
[sudo] password for alejandro:

It immediately writes in black and white that the password is requested by the sudo command, and not by postgres,
or configure sudoers so that your user does not ask for a password, or log in as the postgres user, or even deal with accounts and your goals.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question