Fixed expiredate parameter in user module

Changed "--expiredate" to "-e", as on older systems "--expiredate" is not present.
This commit is contained in:
ppanczyk 2016-12-14 09:13:46 +01:00 committed by Brian Coca
parent 55aec8ebc9
commit 6d0f61b656

View file

@ -402,7 +402,7 @@ class User(object):
cmd.append(self.shell)
if self.expires:
cmd.append('--expiredate')
cmd.append('-e')
cmd.append(time.strftime(self.DATE_FORMAT, self.expires))
if self.password is not None:
@ -515,7 +515,7 @@ class User(object):
cmd.append(self.shell)
if self.expires:
cmd.append('--expiredate')
cmd.append('-e')
cmd.append(time.strftime(self.DATE_FORMAT, self.expires))
if self.update_password == 'always' and self.password is not None and info[1] != self.password: