Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZzkyJ-00027E-GY for pgsql-admin@arkaria.postgresql.org; Fri, 20 Nov 2015 12:39:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZzkyJ-0000SA-35 for pgsql-admin@arkaria.postgresql.org; Fri, 20 Nov 2015 12:39:23 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Zzk7Y-0004be-ID for pgsql-admin@postgresql.org; Fri, 20 Nov 2015 11:44:52 +0000 Received: from mail-lf0-x22c.google.com ([2a00:1450:4010:c07::22c]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Zzk7V-00026c-Mq for pgsql-admin@postgresql.org; Fri, 20 Nov 2015 11:44:51 +0000 Received: by lfaz4 with SMTP id z4so67302267lfa.0 for ; Fri, 20 Nov 2015 03:44:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version :content-type:content-transfer-encoding; bh=qFoBdwIV5wY4fNxt1Nfh3WkZIF9eDsOWlupW/HZ8yVM=; b=0zZlP+RZAK8C+H+Npzy3RE3kYrbHPP9KKyomv/Rk+EoQfZnn6vuXwYbrmxEirBoy7+ DNyc8mLVf0+0eXmQaSHs7APJ0CUNVHFI05PAowJbtLRFT05DV935D9I/tVQJx+jiYzBT bsOTUVF3qs2SzecWcWOZT+UhnZexw3gseEVZg2py5tmPwcBXBomtmTDpHz/l3FtcnYP4 QJu+EI9Fq8AxcWjRXTM+QdEntYCLTU/zcadhOv3Pm/YaaIgsVx0+N+s2adJj5HSIbgej gh/ThuNg7DERazJQ/pFNjjRjqKeeZD2+DAzIpapjW9Vy6VWgwG/LcYSNUouKOUNvj7IH AwOQ== X-Received: by 10.25.17.66 with SMTP id g63mr4721288lfi.110.1448019887498; Fri, 20 Nov 2015 03:44:47 -0800 (PST) Received: from [192.168.1.109] ([188.191.20.1]) by smtp.googlemail.com with ESMTPSA id w7sm59754lbb.14.2015.11.20.03.44.46 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 Nov 2015 03:44:46 -0800 (PST) To: pgsql-admin@postgresql.org From: olologin Subject: Problem with pg_hba.conf Message-ID: <564F07AD.3010302@gmail.com> Date: Fri, 20 Nov 2015 14:44:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Hello folks, i have some weird problem which i cannot solve. I'm trying to setup PostgreSQL for first time (I've never used it before, and maybe this question is too newbie, but still): > root@usersE420:/var/lib/postgresql/9.4/main# sudo -u postgres psql -qt > postgres=# \l > overseer | overseer | UTF8 | en_US.UTF-8 | en_US.UTF-8 | > postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | > .......... > > postgres=# \du > overseer | | {} > postgres | Superuser, Create role, Create DB, Replication | {} > > postgres=# show hba_file; > /etc/postgresql/9.4/main/pg_hba.conf What pg_hba.conf contains (last lines): > # Database administrative login by Unix domain socket > local all postgres peer > > # TYPE DATABASE USER ADDRESS METHOD > > # "local" is for Unix domain socket connections only > local all all md5 > # IPv4 local connections: > host all all 127.0.0.1/32 md5 > # IPv6 local connections: > #host all all ::1/128 md5 > # Allow replication connections from localhost, by a user with the > # replication privilege. > #local replication postgres peer > #host replication postgres 127.0.0.1/32 md5 > #host replication postgres ::1/128 md5 After editing of this file i restarted server with: > root@usersE420:/var/lib/postgresql/9.4/main# /etc/init.d/postgresql > restart > [ ok ] Restarting postgresql (via systemctl): postgresql.service. But still i cannot login into psql with overseer account: > root@usersE420:/var/lib/postgresql/9.4/main# psql -qt -U overseer > psql: FATAL: Peer authentication failed for user "overseer" > root@usersE420:/var/lib/postgresql/9.4/main# psql -qt -U overseer -W > Password for user overseer: > psql: FATAL: Peer authentication failed for user "overseer" I'm also confused because i think that it's still tries to use peer authentication. Help with this pls, Ubuntu 15.10, PostgreSQL 9.4 -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin