1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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
This commit is contained in:
Ryan Groten 2018-01-26 11:30:32 -07:00 committed by Adam Miller
parent ea2b89c7ae
commit 34d6f5168f

View file

@ -2096,6 +2096,7 @@ class HPUX(User):
cmd.append(self.shell) cmd.append(self.shell)
if self.update_password == 'always' and self.password is not None and info[1] != self.password: if self.update_password == 'always' and self.password is not None and info[1] != self.password:
cmd.append('-F')
cmd.append('-p') cmd.append('-p')
cmd.append(self.password) cmd.append(self.password)