Bug 7912

Summary: GDM does not permit login when password needs changing
Product: [Retired] Red Hat Linux Reporter: Philip Spencer <pspencer>
Component: gdmAssignee: Havoc Pennington <hp>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-01-17 20:28:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Philip Spencer 1999-12-20 20:57:59 UTC
GDM does not permit login when the user's password needs changing, as is
commonly the case when a user logs in for the first time after a random
initial password has been created for them by a system administrator. The
following patch fixes this problem by allowing gdm to let PAM prompt for
the new password:

--- gdm-2.0beta2/daemon/verify.c.orig   Wed Sep  1 16:08:51 1999
+++ gdm-2.0beta2/daemon/verify.c        Mon Dec 20 15:48:31 1999
@@ -167,7 +167,12 @@
        goto pamerr;
     }

-    if ((pamerr = pam_acct_mgmt (pamh, 0)) != PAM_SUCCESS) {
+    pamerr = pam_acct_mgmt(pamh,0);
+    if (pamerr == PAM_NEW_AUTHTOK_REQD) {
+        pamerr = pam_chauthtok(pamh,PAM_CHANGE_EXPIRED_AUTHTOK);
+    }
+
+    if (pamerr != PAM_SUCCESS) {
        gdm_error (_("Couldn't set acct. mgmt for %s"), login);
        goto pamerr;
     }

Comment 1 Elliot Lee 2000-01-17 20:28:59 UTC
Thanks for the patch - I've applied it, and it will be in gdm-2.0beta2-18 in
Rawhide very soon.