Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hzitw-00056P-TN for pgsql-general@arkaria.postgresql.org; Mon, 19 Aug 2019 14:44:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hzitv-0003jl-NX for pgsql-general@arkaria.postgresql.org; Mon, 19 Aug 2019 14:44:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hzitv-0003je-Ec for pgsql-general@lists.postgresql.org; Mon, 19 Aug 2019 14:44:51 +0000 Received: from mailbackend.panix.com ([166.84.1.89]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hzits-0007vO-Uc for pgsql-general@lists.postgresql.org; Mon, 19 Aug 2019 14:44:50 +0000 Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mailbackend.panix.com (Postfix) with ESMTP id 46BxXZ2WdQz1b0G for ; Mon, 19 Aug 2019 10:44:46 -0400 (EDT) Received: by panix2.panix.com (Postfix, from userid 17622) id 46BxXZ13hPz1ZVM; Mon, 19 Aug 2019 10:44:46 -0400 (EDT) Date: Mon, 19 Aug 2019 10:44:45 -0400 From: stan To: pgsql-general@lists.postgresql.org Subject: Sorry, real newbie question about connecting to a database Message-ID: <20190819144445.GA7984@panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Editor: gVim User-Agent: Mutt/1.12.1 (2019-06-15) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I am developinng an appliction usig Postgresql 11, installed on a UBUTU 18.14 machine. I ahve vreated a new database to do some testing on restricting access of specific users/roles to certain data. I have done the following: REVOKE ALL ON DATABASE pertest FROM employee; GRANT CONNECT ON DATABASE pertest TO employee; and I have verifed tht the user employee does exst, I have also doen a few more GRABTs to allow specific acces. But I cannot conect, or swith to user employee: stan@smokey:/etc/postgresql/11/main$ psql -U employee psql: FATAL: Peer authentication failed for user "employee" stan=> \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges --------+----------+----------+---------+---------+----------------------- pertest | stan | UTF8 | C.UTF-8 | C.UTF-8 | =Tc/stan + | | stan=CTc/stan employee=CTc/stan Sorrry cut and paste mangled that. What am I failing to do here? -- "They that would give up essential liberty for temporary safety deserve neither liberty nor safety." -- Benjamin Franklin