/usr/share/yunohost/hooks/conf_regen/35-postgresql

:uk:/:us: Message template (english)

Description of my issue

My problem is described with following link.
(Postgres user / server security)

During my search I found this:

cat /usr/share/yunohost/hooks/conf_regen/35-postgresql
----------------------->
#!/bin/bash

set -e
. /usr/share/yunohost/helpers

if ! dpkg --list | grep -q "ii *postgresql-$PSQL_VERSION "
then
    echo 'postgresql is not installed, skipping'
    exit 0
fi

if [ ! -e "/etc/postgresql/$PSQL_VERSION" ]
then
    ynh_die --message="It looks like postgresql was not properly configured ? /etc/postgresql/$PSQL_VERSION is missing ... Could be due to a locale issue, c.f.https://serverfault.com/questions/426989/postgresql-etc-postgresql-doesnt-exist"
fi


do_pre_regen() {
    return 0
}

do_post_regen() {
    #regen_conf_files=$1
  
    # Make sure postgresql is started and enabled
    # (N.B. : to check the active state, we check the cluster state because
    # postgresql could be flagged as active even though the cluster is in
    # failed state because of how the service is configured..)
    systemctl is-active postgresql@$PSQL_VERSION-main -q || ynh_systemd_action --service_name=postgresql --action=restart
    systemctl is-enabled postgresql -q || systemctl enable postgresql --quiet
  
    # If this is the very first time, we define the root password
    # and configure a few things
    if [ ! -f "$PSQL_ROOT_PWD_FILE" ] || [ -z "$(cat $PSQL_ROOT_PWD_FILE)" ]; then
        ynh_string_random >$PSQL_ROOT_PWD_FILE
    fi

    [ ! -e $PSQL_ROOT_PWD_FILE ] || { chown root:postgres $PSQL_ROOT_PWD_FILE; chmod 440 $PSQL_ROOT_PWD_FILE; }
    
    sudo --login --user=postgres psql -c"ALTER user postgres WITH PASSWORD '$(cat $PSQL_ROOT_PWD_FILE)'" postgres
  
    # force all user to connect to local databases using hashed passwords
    # https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html#EXAMPLE-PG-HBA.CONF
    # Note: we can't use peer since YunoHost create users with nologin
    #  See: https://github.com/YunoHost/yunohost/blob/unstable/data/helpers.d/user
    local pg_hba=/etc/postgresql/$PSQL_VERSION/main/pg_hba.conf
    ynh_replace_string --match_string="local\(\s*\)all\(\s*\)all\(\s*\)peer" --replace_string="local\1all\2all\3md5" --target_file="$pg_hba"

    ynh_systemd_action --service_name=postgresql --action=reload
}

do_$1_regen ${@:2}


I think this script file causes my problem. How can I solve this problem?
Thanks for your attention.

What app are you using to access the database?
YunoHost manages postgresql, so it will take over any manual changes

Hi,
I’m using it with a java program. Postgresql reachable only locally. Web and mobile apps connect to database via this java app.

How to change the password in β€˜$(cat $PSQL_ROOT_PWD_FILE)’? Why is the Postgres password reset by the system at regular intervals? How can I change the password in this file to a password I want?

Thanks.

It is not clear what your issue is … you shouldnt have to care what is postgresql password - worst case scenario you just copypaste the automatic configured value in your custom program

But your original post shows an SSH log filled with connections attempt using the postgres user … what the heck … Of course this doesnt work because, as the message states, this user is not allowed to connect on SSH … but why would anyone want to connect on SSH using this user in the first place …

Hello,
I actually have two Yunohost servers running on two separate VPSs that are very similar. The basic structure is the same, just the service they provide is different. The first one receives and rejects a lot of ssh requests on behalf of many postgres users. The second one does not receive external ssh requests on behalf of postgres users, but occasionally runs a postgres password change process. Yunohost seems to reject the external ssh requests, but it is not nice when the internal process changes the postgres password against my knowledge and will.
This password reset process occurs on both servers. Why is this happening and how can I find a solution?
Thank you.

Note: Both servers are running on amd64 and the latest Yunohost version with original settings.

first server

cat /var/log/auth.log | grep postgres                 

