From 34d6f5168ff49210b2858772ae291adbff047927 Mon Sep 17 00:00:00 2001 From: Ryan Groten Date: Fri, 26 Jan 2018 11:30:32 -0700 Subject: [PATCH] Add -F to usermod -p to force user password update (#26258) If changing root password, usermod will fail with error "Login root is currently in use\n". -F avoids this --- lib/ansible/modules/system/user.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/modules/system/user.py b/lib/ansible/modules/system/user.py index 8d863ba8a57..06685a55169 100644 --- a/lib/ansible/modules/system/user.py +++ b/lib/ansible/modules/system/user.py @@ -2096,6 +2096,7 @@ class HPUX(User): cmd.append(self.shell) if self.update_password == 'always' and self.password is not None and info[1] != self.password: + cmd.append('-F') cmd.append('-p') cmd.append(self.password)