A
A
Alexander Koshelev2018-10-13 23:01:13
PostgreSQL
Alexander Koshelev, 2018-10-13 23:01:13

Why does postgres require a password when restarting, and even no one is suitable?

Good evening, please tell me, I reload postgres and it asks for a password, and it also says that it is not correct

[email protected]:~$ sudo service postgresql restart
[sudo] password for postgres: 
Sorry, try again.

Initially, I did not enter any passwords, then I think that maybe it needs to be created? I create it by going into psql and entering the command ALTER USER username PASSWORD 'password' and even now it says Sorry, try again, although I created a password for another user with the same method and everything is fine, what's the problem? this is just some kind of stumbling block, I can’t do anything else without this postgres password

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SagePtr, 2018-10-13
@Xandr24

So where does postgres come from in the sudo group?
Under your user, execute the command sudo service postgresql restart, where it is written in the startup script which user to run the daemon from.

K
klepiku, 2018-10-14
@klepiku

if the password was not entered then either enter immediately or by default

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question