Subject: Password Change Mandatory during First Login

From: SASIKUMAR Devaraj <[email-masked]>
Date: Tue, 27 Aug 2024 09:36:54 +0000 (UTC)

Hi All
Please advise whether it is possible to force the user to change password during first login.
RegardsSasi

---

From: Kashif Zeeshan <[email-masked]>
Date: Tue, 27 Aug 2024 15:01:43 +0500

Hi SASIKUMAR

PG does not support such feature directly.

Thanks & Regards
Kashif Zeeshan

On Tue, Aug 27, 2024 at 2:37 PM SASIKUMAR Devaraj <[email-masked]>
wrote:

> Regards
> Sasi

---

From: Muhammad Waqas <[email-masked]>
Date: Tue, 27 Aug 2024 15:04:01 +0500

yes you can by  CREATE ROLE foo LOGIN PASSWORD 'foo' VALID UNTIL
'2021-11-22';

but password authentication in pg_hba.conf should be enable.

-- 
*Muhammad Waqas*
*Senior Technical Support Engineer - Tech Support Center (Karachi)*
Mobile: +92-322-2844150
Email:  [email-masked] <[email-masked]>*
1st floor, suit no F-04, COLABS Karachi, 8-C Khayaban-e-Tanzeem,
DHA Phase 5 Tauheed Commercial Area,
Defense V Defense Housing Authority, Karachi, Karachi City, Sindh,
75500 Pakistan.

---

From: SASIKUMAR Devaraj <[email-masked]>
Date: Thu, 29 Aug 2024 03:59:45 +0000 (UTC)

We tried it. After validity ends, the user account expires and not prompting to change password 

Sent from Yahoo Mail for iPhone

On Tuesday, August 27, 2024, 3:34 PM, Muhammad Waqas <[email-masked]> wrote:

yes you can by  CREATE ROLE foo LOGIN PASSWORD 'foo' VALID UNTIL '2021-11-22';
but password authentication in pg_hba.conf should be enable.
On Tue, 27 Aug 2024 at 14:37, SASIKUMAR Devaraj <[email-masked]> wrote:

Hi All

-- 
Muhammad WaqasSenior Technical Support Engineer - Tech Support Center (Karachi)Mobile: +92-322-2844150Email:  [email-masked] 1st floor, suit no F-04, COLABS Karachi, 8-C Khayaban-e-Tanzeem, DHA Phase 5 Tauheed Commercial Area,Defense V Defense Housing Authority, Karachi, Karachi City, Sindh, 75500 Pakistan.

---

From: Laurenz Albe <[email-masked]>
Date: Thu, 29 Aug 2024 12:56:16 +0200

> > > Please advise whether it is possible to force the user to change password during first login.

Right; there is no way in PostgreSQL to prompt a password change.

Yours,
Laurenz Albe

---

From: S Hoffman <[email-masked]>
Date: Thu, 29 Aug 2024 06:26:25 -0700

Good morning Sasi,

You can write a Python script to achieve the goal. It requires connecting to the database externally but can significantly enhance your security if done correctly. I would advise you to find someone experienced with database programming and security to set this up.

Please let me know if you have any questions.

Thank you,
Sondra

Sent from my iPhone

> On Aug 27, 2024, at 2:37 AM, SASIKUMAR Devaraj <[email-masked]> wrote:
> 
> 
> Hi All
>