Jun 30 00:08:28 hostname sshd[176719]: User postgres from 103.73.163.82 not allowed because none of user's groups are listed in AllowGroups
Jun 30 00:08:28 hostname sshd[176719]: Disconnected from invalid user postgres 103.73.163.82 port 37700 [preauth]
Jun 30 02:20:52 hostname sshd[180350]: User postgres from 197.5.145.73 not allowed because none of user's groups are listed in AllowGroups
Jun 30 02:20:53 hostname sshd[180350]: Disconnected from invalid user postgres 197.5.145.73 port 63313 [preauth]
Jun 30 02:21:26 hostname sshd[180367]: User postgres from 87.251.102.94 not allowed because none of user's groups are listed in AllowGroups
Jun 30 02:21:27 hostname sshd[180367]: Disconnected from invalid user postgres 87.251.102.94 port 37130 [preauth]
Jun 30 02:28:08 hostname sshd[180554]: User postgres from 92.27.101.99 not allowed because none of user's groups are listed in AllowGroups
Jun 30 02:28:08 hostname sshd[180554]: Disconnected from invalid user postgres 92.27.101.99 port 36918 [preauth]
Jun 30 02:29:39 hostname sshd[180592]: User postgres from 103.57.210.112 not allowed because none of user's groups are listed in AllowGroups
Jun 30 02:29:40 hostname sshd[180592]: Disconnected from invalid user postgres 103.57.210.112 port 49990 [preauth]
Jun 30 02:34:38 hostname sshd[180736]: User postgres from 103.98.131.106 not allowed because none of user's groups are listed in AllowGroups
Jun 30 02:34:38 hostname sshd[180736]: Disconnected from invalid user postgres 103.98.131.106 port 49378 [preauth]
Jun 30 02:34:46 hostname sshd[180741]: User postgres from 199.21.115.199 not allowed because none of user's groups are listed in AllowGroups
Jun 30 02:34:46 hostname sshd[180741]: Disconnected from invalid user postgres 199.21.115.199 port 40786 [preauth]
Jun 30 02:37:08 hostname sshd[180835]: User postgres from 184.18.211.199 not allowed because none of user's groups are listed in AllowGroups
Jun 30 02:37:09 hostname sshd[180835]: Disconnected from invalid user postgres 184.18.211.199 port 33734 [preauth]
Jun 30 03:22:46 hostname sshd[181709]: User postgres from 77.91.87.112 not allowed because none of user's groups are listed in AllowGroups
Jun 30 03:22:47 hostname sshd[181709]: Disconnected from invalid user postgres 77.91.87.112 port 57116 [preauth]
Jun 30 06:55:44 hostname sudo:     root : TTY=pts/0 ; PWD=/var/lib/postgresql ; USER=postgres ; COMMAND=/bin/bash --login -c psql -cALTER\ user\ postgres\ WITH\ PASSWORD\ \'fghFGHrtyRTyRY23454fGHfghj\' postgres
Jun 30 06:55:44 hostname sudo: pam_unix(sudo:session): session opened for user postgres(uid=122) by (uid=0)
Jun 30 06:55:44 hostname sudo: pam_unix(sudo:session): session closed for user postgres
Jun 30 11:39:56 hostname sudo:     root : TTY=pts/0 ; PWD=/var/lib/postgresql ; USER=postgres ; COMMAND=/bin/bash --login -c psql -cALTER\ user\ postgres\ WITH\ PASSWORD\ \'fghFGHrtyRTyRY23454fGHfghj\' postgres
Jun 30 11:39:56 hostname sudo: pam_unix(sudo:session): session opened for user postgres(uid=122) by user(uid=0)
Jun 30 11:39:56 hostname sudo: pam_unix(sudo:session): session closed for user postgres
Jun 30 11:41:25 hostname sudo:     root : TTY=pts/0 ; PWD=/var/lib/postgresql ; USER=postgres ; COMMAND=/bin/bash --login -c psql -cALTER\ user\ postgres\ WITH\ PASSWORD\ \'fghFGHrtyRTyRY23454fGHfghj\' postgres
Jun 30 11:41:25 hostname sudo: pam_unix(sudo:session): session opened for user postgres(uid=122) by user(uid=0)
Jun 30 11:41:25 hostname sudo: pam_unix(sudo:session): session closed for user postgres
Jun 30 15:46:48 hostname sshd[202650]: User postgres from 8.222.146.130 not allowed because none of user's groups are listed in AllowGroups
Jun 30 15:46:48 hostname sshd[202650]: Disconnected from invalid user postgres 8.222.146.130 port 42064 [preauth]
Jun 30 19:06:46 hostname sshd[207396]: User postgres from 203.129.225.196 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:06:47 hostname sshd[207396]: Disconnected from invalid user postgres 203.129.225.196 port 62697 [preauth]
Jun 30 19:10:27 hostname sshd[207581]: User postgres from 205.185.113.189 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:10:27 hostname sshd[207581]: Disconnected from invalid user postgres 205.185.113.189 port 50670 [preauth]
Jun 30 19:10:50 hostname sshd[207674]: User postgres from 103.130.213.139 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:10:50 hostname sshd[207674]: Disconnected from invalid user postgres 103.130.213.139 port 35470 [preauth]
Jun 30 19:11:02 hostname sshd[207841]: User postgres from 146.190.102.80 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:11:02 hostname sshd[207841]: Disconnected from invalid user postgres 146.190.102.80 port 49910 [preauth]
Jun 30 19:12:53 hostname sshd[207920]: User postgres from 188.0.130.250 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:12:53 hostname sshd[207920]: Disconnected from invalid user postgres 188.0.130.250 port 49924 [preauth]
Jun 30 19:13:51 hostname sshd[207959]: User postgres from 8.222.182.65 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:13:52 hostname sshd[207959]: Disconnected from invalid user postgres 8.222.182.65 port 49768 [preauth]
Jun 30 19:15:36 hostname sshd[208036]: User postgres from 192.210.143.29 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:15:37 hostname sshd[208036]: Disconnected from invalid user postgres 192.210.143.29 port 37674 [preauth]
Jun 30 19:17:12 hostname sshd[208108]: User postgres from 152.32.162.18 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:17:12 hostname sshd[208108]: Disconnected from invalid user postgres 152.32.162.18 port 36692 [preauth]
Jun 30 19:23:43 hostname sshd[208407]: User postgres from 43.135.175.232 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:23:43 hostname sshd[208407]: Disconnected from invalid user postgres 43.135.175.232 port 50870 [preauth]
Jun 30 19:28:20 hostname sshd[208614]: User postgres from 138.68.240.114 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:28:20 hostname sshd[208614]: Disconnected from invalid user postgres 138.68.240.114 port 33272 [preauth]
Jun 30 19:30:00 hostname sshd[208699]: User postgres from 135.125.247.170 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:30:00 hostname sshd[208699]: Disconnected from invalid user postgres 135.125.247.170 port 51658 [preauth]
Jun 30 19:32:06 hostname sshd[208798]: User postgres from 2.83.61.37 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:32:06 hostname sshd[208798]: Disconnected from invalid user postgres 2.83.61.37 port 57592 [preauth]
Jun 30 19:33:19 hostname sshd[208853]: User postgres from 173.249.36.143 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:33:19 hostname sshd[208853]: Disconnected from invalid user postgres 173.249.36.143 port 35224 [preauth]
Jun 30 19:35:56 hostname sshd[208965]: User postgres from 43.135.175.232 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:35:56 hostname sshd[208965]: Disconnected from invalid user postgres 43.135.175.232 port 54846 [preauth]
Jun 30 19:38:53 hostname sshd[209074]: User postgres from 129.226.193.194 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:38:53 hostname sshd[209074]: Disconnected from invalid user postgres 129.226.193.194 port 36770 [preauth]
Jun 30 19:40:45 hostname sshd[209240]: User postgres from 129.226.193.194 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:40:46 hostname sshd[209240]: Disconnected from invalid user postgres 129.226.193.194 port 36146 [preauth]
Jun 30 19:45:48 hostname sshd[209360]: User postgres from 23.94.37.38 not allowed because none of user's groups are listed in AllowGroups
Jun 30 19:45:48 hostname sshd[209360]: Disconnected from invalid user postgres 23.94.37.38 port 48726 [preauth]
Jun 30 20:01:14 hostname sshd[209597]: User postgres from 23.94.37.38 not allowed because none of user's groups are listed in AllowGroups
Jun 30 20:01:14 hostname sshd[209597]: Disconnected from invalid user postgres 23.94.37.38 port 32802 [preauth]
Jul  1 00:16:34 hostname sshd[213385]: User postgres from 220.181.114.54 not allowed because none of user's groups are listed in AllowGroups
Jul  1 00:16:34 hostname sshd[213385]: Disconnected from invalid user postgres 220.181.114.54 port 53986 [preauth]
Jul  1 00:25:42 hostname sshd[213679]: User postgres from 175.42.63.69 not allowed because none of user's groups are listed in AllowGroups
Jul  1 00:25:42 hostname sshd[213679]: Disconnected from invalid user postgres 175.42.63.69 port 54252 [preauth]
Jul  1 00:42:04 hostname sshd[214112]: User postgres from 119.4.250.94 not allowed because none of user's groups are listed in AllowGroups
Jul  1 00:42:04 hostname sshd[214112]: Disconnected from invalid user postgres 119.4.250.94 port 36369 [preauth]
Jul  1 00:51:13 hostname sshd[214225]: User postgres from 101.126.70.191 not allowed because none of user's groups are listed in AllowGroups
Jul  1 00:51:13 hostname sshd[214225]: Disconnected from invalid user postgres 101.126.70.191 port 56466 [preauth]
Jul  1 03:45:52 hostname sshd[217850]: User postgres from 156.200.117.117 not allowed because none of user's groups are listed in AllowGroups
Jul  1 03:45:52 hostname sshd[217850]: Disconnected from invalid user postgres 156.200.117.117 port 50066 [preauth]
Jul  1 03:46:33 hostname sshd[217862]: User postgres from 217.182.73.127 not allowed because none of user's groups are listed in AllowGroups
Jul  1 03:46:33 hostname sshd[217862]: Disconnected from invalid user postgres 217.182.73.127 port 40108 [preauth]
Jul  1 03:56:50 hostname sshd[218058]: User postgres from 36.67.70.198 not allowed because none of user's groups are listed in AllowGroups
Jul  1 03:56:50 hostname sshd[218058]: Disconnected from invalid user postgres 36.67.70.198 port 52786 [preauth]
Jul  1 03:57:01 hostname sshd[218068]: User postgres from 40.115.18.231 not allowed because none of user's groups are listed in AllowGroups
Jul  1 03:57:01 hostname sshd[218068]: Disconnected from invalid user postgres 40.115.18.231 port 34614 [preauth]
Jul  1 03:59:48 hostname sshd[218184]: User postgres from 103.233.252.122 not allowed because none of user's groups are listed in AllowGroups
Jul  1 03:59:48 hostname sshd[218184]: Disconnected from invalid user postgres 103.233.252.122 port 58606 [preauth]
Jul  1 04:17:25 hostname sshd[219279]: User postgres from 46.101.23.51 not allowed because none of user's groups are listed in AllowGroups
Jul  1 04:17:25 hostname sshd[219279]: Disconnected from invalid user postgres 46.101.23.51 port 56252 [preauth]
Jul  1 04:17:55 hostname sshd[219296]: User postgres from 178.33.40.170 not allowed because none of user's groups are listed in AllowGroups
Jul  1 04:17:55 hostname sshd[219296]: Disconnected from invalid user postgres 178.33.40.170 port 42600 [preauth]
Jul  1 04:22:19 hostname sshd[219482]: User postgres from 124.156.213.101 not allowed because none of user's groups are listed in AllowGroups
Jul  1 04:22:19 hostname sshd[219482]: Disconnected from invalid user postgres 124.156.213.101 port 37034 [preauth]
Jul  1 12:22:09 hostname sshd[228348]: User postgres from 164.90.218.215 not allowed because none of user's groups are listed in AllowGroups
Jul  1 12:22:09 hostname sshd[228348]: Disconnected from invalid user postgres 164.90.218.215 port 50438 [preauth]
Jul  1 12:33:10 hostname sshd[228661]: Invalid user postgresql from 104.248.128.33 port 38152
Jul  1 12:33:10 hostname sshd[228661]: Disconnected from invalid user postgresql 104.248.128.33 port 38152 [preauth]
Jul  1 12:38:04 hostname sshd[228834]: Invalid user postgresql from 164.90.218.215 port 51084
Jul  1 12:38:04 hostname sshd[228834]: Disconnected from invalid user postgresql 164.90.218.215 port 51084 [preauth]
Jul  1 12:41:14 hostname sshd[229033]: User postgres from 104.248.128.33 not allowed because none of user's groups are listed in AllowGroups
Jul  1 12:41:14 hostname sshd[229033]: Disconnected from invalid user postgres 104.248.128.33 port 39782 [preauth]
Jul  1 13:25:50 hostname sshd[230100]: User postgres from 43.128.107.63 not allowed because none of user's groups are listed in AllowGroups
Jul  1 13:25:50 hostname sshd[230100]: Disconnected from invalid user postgres 43.128.107.63 port 49868 [preauth]
Jul  1 13:29:33 hostname sshd[230192]: User postgres from 89.185.85.104 not allowed because none of user's groups are listed in AllowGroups
Jul  1 13:29:33 hostname sshd[230192]: Disconnected from invalid user postgres 89.185.85.104 port 52538 [preauth]
Jul  1 14:37:38 hostname sshd[231293]: User postgres from 43.156.28.99 not allowed because none of user's groups are listed in AllowGroups
Jul  1 14:37:38 hostname sshd[231293]: Disconnected from invalid user postgres 43.156.28.99 port 34500 [preauth]
Jul  1 14:47:35 hostname sshd[231612]: User postgres from 43.155.180.119 not allowed because none of user's groups are listed in AllowGroups
Jul  1 14:47:35 hostname sshd[231612]: Disconnected from invalid user postgres 43.155.180.119 port 35330 [preauth]
Jul  1 16:57:41 hostname sshd[234047]: User postgres from 43.133.67.75 not allowed because none of user's groups are listed in AllowGroups
Jul  1 16:57:41 hostname sshd[234047]: Disconnected from invalid user postgres 43.133.67.75 port 35644 [preauth]
Jul  1 17:05:47 hostname sshd[234777]: User postgres from 43.128.79.160 not allowed because none of user's groups are listed in AllowGroups
Jul  1 17:05:47 hostname sshd[234777]: Disconnected from invalid user postgres 43.128.79.160 port 37984 [preauth]
Jul  1 17:06:08 hostname sshd[234806]: User postgres from 46.238.32.247 not allowed because none of user's groups are listed in AllowGroups
Jul  1 17:06:08 hostname sshd[234806]: Disconnected from invalid user postgres 46.238.32.247 port 41504 [preauth]
Jul  1 17:07:15 hostname sshd[234874]: User postgres from 27.116.79.242 not allowed because none of user's groups are listed in AllowGroups
Jul  1 17:07:16 hostname sshd[234874]: Disconnected from invalid user postgres 27.116.79.242 port 46180 [preauth]
Jul  1 17:07:26 hostname sshd[234880]: User postgres from 43.155.172.236 not allowed because none of user's groups are listed in AllowGroups
Jul  1 17:07:27 hostname sshd[234880]: Disconnected from invalid user postgres 43.155.172.236 port 39570 [preauth]
Jul  1 17:13:53 hostname sshd[235334]: User postgres from 119.188.90.230 not allowed because none of user's groups are listed in AllowGroups
Jul  1 17:13:53 hostname sshd[235334]: Disconnected from invalid user postgres 119.188.90.230 port 53176 [preauth]
Jul  1 17:14:36 hostname sshd[235361]: User postgres from 190.12.106.242 not allowed because none of user's groups are listed in AllowGroups
Jul  1 17:14:36 hostname sshd[235361]: Disconnected from invalid user postgres 190.12.106.242 port 35326 [preauth]
Jul  1 17:21:40 hostname sshd[235648]: User postgres from 107.172.218.178 not allowed because none of user's groups are listed in AllowGroups
Jul  1 17:21:40 hostname sshd[235648]: Disconnected from invalid user postgres 107.172.218.178 port 49644 [preauth]
Jul  1 17:27:11 hostname sshd[235880]: User postgres from 43.134.58.134 not allowed because none of user's groups are listed in AllowGroups
Jul  1 17:27:12 hostname sshd[235880]: Disconnected from invalid user postgres 43.134.58.134 port 54444 [preauth]
Jul  1 17:30:14 hostname sshd[235979]: User postgres from 175.139.217.113 not allowed because none of user's groups are listed in AllowGroups
Jul  1 17:30:15 hostname sshd[235979]: Disconnected from invalid user postgres 175.139.217.113 port 4190 [preauth]
Jul  1 17:30:41 hostname sshd[235985]: User postgres from 152.42.254.172 not allowed because none of user's groups are listed in AllowGroups
Jul  1 17:30:41 hostname sshd[235985]: Disconnected from invalid user postgres 152.42.254.172 port 56358 [preauth]
Jul  1 17:35:15 hostname sshd[236059]: User postgres from 183.110.116.126 not allowed because none of user's groups are listed in AllowGroups
Jul  1 17:35:15 hostname sshd[236059]: Disconnected from invalid user postgres 183.110.116.126 port 52340 [preauth]
Jul  1 19:52:44 hostname sshd[240475]: User postgres from 121.196.208.112 not allowed because none of user's groups are listed in AllowGroups
Jul  1 19:52:44 hostname sshd[240475]: Disconnected from invalid user postgres 121.196.208.112 port 47516 [preauth]
Jul  1 20:00:10 hostname sshd[240725]: User postgres from 43.134.82.95 not allowed because none of user's groups are listed in AllowGroups
Jul  1 20:00:10 hostname sshd[240725]: Disconnected from invalid user postgres 43.134.82.95 port 42380 [preauth]
Jul  1 20:03:18 hostname sshd[240860]: User postgres from 43.156.106.15 not allowed because none of user's groups are listed in AllowGroups
Jul  1 20:03:19 hostname sshd[240860]: Disconnected from invalid user postgres 43.156.106.15 port 39494 [preauth]
Jul  1 20:04:40 hostname sshd[240911]: User postgres from 34.130.151.198 not allowed because none of user's groups are listed in AllowGroups
Jul  1 20:04:40 hostname sshd[240911]: Disconnected from invalid user postgres 34.130.151.198 port 41794 [preauth]
Jul  1 20:09:30 hostname sshd[241243]: User postgres from 43.163.219.110 not allowed because none of user's groups are listed in AllowGroups
Jul  1 20:09:30 hostname sshd[241243]: Disconnected from invalid user postgres 43.163.219.110 port 33374 [preauth]
Jul  1 20:11:35 hostname sshd[241327]: User postgres from 125.88.220.58 not allowed because none of user's groups are listed in AllowGroups
Jul  1 20:11:35 hostname sshd[241327]: Disconnected from invalid user postgres 125.88.220.58 port 43736 [preauth]
Jul  1 20:16:17 hostname sshd[241531]: User postgres from 143.198.200.56 not allowed because none of user's groups are listed in AllowGroups
Jul  1 20:16:17 hostname sshd[241531]: Disconnected from invalid user postgres 143.198.200.56 port 37080 [preauth]
Jul  1 20:17:31 hostname sshd[241585]: User postgres from 101.36.125.187 not allowed because none of user's groups are listed in AllowGroups
Jul  1 20:17:31 hostname sshd[241585]: Disconnected from invalid user postgres 101.36.125.187 port 40836 [preauth]
Jul  1 20:18:30 hostname sshd[241638]: User postgres from 178.62.66.67 not allowed because none of user's groups are listed in AllowGroups
Jul  1 20:18:30 hostname sshd[241638]: Disconnected from invalid user postgres 178.62.66.67 port 57054 [preauth]
Jul  1 20:24:47 hostname sshd[241808]: User postgres from 103.60.102.100 not allowed because none of user's groups are listed in AllowGroups
Jul  1 20:24:47 hostname sshd[241808]: Disconnected from invalid user postgres 103.60.102.100 port 34734 [preauth]
Jul  1 20:44:48 hostname sshd[242168]: User postgres from 43.156.39.45 not allowed because none of user's groups are listed in AllowGroups
Jul  1 20:44:49 hostname sshd[242168]: Disconnected from invalid user postgres 43.156.39.45 port 40860 [preauth]
Jul  1 20:50:18 hostname sshd[242339]: User postgres from 114.98.230.80 not allowed because none of user's groups are listed in AllowGroups
Jul  1 20:50:18 hostname sshd[242339]: Disconnected from invalid user postgres 114.98.230.80 port 44064 [preauth]
Jul  1 20:51:56 hostname sshd[242389]: User postgres from 107.173.90.75 not allowed because none of user's groups are listed in AllowGroups
Jul  1 20:51:56 hostname sshd[242389]: Disconnected from invalid user postgres 107.173.90.75 port 46974 [preauth]
Jul  1 20:58:08 hostname sshd[242575]: User postgres from 118.101.192.62 not allowed because none of user's groups are listed in AllowGroups
Jul  1 20:58:08 hostname sshd[242575]: Disconnected from invalid user postgres 118.101.192.62 port 56894 [preauth]
Jul  1 21:03:12 hostname sshd[242716]: User postgres from 187.191.99.99 not allowed because none of user's groups are listed in AllowGroups
Jul  1 21:03:12 hostname sshd[242716]: Disconnected from invalid user postgres 187.191.99.99 port 35512 [preauth]
Jul  2 01:49:07 hostname sshd[248594]: User postgres from 43.128.134.3 not allowed because none of user's groups are listed in AllowGroups
Jul  2 01:49:07 hostname sshd[248594]: Disconnected from invalid user postgres 43.128.134.3 port 44144 [preauth]
Jul  2 03:30:18 hostname sshd[250743]: User postgres from 46.188.119.26 not allowed because none of user's groups are listed in AllowGroups
Jul  2 03:30:18 hostname sshd[250743]: Disconnected from invalid user postgres 46.188.119.26 port 51194 [preauth]
Jul  2 03:31:56 hostname sshd[250803]: User postgres from 159.65.173.17 not allowed because none of user's groups are listed in AllowGroups
Jul  2 03:31:56 hostname sshd[250803]: Disconnected from invalid user postgres 159.65.173.17 port 53094 [preauth]
Jul  2 03:39:16 hostname sshd[251249]: User postgres from 43.157.13.79 not allowed because none of user's groups are listed in AllowGroups
Jul  2 03:39:16 hostname sshd[251249]: Disconnected from invalid user postgres 43.157.13.79 port 33216 [preauth]
Jul  2 03:48:02 hostname sshd[251653]: User postgres from 193.37.70.254 not allowed because none of user's groups are listed in AllowGroups
Jul  2 03:48:02 hostname sshd[251653]: Disconnected from invalid user postgres 193.37.70.254 port 39324 [preauth]
Jul  2 03:51:35 hostname sshd[251785]: User postgres from 77.87.122.176 not allowed because none of user's groups are listed in AllowGroups
Jul  2 03:51:35 hostname sshd[251785]: Disconnected from invalid user postgres 77.87.122.176 port 37524 [preauth]
Jul  2 06:36:55 hostname sshd[254609]: User postgres from 103.142.87.231 not allowed because none of user's groups are listed in AllowGroups
Jul  2 06:36:55 hostname sshd[254609]: Disconnected from invalid user postgres 103.142.87.231 port 59020 [preauth]
Jul  2 06:37:14 hostname sshd[254621]: User postgres from 70.67.112.115 not allowed because none of user's groups are listed in AllowGroups
Jul  2 06:37:14 hostname sshd[254621]: Disconnected from invalid user postgres 70.67.112.115 port 57818 [preauth]
Jul  2 06:53:20 hostname sudo:     root : TTY=pts/0 ; PWD=/var/lib/postgresql ; USER=postgres ; COMMAND=/bin/bash --login -c psql -cALTER\ user\ postgres\ WITH\ PASSWORD\ \'fghFGHrtyRTyRY23454fGHfghj\' postgres
Jul  2 06:53:20 hostname sudo: pam_unix(sudo:session): session opened for user postgres(uid=122) by (uid=0)
Jul  2 06:53:20 hostname sudo: pam_unix(sudo:session): session closed for user postgres
Jul  2 07:48:55 hostname sshd[259681]: User postgres from 92.205.238.242 not allowed because none of user's groups are listed in AllowGroups
Jul  2 07:48:55 hostname sshd[259681]: Disconnected from invalid user postgres 92.205.238.242 port 57812 [preauth]
Jul  2 08:01:17 hostname sshd[260856]: User postgres from 92.205.238.242 not allowed because none of user's groups are listed in AllowGroups
Jul  2 08:01:17 hostname sshd[260856]: Disconnected from invalid user postgres 92.205.238.242 port 45692 [preauth]
Jul  2 08:03:16 hostname sshd[260938]: User postgres from 43.157.55.49 not allowed because none of user's groups are listed in AllowGroups
Jul  2 08:03:16 hostname sshd[260938]: Disconnected from invalid user postgres 43.157.55.49 port 47952 [preauth]
Jul  2 08:09:39 hostname sshd[261283]: User postgres from 43.157.55.49 not allowed because none of user's groups are listed in AllowGroups
Jul  2 08:09:39 hostname sshd[261283]: Disconnected from invalid user postgres 43.157.55.49 port 54294 [preauth]
Jul  2 11:27:21 hostname sshd[265860]: User postgres from 116.198.35.187 not allowed because none of user's groups are listed in AllowGroups
Jul  2 11:27:22 hostname sshd[265860]: Disconnected from invalid user postgres 116.198.35.187 port 59354 [preauth]
Jul  2 13:48:04 hostname sshd[269650]: User postgres from 43.156.152.211 not allowed because none of user's groups are listed in AllowGroups
Jul  2 13:48:04 hostname sshd[269650]: Disconnected from invalid user postgres 43.156.152.211 port 55298 [preauth]
Jul  2 13:52:17 hostname sshd[269884]: User postgres from 104.250.56.198 not allowed because none of user's groups are listed in AllowGroups
Jul  2 13:52:18 hostname sshd[269884]: Disconnected from invalid user postgres 104.250.56.198 port 38563 [preauth]
Jul  2 13:54:29 hostname sshd[270006]: User postgres from 178.128.254.80 not allowed because none of user's groups are listed in AllowGroups
Jul  2 13:54:29 hostname sshd[270006]: Disconnected from invalid user postgres 178.128.254.80 port 36042 [preauth]
Jul  2 13:54:45 hostname sshd[270016]: User postgres from 152.32.255.24 not allowed because none of user's groups are listed in AllowGroups
Jul  2 13:54:45 hostname sshd[270016]: Disconnected from invalid user postgres 152.32.255.24 port 26742 [preauth]
Jul  2 13:55:07 hostname sshd[270035]: User postgres from 51.210.243.91 not allowed because none of user's groups are listed in AllowGroups
Jul  2 13:55:07 hostname sshd[270035]: Disconnected from invalid user postgres 51.210.243.91 port 35616 [preauth]
Jul  2 13:56:57 hostname sshd[270136]: User postgres from 170.106.159.93 not allowed because none of user's groups are listed in AllowGroups
Jul  2 13:56:58 hostname sshd[270136]: Disconnected from invalid user postgres 170.106.159.93 port 32808 [preauth]
Jul  2 13:57:19 hostname sshd[270146]: User postgres from 163.53.170.114 not allowed because none of user's groups are listed in AllowGroups
Jul  2 13:57:22 hostname sshd[270146]: Disconnected from invalid user postgres 163.53.170.114 port 42068 [preauth]
Jul  2 14:01:18 hostname sshd[270339]: User postgres from 43.134.54.21 not allowed because none of user's groups are listed in AllowGroups
Jul  2 14:01:18 hostname sshd[270339]: Disconnected from invalid user postgres 43.134.54.21 port 35824 [preauth]
Jul  2 14:01:50 hostname sshd[270357]: User postgres from 43.163.219.110 not allowed because none of user's groups are listed in AllowGroups
Jul  2 14:01:51 hostname sshd[270357]: Disconnected from invalid user postgres 43.163.219.110 port 35316 [preauth]
Jul  2 17:37:14 hostname sshd[275786]: User postgres from 95.85.56.9 not allowed because none of user's groups are listed in AllowGroups
Jul  2 17:37:14 hostname sshd[275786]: Disconnected from invalid user postgres 95.85.56.9 port 36126 [preauth]
Jul  2 17:41:15 hostname sshd[276033]: User postgres from 208.109.34.15 not allowed because none of user's groups are listed in AllowGroups
Jul  2 17:41:15 hostname sshd[276033]: Disconnected from invalid user postgres 208.109.34.15 port 35406 [preauth]
Jul  2 17:42:47 hostname sshd[276083]: User postgres from 128.199.33.46 not allowed because none of user's groups are listed in AllowGroups
Jul  2 17:42:47 hostname sshd[276083]: Disconnected from invalid user postgres 128.199.33.46 port 39706 [preauth]
Jul  3 04:01:03 hostname sshd[295477]: User postgres from 103.162.20.168 not allowed because none of user's groups are listed in AllowGroups
Jul  3 04:01:03 hostname sshd[295477]: Disconnected from invalid user postgres 103.162.20.168 port 41078 [preauth]
Jul  3 04:09:54 hostname sshd[295750]: User postgres from 103.162.20.168 not allowed because none of user's groups are listed in AllowGroups
Jul  3 04:09:54 hostname sshd[295750]: Disconnected from invalid user postgres 103.162.20.168 port 43526 [preauth]
Jul  3 05:27:08 hostname sshd[297582]: User postgres from 107.172.51.151 not allowed because none of user's groups are listed in AllowGroups
Jul  3 05:27:08 hostname sshd[297582]: Disconnected from invalid user postgres 107.172.51.151 port 48420 [preauth]
Jul  3 07:06:43 hostname sshd[300652]: User postgres from 43.134.72.167 not allowed because none of user's groups are listed in AllowGroups
Jul  3 07:06:43 hostname sshd[300652]: Disconnected from invalid user postgres 43.134.72.167 port 34880 [preauth]
Jul  3 07:08:23 hostname sshd[300698]: User postgres from 124.156.206.16 not allowed because none of user's groups are listed in AllowGroups
Jul  3 07:08:23 hostname sshd[300698]: Disconnected from invalid user postgres 124.156.206.16 port 58934 [preauth]
Jul  3 07:11:03 hostname sshd[300866]: User postgres from 152.32.202.213 not allowed because none of user's groups are listed in AllowGroups
Jul  3 07:11:03 hostname sshd[300866]: Disconnected from invalid user postgres 152.32.202.213 port 60546 [preauth]
Jul  3 07:17:12 hostname sshd[301035]: User postgres from 123.30.249.49 not allowed because none of user's groups are listed in AllowGroups
Jul  3 07:17:12 hostname sshd[301035]: Disconnected from invalid user postgres 123.30.249.49 port 39060 [preauth]
Jul  3 07:55:32 hostname sshd[304078]: User postgres from 119.28.156.59 not allowed because none of user's groups are listed in AllowGroups
Jul  3 07:55:32 hostname sshd[304078]: Disconnected from invalid user postgres 119.28.156.59 port 52012 [preauth]
Jul  3 10:31:43 hostname sshd[307779]: User postgres from 43.153.183.254 not allowed because none of user's groups are listed in AllowGroups
Jul  3 10:31:43 hostname sshd[307779]: Disconnected from invalid user postgres 43.153.183.254 port 56334 [preauth]
Jul  3 10:34:11 hostname sshd[307854]: User postgres from 101.126.70.112 not allowed because none of user's groups are listed in AllowGroups
Jul  3 10:34:12 hostname sshd[307854]: Disconnected from invalid user postgres 101.126.70.112 port 51908 [preauth]
Jul  3 10:34:16 hostname sshd[307857]: User postgres from 43.153.183.254 not allowed because none of user's groups are listed in AllowGroups
Jul  3 10:34:16 hostname sshd[307857]: Disconnected from invalid user postgres 43.153.183.254 port 44210 [preauth]
Jul  3 10:40:28 hostname sshd[308126]: User postgres from 190.12.75.226 not allowed because none of user's groups are listed in AllowGroups
Jul  3 10:40:28 hostname sshd[308126]: Disconnected from invalid user postgres 190.12.75.226 port 54092 [preauth]
Jul  3 10:52:50 hostname sshd[308511]: User postgres from 190.12.75.226 not allowed because none of user's groups are listed in AllowGroups
Jul  3 10:52:51 hostname sshd[308511]: Disconnected from invalid user postgres 190.12.75.226 port 46732 [preauth]
Jul  3 15:23:01 hostname sshd[313988]: User postgres from 47.243.26.124 not allowed because none of user's groups are listed in AllowGroups
Jul  3 15:23:01 hostname sshd[313988]: Disconnected from invalid user postgres 47.243.26.124 port 49276 [preauth]
Jul  3 15:33:08 hostname sshd[314425]: User postgres from 106.38.205.224 not allowed because none of user's groups are listed in AllowGroups
Jul  3 15:33:08 hostname sshd[314425]: Disconnected from invalid user postgres 106.38.205.224 port 2630 [preauth]
Jul  3 15:35:12 hostname sshd[314528]: User postgres from 43.133.64.231 not allowed because none of user's groups are listed in AllowGroups
Jul  3 15:35:12 hostname sshd[314528]: Disconnected from invalid user postgres 43.133.64.231 port 56472 [preauth]
Jul  3 15:48:41 hostname sshd[315167]: User postgres from 103.110.4.1 not allowed because none of user's groups are listed in AllowGroups
Jul  3 15:48:41 hostname sshd[315167]: Disconnected from invalid user postgres 103.110.4.1 port 35922 [preauth]
Jul  3 15:49:20 hostname sshd[315187]: User postgres from 43.153.8.173 not allowed because none of user's groups are listed in AllowGroups
Jul  3 15:49:20 hostname sshd[315187]: Disconnected from invalid user postgres 43.153.8.173 port 55974 [preauth]
Jul  3 15:53:21 hostname sshd[315336]: User postgres from 188.132.146.172 not allowed because none of user's groups are listed in AllowGroups
Jul  3 15:53:21 hostname sshd[315336]: Disconnected from invalid user postgres 188.132.146.172 port 33147 [preauth]
Jul  3 19:44:55 hostname sshd[321193]: User postgres from 43.131.233.62 not allowed because none of user's groups are listed in AllowGroups
Jul  3 19:44:55 hostname sshd[321193]: Disconnected from invalid user postgres 43.131.233.62 port 49866 [preauth]
Jul  3 19:45:44 hostname sshd[321262]: User postgres from 125.160.11.30 not allowed because none of user's groups are listed in AllowGroups
Jul  3 19:45:45 hostname sshd[321262]: Disconnected from invalid user postgres 125.160.11.30 port 51136 [preauth]
Jul  3 19:46:58 hostname sshd[321358]: User postgres from 115.241.83.2 not allowed because none of user's groups are listed in AllowGroups
Jul  3 19:46:59 hostname sshd[321358]: Disconnected from invalid user postgres 115.241.83.2 port 51516 [preauth]
Jul  3 19:48:53 hostname sshd[321477]: User postgres from 115.241.83.2 not allowed because none of user's groups are listed in AllowGroups
Jul  3 19:48:54 hostname sshd[321477]: Disconnected from invalid user postgres 115.241.83.2 port 55258 [preauth]
Jul  3 19:49:01 hostname sshd[321491]: User postgres from 173.183.228.122 not allowed because none of user's groups are listed in AllowGroups
Jul  3 19:49:01 hostname sshd[321491]: Disconnected from invalid user postgres 173.183.228.122 port 38738 [preauth]
Jul  3 19:52:07 hostname sshd[321712]: User postgres from 43.131.233.62 not allowed because none of user's groups are listed in AllowGroups
Jul  3 19:52:07 hostname sshd[321712]: Disconnected from invalid user postgres 43.131.233.62 port 58856 [preauth]
Jul  3 19:54:01 hostname sshd[321819]: User postgres from 173.183.228.122 not allowed because none of user's groups are listed in AllowGroups
Jul  3 19:54:01 hostname sshd[321819]: Disconnected from invalid user postgres 173.183.228.122 port 51954 [preauth]
Jul  3 20:07:40 hostname sshd[322447]: User postgres from 125.160.11.30 not allowed because none of user's groups are listed in AllowGroups
Jul  3 20:07:41 hostname sshd[322447]: Disconnected from invalid user postgres 125.160.11.30 port 60724 [preauth]
Jul  3 20:10:36 hostname sshd[322628]: User postgres from 14.29.99.183 not allowed because none of user's groups are listed in AllowGroups
Jul  3 20:10:36 hostname sshd[322628]: Disconnected from invalid user postgres 14.29.99.183 port 33146 [preauth]
Jul  3 20:13:09 hostname sshd[322688]: User postgres from 14.29.99.183 not allowed because none of user's groups are listed in AllowGroups
Jul  3 20:13:09 hostname sshd[322688]: Disconnected from invalid user postgres 14.29.99.183 port 38964 [preauth]
Jul  3 23:26:08 hostname sshd[328108]: User postgres from 146.59.80.142 not allowed because none of user's groups are listed in AllowGroups
Jul  3 23:26:08 hostname sshd[328108]: Disconnected from invalid user postgres 146.59.80.142 port 41968 [preauth]
Jul  3 23:28:55 hostname sshd[328212]: User postgres from 186.31.95.163 not allowed because none of user's groups are listed in AllowGroups
Jul  3 23:28:56 hostname sshd[328212]: Disconnected from invalid user postgres 186.31.95.163 port 53902 [preauth]
Jul  3 23:36:25 hostname sshd[328478]: User postgres from 43.134.176.118 not allowed because none of user's groups are listed in AllowGroups
Jul  3 23:36:25 hostname sshd[328478]: Disconnected from invalid user postgres 43.134.176.118 port 40540 [preauth]
Jul  4 00:58:58 hostname sshd[330468]: User postgres from 43.130.16.178 not allowed because none of user's groups are listed in AllowGroups
Jul  4 00:58:58 hostname sshd[330468]: Disconnected from invalid user postgres 43.130.16.178 port 50586 [preauth]
Jul  4 00:59:47 hostname sshd[330494]: User postgres from 43.159.194.101 not allowed because none of user's groups are listed in AllowGroups
Jul  4 00:59:48 hostname sshd[330494]: Disconnected from invalid user postgres 43.159.194.101 port 45580 [preauth]
Jul  4 02:13:21 hostname sshd[332971]: User postgres from 170.106.142.138 not allowed because none of user's groups are listed in AllowGroups
Jul  4 02:13:21 hostname sshd[332971]: Disconnected from invalid user postgres 170.106.142.138 port 60856 [preauth]
Jul  4 02:14:44 hostname sshd[333018]: User postgres from 111.229.20.191 not allowed because none of user's groups are listed in AllowGroups
Jul  4 02:14:45 hostname sshd[333018]: Disconnected from invalid user postgres 111.229.20.191 port 52814 [preauth]
Jul  4 02:23:41 hostname sshd[333311]: User postgres from 43.159.49.29 not allowed because none of user's groups are listed in AllowGroups
Jul  4 02:23:41 hostname sshd[333311]: Disconnected from invalid user postgres 43.159.49.29 port 58878 [preauth]
Jul  4 05:45:13 hostname sshd[337949]: User postgres from 103.146.51.158 not allowed because none of user's groups are listed in AllowGroups
Jul  4 05:45:14 hostname sshd[337949]: Disconnected from invalid user postgres 103.146.51.158 port 32876 [preauth]
Jul  4 06:46:59 hostname sudo:     root : TTY=pts/0 ; PWD=/var/lib/postgresql ; USER=postgres ; COMMAND=/bin/bash --login -c psql -cALTER\ user\ postgres\ WITH\ PASSWORD\ \'fghFGHrtyRTyRY23454fGHfghj\' postgres
Jul  4 06:46:59 hostname sudo: pam_unix(sudo:session): session opened for user postgres(uid=122) by (uid=0)
Jul  4 06:47:00 hostname sudo: pam_unix(sudo:session): session closed for user postgres
Jul  4 07:26:01 hostname sshd[343681]: User postgres from 43.133.32.77 not allowed because none of user's groups are listed in AllowGroups
Jul  4 07:26:01 hostname sshd[343681]: Disconnected from invalid user postgres 43.133.32.77 port 52578 [preauth]
Jul  4 07:28:46 hostname sshd[343753]: User postgres from 106.51.174.160 not allowed because none of user's groups are listed in AllowGroups
Jul  4 07:28:46 hostname sshd[343753]: Disconnected from invalid user postgres 106.51.174.160 port 45278 [preauth]
Jul  4 07:43:38 hostname sshd[344744]: User postgres from 43.153.132.121 not allowed because none of user's groups are listed in AllowGroups
Jul  4 07:43:38 hostname sshd[344744]: Disconnected from invalid user postgres 43.153.132.121 port 48652 [preauth]
Jul  4 07:44:58 hostname sshd[344810]: User postgres from 103.69.97.55 not allowed because none of user's groups are listed in AllowGroups
Jul  4 07:44:58 hostname sshd[344810]: Disconnected from invalid user postgres 103.69.97.55 port 35444 [preauth]
Jul  4 07:47:34 hostname sshd[344936]: User postgres from 43.156.57.127 not allowed because none of user's groups are listed in AllowGroups
Jul  4 07:47:35 hostname sshd[344936]: Disconnected from invalid user postgres 43.156.57.127 port 55290 [preauth]
Jul  4 07:53:41 hostname sshd[345234]: User postgres from 43.134.102.169 not allowed because none of user's groups are listed in AllowGroups
Jul  4 07:53:42 hostname sshd[345234]: Disconnected from invalid user postgres 43.134.102.169 port 40874 [preauth]
Jul  4 07:56:31 hostname sshd[345393]: User postgres from 43.153.186.192 not allowed because none of user's groups are listed in AllowGroups
Jul  4 07:56:31 hostname sshd[345393]: Disconnected from invalid user postgres 43.153.186.192 port 46306 [preauth]
Jul  4 10:23:58 hostname sshd[349723]: User postgres from 189.8.108.39 not allowed because none of user's groups are listed in AllowGroups
Jul  4 10:23:58 hostname sshd[349723]: Disconnected from invalid user postgres 189.8.108.39 port 34042 [preauth]
Jul  4 10:28:31 hostname sshd[349904]: User postgres from 43.156.19.40 not allowed because none of user's groups are listed in AllowGroups
Jul  4 10:28:31 hostname sshd[349904]: Disconnected from invalid user postgres 43.156.19.40 port 46062 [preauth]
Jul  4 10:29:09 hostname sshd[349922]: User postgres from 43.135.132.59 not allowed because none of user's groups are listed in AllowGroups
Jul  4 10:29:09 hostname sshd[349922]: Disconnected from invalid user postgres 43.135.132.59 port 39948 [preauth]
Jul  4 10:31:21 hostname sshd[349999]: User postgres from 43.135.175.232 not allowed because none of user's groups are listed in AllowGroups
Jul  4 10:31:21 hostname sshd[349999]: Disconnected from invalid user postgres 43.135.175.232 port 48326 [preauth]
Jul  4 10:48:36 hostname sudo:    user : TTY=pts/0 ; PWD=/home/user ; USER=root ; COMMAND=/usr/bin/ls /usr/share/yunohost/hooks/conf_regen/35-postgresql
Jul  4 10:49:10 hostname sudo:    user : TTY=pts/0 ; PWD=/home/user ; USER=root ; COMMAND=/usr/bin/cat /usr/share/yunohost/hooks/conf_regen/35-postgresql
Jul  4 14:15:35 hostname sudo:    user : TTY=pts/0 ; PWD=/home/user ; USER=root ; COMMAND=/usr/bin/su - postgres
Jul  4 14:15:35 hostname su: (to postgres) user on pts/0
Jul  4 14:15:35 hostname su: pam_unix(su-l:session): session opened for user postgres(uid=122) by user(uid=0)
Jul  4 14:16:01 hostname su: pam_unix(su-l:session): session closed for user postgres
Jul  4 14:16:39 hostname sudo:    user : TTY=pts/0 ; PWD=/home/user ; USER=root ; COMMAND=/usr/bin/systemctl restart postgresql
Jul  4 18:45:35 hostname sshd[363504]: User postgres from 154.221.21.234 not allowed because none of user's groups are listed in AllowGroups
Jul  4 18:45:36 hostname sshd[363504]: Disconnected from invalid user postgres 154.221.21.234 port 39122 [preauth]
Jul  4 21:03:57 hostname sshd[366747]: User postgres from 103.130.212.167 not allowed because none of user's groups are listed in AllowGroups
Jul  4 21:03:57 hostname sshd[366747]: Disconnected from invalid user postgres 103.130.212.167 port 34666 [preauth]
Jul  4 21:05:32 hostname sudo:    user : TTY=pts/0 ; PWD=/home/user ; USER=root ; COMMAND=/usr/bin/cat /usr/share/yunohost/hooks/conf_regen/35-postgresql
Jul  4 21:17:16 hostname sudo:     root : TTY=pts/0 ; PWD=/var/lib/postgresql ; USER=postgres ; COMMAND=/bin/bash --login -c psql -cALTER\ user\ postgres\ WITH\ PASSWORD\ \'fghFGHrtyRTyRY23454fGHfghj\' postgres
Jul  4 21:17:16 hostname sudo: pam_unix(sudo:session): session opened for user postgres(uid=122) by user(uid=0)
Jul  4 21:17:16 hostname sudo: pam_unix(sudo:session): session closed for user postgres
Jul  4 21:20:33 hostname sshd[369226]: User postgres from 165.154.136.104 not allowed because none of user's groups are listed in AllowGroups
Jul  4 21:20:33 hostname sshd[369226]: Disconnected from invalid user postgres 165.154.136.104 port 55162 [preauth]
Jul  4 21:20:53 hostname sshd[369246]: User postgres from 152.136.99.31 not allowed because none of user's groups are listed in AllowGroups
Jul  4 21:20:53 hostname sshd[369246]: Disconnected from invalid user postgres 152.136.99.31 port 34876 [preauth]
Jul  4 21:25:34 hostname sshd[369449]: User postgres from 103.179.111.6 not allowed because none of user's groups are listed in AllowGroups
Jul  4 21:25:34 hostname sshd[369449]: Disconnected from invalid user postgres 103.179.111.6 port 59786 [preauth]
Jul  5 05:59:31 hostname sshd[399849]: User postgres from 43.156.14.158 not allowed because none of user's groups are listed in AllowGroups
Jul  5 05:59:31 hostname sshd[399849]: Disconnected from invalid user postgres 43.156.14.158 port 39326 [preauth]
Jul  5 06:11:59 hostname sshd[400267]: User postgres from 193.151.154.172 not allowed because none of user's groups are listed in AllowGroups
Jul  5 06:12:00 hostname sshd[400267]: Disconnected from invalid user postgres 193.151.154.172 port 40300 [preauth]
Jul  5 06:18:06 hostname sshd[400450]: User postgres from 43.153.209.2 not allowed because none of user's groups are listed in AllowGroups
Jul  5 06:18:07 hostname sshd[400450]: Disconnected from invalid user postgres 43.153.209.2 port 36778 [preauth]
Jul  5 10:00:55 hostname sshd[404811]: User postgres from 61.72.55.130 not allowed because none of user's groups are listed in AllowGroups
Jul  5 10:00:56 hostname sshd[404811]: Disconnected from invalid user postgres 61.72.55.130 port 54492 [preauth]
Jul  5 10:00:59 hostname sshd[404818]: User postgres from 43.135.138.36 not allowed because none of user's groups are listed in AllowGroups
Jul  5 10:00:59 hostname sshd[404818]: Disconnected from invalid user postgres 43.135.138.36 port 46290 [preauth]
Jul  5 10:03:22 hostname sshd[404894]: User postgres from 24.185.97.55 not allowed because none of user's groups are listed in AllowGroups
Jul  5 10:03:22 hostname sshd[404894]: Disconnected from invalid user postgres 24.185.97.55 port 44004 [preauth]
Jul  5 10:05:02 hostname sshd[404946]: User postgres from 164.92.112.124 not allowed because none of user's groups are listed in AllowGroups
Jul  5 10:05:03 hostname sshd[404946]: Disconnected from invalid user postgres 164.92.112.124 port 47790 [preauth]
Jul  5 10:05:44 hostname sshd[404956]: User postgres from 43.128.68.45 not allowed because none of user's groups are listed in AllowGroups
Jul  5 10:05:45 hostname sshd[404956]: Disconnected from invalid user postgres 43.128.68.45 port 49400 [preauth]
Jul  5 10:10:02 hostname sshd[405188]: User postgres from 43.134.184.54 not allowed because none of user's groups are listed in AllowGroups
Jul  5 10:10:02 hostname sshd[405188]: Disconnected from invalid user postgres 43.134.184.54 port 52104 [preauth]
Jul  5 10:18:43 hostname sshd[405474]: User postgres from 150.109.23.87 not allowed because none of user's groups are listed in AllowGroups
Jul  5 10:18:43 hostname sshd[405474]: Disconnected from invalid user postgres 150.109.23.87 port 50116 [preauth]
Jul  5 10:28:23 hostname sshd[405664]: User postgres from 182.106.191.128 not allowed because none of user's groups are listed in AllowGroups
Jul  5 10:28:24 hostname sshd[405664]: Disconnected from invalid user postgres 182.106.191.128 port 50964 [preauth]
Jul  5 11:37:26 hostname sshd[407050]: User postgres from 43.163.223.39 not allowed because none of user's groups are listed in AllowGroups
Jul  5 11:37:27 hostname sshd[407050]: Disconnected from invalid user postgres 43.163.223.39 port 50658 [preauth]
Jul  5 11:44:27 hostname sshd[407479]: User postgres from 51.81.211.107 not allowed because none of user's groups are listed in AllowGroups
Jul  5 11:44:28 hostname sshd[407479]: Disconnected from invalid user postgres 51.81.211.107 port 40238 [preauth]
Jul  5 11:51:14 hostname sshd[407739]: User postgres from 43.135.132.212 not allowed because none of user's groups are listed in AllowGroups
Jul  5 11:51:14 hostname sshd[407739]: Disconnected from invalid user postgres 43.135.132.212 port 39780 [preauth]
Jul  5 11:53:13 hostname sshd[407815]: User postgres from 196.20.68.81 not allowed because none of user's groups are listed in AllowGroups
Jul  5 11:53:13 hostname sshd[407815]: Disconnected from invalid user postgres 196.20.68.81 port 41904 [preauth]
Jul  5 14:38:15 hostname sshd[411386]: User postgres from 143.110.233.79 not allowed because none of user's groups are listed in AllowGroups
Jul  5 14:38:15 hostname sshd[411386]: Disconnected from invalid user postgres 143.110.233.79 port 51186 [preauth]
Jul  5 14:44:25 hostname sshd[411656]: User postgres from 43.133.36.85 not allowed because none of user's groups are listed in AllowGroups
Jul  5 14:44:25 hostname sshd[411656]: Disconnected from invalid user postgres 43.133.36.85 port 48350 [preauth]
Jul  5 14:48:37 hostname sshd[411781]: User postgres from 189.112.242.67 not allowed because none of user's groups are listed in AllowGroups
Jul  5 14:48:38 hostname sshd[411781]: Disconnected from invalid user postgres 189.112.242.67 port 54600 [preauth]
Jul  5 14:56:13 hostname sshd[412042]: User postgres from 158.51.126.147 not allowed because none of user's groups are listed in AllowGroups
Jul  5 14:56:13 hostname sshd[412042]: Disconnected from invalid user postgres 158.51.126.147 port 56378 [preauth]
Jul  5 15:02:02 hostname sshd[412197]: Invalid user postgresql from 223.247.150.123 port 46292
Jul  5 15:02:02 hostname sshd[412197]: Disconnected from invalid user postgresql 223.247.150.123 port 46292 [preauth]
Jul  5 15:03:51 hostname sshd[412286]: User postgres from 27.116.79.242 not allowed because none of user's groups are listed in AllowGroups
Jul  5 15:03:51 hostname sshd[412286]: Disconnected from invalid user postgres 27.116.79.242 port 45020 [preauth]
Jul  5 15:11:15 hostname sshd[412606]: User postgres from 218.255.245.10 not allowed because none of user's groups are listed in AllowGroups
Jul  5 15:11:15 hostname sshd[412606]: Disconnected from invalid user postgres 218.255.245.10 port 48141 [preauth]
Jul  5 15:18:51 hostname sshd[412767]: User postgres from 43.133.54.108 not allowed because none of user's groups are listed in AllowGroups
Jul  5 15:18:51 hostname sshd[412767]: Disconnected from invalid user postgres 43.133.54.108 port 44636 [preauth]
Jul  5 15:39:47 hostname sshd[413413]: User postgres from 213.6.203.226 not allowed because none of user's groups are listed in AllowGroups
Jul  5 15:39:47 hostname sshd[413413]: Disconnected from invalid user postgres 213.6.203.226 port 52490 [preauth]
Jul  5 16:03:06 hostname sshd[414546]: User postgres from 192.210.143.29 not allowed because none of user's groups are listed in AllowGroups
Jul  5 16:03:06 hostname sshd[414546]: Disconnected from invalid user postgres 192.210.143.29 port 51480 [preauth]
Jul  5 16:08:32 hostname sshd[414698]: User postgres from 188.166.161.55 not allowed because none of user's groups are listed in AllowGroups
Jul  5 16:08:32 hostname sshd[414698]: Disconnected from invalid user postgres 188.166.161.55 port 55120 [preauth]
Jul  5 16:14:37 hostname sshd[414938]: User postgres from 202.85.222.190 not allowed because none of user's groups are listed in AllowGroups
Jul  5 16:14:37 hostname sshd[414938]: Disconnected from invalid user postgres 202.85.222.190 port 34299 [preauth]
Jul  5 18:40:37 hostname sshd[418140]: User postgres from 49.51.204.241 not allowed because none of user's groups are listed in AllowGroups
Jul  5 18:40:38 hostname sshd[418140]: Disconnected from invalid user postgres 49.51.204.241 port 41214 [preauth]
Jul  5 18:49:29 hostname sshd[418373]: User postgres from 20.71.215.181 not allowed because none of user's groups are listed in AllowGroups
Jul  5 18:49:30 hostname sshd[418373]: Disconnected from invalid user postgres 20.71.215.181 port 59994 [preauth]
Jul  5 18:54:54 hostname sshd[418530]: User postgres from 128.199.33.46 not allowed because none of user's groups are listed in AllowGroups
Jul  5 18:54:54 hostname sshd[418530]: Disconnected from invalid user postgres 128.199.33.46 port 49166 [preauth]
Jul  5 18:59:03 hostname sshd[418648]: User postgres from 86.104.38.239 not allowed because none of user's groups are listed in AllowGroups
Jul  5 18:59:03 hostname sshd[418648]: Disconnected from invalid user postgres 86.104.38.239 port 44108 [preauth]

