[PATCH] Don't set "date of last password change" /etc/shadow field (#985572)
Vratislav Podzimek
vpodzime at redhat.com
Fri Sep 6 13:47:03 UTC 2013
From: Hans de Goede <hdegoede at redhat.com>
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
pyanaconda/users.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pyanaconda/users.py b/pyanaconda/users.py
index ba5427a..e831122 100644
--- a/pyanaconda/users.py
+++ b/pyanaconda/users.py
@@ -335,6 +335,8 @@ class Users:
else:
password = cryptPassword(kwargs["password"], algo=kwargs.get("algo", None))
self.admin.setpassUser(userEnt, password, True)
+ userEnt.set(libuser.SHADOWLASTCHANGE, "")
+ self.admin.modifyUser(userEnt)
elif pw == "":
# Setup the account with *NO* password
self.admin.unlockUser(userEnt)
@@ -410,6 +412,7 @@ class Users:
if lock:
self.admin.lockUser(user)
+ user.set(libuser.SHADOWLASTCHANGE, "")
self.admin.modifyUser(user)
def setRootPassword(self, password, isCrypted=False, isLocked=False, algo=None):
--
1.7.11.7
More information about the anaconda-patches
mailing list