[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH] login: permit change expired password
From:       Mario Abajo <marioabajo () gmail ! com>
Date:       2021-04-28 22:54:38
Message-ID: CAErzmWw8EDc78uwzEcn80zDRnMs2Y7nRY3y69nAAcaOabWf6MQ () mail ! gmail ! com
[Download RAW message or body]

Add support in login command to change password in case it is expired:
---

--- a/loginutils/login.c    2021-03-22 01:34:05.628165667 +0100
+++ b/loginutils/login.c    2021-03-22 01:36:22.719612349 +0100
@@ -434,6 +434,9 @@
         }
         /* check that the account is healthy */
         pamret = pam_acct_mgmt(pamh, 0);
+        if (pamret == PAM_NEW_AUTHTOK_REQD) {
+            pamret = pam_chauthtok (pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
+        }
         if (pamret != PAM_SUCCESS) {
             failed_msg = "acct_mgmt";
             goto pam_auth_failed;
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic