Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f7s9R-0003yn-Ip for pgsql-admin@arkaria.postgresql.org; Mon, 16 Apr 2018 00:37:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f7s9Q-0001ZJ-Ek for pgsql-admin@arkaria.postgresql.org; Mon, 16 Apr 2018 00:37:44 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1f7s9O-0001Z4-Cm; Mon, 16 Apr 2018 00:37:44 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f7s9J-0005C9-98; Mon, 16 Apr 2018 00:37:41 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C69D620DDC; Sun, 15 Apr 2018 20:37:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 15 Apr 2018 20:37:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=uFkhwkb9W+38PFMW/4Tka7EQ4X4RE 41n4yScPaay4RQ=; b=FEJ4n6M0RpBSBeQTs6RfcjIOcpxL0jrUb5B+EObAYJrdU dLmPXezQjLezcPJfvhRDKbYaJjcKRMr3NLZMfdpX6/mShC+UtWpwPh4LSAnhq01H /MwDnwVaKdK04/ZLLLstLTP4Z1HY4DCernKTNlTh/eF4YLkauaVRmXUtw9u6q2Vw 6kstB+lNhibPalAw+rySEXxIhcFI57FF0rdpftEf/AZFd/cQxWgykrz3mYcPgfQ0 BO4RjbX4j7QTVpfaSI+D3LmmDH0nRMOe2Cejv7GUS/yGl27HDfjNP2vxYxxT2Y55 mNnvF1l/Er8Knhiru4LL1mfkYtNDxZOcBrLcK4cfA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=uFkhwk b9W+38PFMW/4Tka7EQ4X4RE41n4yScPaay4RQ=; b=FdQNZFdx3DJKvY++6RdWup 4kiztVKTcW4pnE6ImS2iFvcLUMvRFcFcvBZOA0Li1Qq7vepZf2sZHefR39XeuQ+Q jum3sHnkJdHN/ePBirVZ0JJy4nKHudlUPkcviLVPaOU2SpBkHqr3aHGf4+5E378u XAWJ3pv7PBfHOJoVSvcNx8+DTPSvpdmU/OxtvlrVwTAwPPyYpmPvNwvmgLymVheA 4zn+Xd9t54upxr1KLi/uEi/p4pf6/deIZvXQodgy3TMJW9d77p6PKrStbrurrI2d DF6hx4TjQj8eJcGe/DQ9aCf+pa55HdiYy8x1DReynuZ+b+DP5blCKCXcBiQDr9Xg == X-ME-Sender: Received: from [192.168.1.2] (71-35-123-124.tukw.qwest.net [71.35.123.124]) by mail.messagingengine.com (Postfix) with ESMTPA id EFDF8E509B; Sun, 15 Apr 2018 20:37:33 -0400 (EDT) Subject: Re: Password encryption To: Azimuddin Mohammed , pgsql-admin , Postgres General References: From: Adrian Klaver Message-ID: <7dee6678-0114-782b-6c6e-5fa8ad08dd05@aklaver.com> Date: Sun, 15 Apr 2018 17:37:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 04/15/2018 05:22 PM, Azimuddin Mohammed wrote: > Hello, > Is there a way I can encrypt the default password column of db user > password. I know by default the password is encrypted as md5, can we > encrypt that of shadow column for password? Are you talking about this view?: https://www.postgresql.org/docs/10/static/view-pg-shadow.html If so that is only readable by superusers: production=# \c - aklaver You are now connected to database "production" as user "aklaver". production=> select * from pg_shadow ; ERROR: permission denied for relation pg_shadow production=> \c - postgres You are now connected to database "production" as user "postgres". production=# select * from pg_shadow ; usename | usesysid | usecreatedb | usesuper | userepl | usebypassrls | passwd | valuntil | useconfig ... Assuming someone is in your database as a superuser, access to the password field in pg_shadow is pretty much moot. > > Thanks in advance -- Adrian Klaver adrian.klaver@aklaver.com