Postgres problem

After some time I’ve logged in in my postgres database and I discovered some strange databases and users I have never create. I try to delete them but i seem not to be superuser, while I’m sure to have assigned the attribute to myself. If I list all roles there is not one superuser.

Have I been hacked? I don’t know, but the serious question is how do I crate an account with superuser privileges in order to solve the problem?

I really really hope that I don’t have to reinstall postgres.

Thanks in advance for any help

Cheers Irene


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Ok, since I was really worried, I made a backup of my databases and restored the dorplet backup of a while ago, and yes, all strange databases and users are gone and I’m superuser again.

I really start to think that I have been hacked, and the question is how to avoid this in the future?

Hi jwilson, the database names are: bxotgy. jbozdr, gebdko,ovqlfr, rfngpq, ucxmri, utqlan, ykbuca… not really names I would give. They have further no tables or other public schemas.

The owner is everywhere postgres. The user is s48bc612 | Create role, Create DB, Replication +| {}

I created a user (myself) upon installation and I gave the superuser privileges, but now they are gone. So I can’t delete or change anything in those databases irene | Create role, Create DB | {}

I hope this clarifies the problem.

Hi imeyer1, are you able to post what the names of those databases and users are? That way it may be easier to work out where they’ve come from.

Also, did you set up a super user when you created postgres?