second server

cat /var/log/auth.log | grep postgres                 

Jun 30 06:35:38 hostname2 sudo:     root : TTY=pts/0 ; PWD=/var/lib/postgresql ; USER=postgres ; COMMAND=/usr/sbin/nologin -c psql -cALTER\ user\ postgres\ WITH\ PASSWORD\ \'HNPts1gEGd6HylLwJqh4XbEQ\' postgres
Jun 30 06:35:38 hostname2 sudo: pam_unix(sudo:session): session opened for user postgres(uid=120) by (uid=0)
Jun 30 06:35:38 hostname2 sudo: pam_unix(sudo:session): session closed for user postgres
Jun 30 08:17:28 hostname2 sudo:     root : TTY=pts/1 ; PWD=/var/lib/postgresql ; USER=postgres ; COMMAND=/usr/sbin/nologin -c psql -cALTER\ user\ postgres\ WITH\ PASSWORD\ \'HNPts1gEGd6HylLwJqh4XbEQ\' postgres
Jun 30 08:17:28 hostname2 sudo: pam_unix(sudo:session): session opened for user postgres(uid=120) by (uid=0)
Jun 30 08:17:28 hostname2 sudo: pam_unix(sudo:session): session closed for user postgres
Jun 30 08:26:37 hostname2 sudo:   user2 : TTY=pts/0 ; PWD=/home/user2 ; USER=root ; COMMAND=/usr/bin/passwd -S postgres
Jun 30 08:28:17 hostname2 sudo:   user2 : TTY=pts/0 ; PWD=/home/user2 ; USER=root ; COMMAND=/usr/bin/chage -l postgres
Jul  2 06:48:02 hostname2 sudo:     root : TTY=pts/0 ; PWD=/var/lib/postgresql ; USER=postgres ; COMMAND=/usr/sbin/nologin -c psql -cALTER\ user\ postgres\ WITH\ PASSWORD\ \'HNPts1gEGd6HylLwJqh4XbEQ\' postgres
Jul  2 06:48:02 hostname2 sudo: pam_unix(sudo:session): session opened for user postgres(uid=120) by (uid=0)
Jul  2 06:48:02 hostname2 sudo: pam_unix(sudo:session): session closed for user postgres
Jul  4 11:39:07 hostname2 sudo:     root : PWD=/var/lib/postgresql ; USER=postgres ; COMMAND=/usr/sbin/nologin -c psql -cALTER\ user\ postgres\ WITH\ PASSWORD\ \'HNPts1gEGd6HylLwJqh4XbEQ\' postgres
Jul  4 11:39:07 hostname2 sudo: pam_unix(sudo:session): session opened for user postgres(uid=120) by (uid=0)
Jul  4 11:39:07 hostname2 sudo: pam_unix(sudo:session): session closed for user postgres
Jul  4 11:46:11 hostname2 chage[425191]: changed password expiry for postgres
Jul  4 11:47:49 hostname2 sudo:     root : TTY=pts/0 ; PWD=/var/lib/postgresql ; USER=postgres ; COMMAND=/usr/sbin/nologin -c psql -cALTER\ user\ postgres\ WITH\ PASSWORD\ \'HNPts1gEGd6HylLwJqh4XbEQ\' postgres
Jul  4 11:47:49 hostname2 sudo: pam_unix(sudo:session): session opened for user postgres(uid=120) by user2(uid=0)
Jul  4 11:47:50 hostname2 sudo: pam_unix(sudo:session): session closed for user postgres
Jul  4 11:50:29 hostname2 sudo:     root : TTY=pts/0 ; PWD=/var/lib/postgresql ; USER=postgres ; COMMAND=/usr/sbin/nologin -c psql -cALTER\ user\ postgres\ WITH\ PASSWORD\ \'HNPts1gEGd6HylLwJqh4XbEQ\' postgres
Jul  4 11:50:29 hostname2 sudo: pam_unix(sudo:session): session opened for user postgres(uid=120) by user2(uid=0)
Jul  4 11:50:29 hostname2 sudo: pam_unix(sudo:session): session closed for user postgres
Jul  4 11:54:13 hostname2 sudo:   user2 : TTY=pts/0 ; PWD=/home/user2 ; USER=root ; COMMAND=/usr/bin/cat /usr/share/yunohost/hooks/conf_regen/35-postgresql
Jul  4 11:54:25 hostname2 sudo:   user2 : TTY=pts/0 ; PWD=/home/user2 ; USER=root ; COMMAND=/usr/bin/sh /usr/share/yunohost/hooks/conf_regen/35-postgresql
Jul  4 11:54:38 hostname2 sudo:   user2 : TTY=pts/0 ; PWD=/home/user2 ; USER=root ; COMMAND=/usr/bin/zsh /usr/share/yunohost/hooks/conf_regen/35-postgresql
Jul  4 11:57:02 hostname2 su: pam_unix(su-l:account): expired password for user postgres (root enforced)
Jul  4 11:58:11 hostname2 su: pam_unix(su-l:account): expired password for user postgres (root enforced)
Jul  4 11:58:17 hostname2 su: pam_unix(su-l:chauthtok): authentication failure; logname=user2 uid=0 euid=0 tty=pts/0 ruser=user2 rhost=  user=postgres
Jul  4 11:58:20 hostname2 su: FAILED SU (to postgres) user2 on pts/0
Jul  4 13:32:57 hostname2 sudo:     root : TTY=pts/0 ; PWD=/var/lib/postgresql ; USER=postgres ; COMMAND=/usr/sbin/nologin -c psql -cALTER\ user\ postgres\ WITH\ PASSWORD\ \'HNPts1gEGd6HylLwJqh4XbEQ\' postgres
Jul  4 13:32:57 hostname2 sudo: pam_unix(sudo:session): session opened for user postgres(uid=120) by user2(uid=0)
Jul  4 13:32:57 hostname2 sudo: pam_unix(sudo:session): session closed for user postgres
Jul  4 13:34:56 hostname2 sudo:     root : TTY=pts/0 ; PWD=/var/lib/postgresql ; USER=postgres ; COMMAND=/usr/sbin/nologin -c psql -cALTER\ user\ postgres\ WITH\ PASSWORD\ \'HNPts1gEGd6HylLwJqh4XbEQ\' postgres
Jul  4 13:34:56 hostname2 sudo: pam_unix(sudo:session): session opened for user postgres(uid=120) by user2(uid=0)
Jul  4 13:34:56 hostname2 sudo: pam_unix(sudo:session): session closed for user postgres

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.