Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s8LEp-00BuqD-4X for pgsql-general@arkaria.postgresql.org; Sat, 18 May 2024 14:40:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s8LEp-006X7B-4H for pgsql-general@arkaria.postgresql.org; Sat, 18 May 2024 14:40:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s8LEn-006X6u-FR for pgsql-general@lists.postgresql.org; Sat, 18 May 2024 14:40:42 +0000 Received: from fhigh4-smtp.messagingengine.com ([103.168.172.155]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s8LEk-000pT3-7d for pgsql-general@postgresql.org; Sat, 18 May 2024 14:40:40 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 859A711400E0; Sat, 18 May 2024 10:40:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 18 May 2024 10:40:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1716043236; x=1716129636; bh=AfD6et8HodbMnVO1dIyxnl7gvb7Cmqs78ReQssKn0Xo=; b= q/SjuR/VOeASBHKUYVij1yHDhN+dlB3e7JKiZc49Fvcakr0S8eQTEItm+YE+O231 Vm8ICRvVjUQZRpLpPyL5hLi8V0MWHN6+Ztwi1gTs8w/AyCHwXmzc+qYC9jpeT/hR RBEYy4o6saHRT1xXzR30r96yGNdva8SQ/qVFEzmIBgD+mHj6kqas6E5bVeJ3tHv3 2tQk2H9ghkehlYZjKa0b2RBVkNXL+HGWK0DvhnfDczTfSGQ1x8eAlGUbBxvpy2U3 Vw0LuSaOq1zusIwA/zR3pXAc0LLftpsHMaPPpWc0M3/AIGzM/Px2opbetqC9wemT /z5h0IIVNzNdDzGqMwDJlw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1716043236; x= 1716129636; bh=AfD6et8HodbMnVO1dIyxnl7gvb7Cmqs78ReQssKn0Xo=; b=X InIH2xO8nfqJBENNocck/EARwLACMcDGFfNnI4dWMW5Ya55mFpJjtVQUuUz3uzbP 4f5wNWAsdIhYDc7TBIVpnESYEwKZ00DXBxfS9aBwDsqEJ3bYIid57bW/GGGd/6bX vLTzu5SKvodggazBGtd2swlYuQjYv01h0zgw0eOyPIVsRjqhSqCuXSg3ehC3NwDy Tl1KEbnpMtQmHXsw2ulq6z3qVqFwePOIU+weuTCKfRrMhDsTbKfHWgBmTKAsFClR MxAJyaMOlA+vsfV1Sw1PyJKM6dcZy/hD4qdAueoEOh26n94JCnPeqGWLpKVGeRzt 9ADkB5g4vVwkPmkTbtKkg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdehiedgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfvefhjggtgfesth ekredttddvjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeeukeehhf fhhfefhedvvdeugeeujedvjeekfeefgeelfeeivdetjedtfeevkedtheenucffohhmrghi nhepphhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdr tghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 18 May 2024 10:40:35 -0400 (EDT) Message-ID: <57e79d07-e894-4372-a08d-8e9bf21ba881@aklaver.com> Date: Sat, 18 May 2024 07:40:35 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Valid until To: Rama Krishnan References: <7dff9a17-744d-437b-847c-18c161c8a901@aklaver.com> Content-Language: en-US Cc: pgsql-general From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 5/18/24 02:37, Rama Krishnan wrote: Reply to list also. Ccing list. > > > Please find the details below > > > ``` > postgres=# \du >                               List of roles >  Role name  |                         Attributes > ------------+------------------------------------------------------------ >  pgbackrest | Replication >  postgres   | Superuser, Create role, Create DB, Replication, Bypass RLS >  test       | Password valid until 2023-05-13 00:00:00+00 >  user_name  | Password valid until 2024-05-13 00:00:00+00 > > postgres=# show timezone; >  TimeZone > ---------- >  UTC > (1 row) > > postgres=# select version(); >                                                  version > --------------------------------------------------------------------------------------------------------- >  PostgreSQL 16.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 > 20210514 (Red Hat 8.5.0-20), 64-bit > (1 row) > > postgres=# \q > [postgres@postgres16 log]$ psql -U username -d postgres > psql: error: connection to server on socket > "/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "username" does not > exist > [postgres@postgres16 log]$ psql -U user_name -d postgres > psql (16.2) > Type "help" for help. > ``` > > Regards > > A.Rama Krishnan > > > On Tue, May 14, 2024 at 8:57 PM Adrian Klaver > wrote: > > On 5/14/24 00:57, Rama Krishnan wrote: > > Hi team, > > > > I have a question about the "valid until" parameter in the > "create role" > > command. > > > > I recently set a user's password validity to "2024-05-13", but > despite > > this, the user is still able to connect to the database. Is this > a bug, > > or is the "valid until" parameter just for identification purposes, > > indicating when the password will expire? > > > > Could you please clarify this for me? > > https://www.postgresql.org/docs/current/sql-createrole.html > > > " > VALID UNTIL 'timestamp' > >      The VALID UNTIL clause sets a date and time after which the > role's > password is no longer valid. If this clause is omitted the password > will > be valid for all time. > " > > When did the user log in? > > What is the TimeZone setting in the database? > > > > > > > Thanks > > > > Ram > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com