Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
las-it-organisation
32-0-IT instructions and rules
ansible
Commits
4c4f1544
Commit
4c4f1544
authored
May 14, 2018
by
julian.gethmann
Browse files
Reformat the date in pwpolicies output
parent
f3571e9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
set_ipa_pwpolicies.py
View file @
4c4f1544
...
...
@@ -61,7 +61,8 @@ def main():
prev_expire
=
api
.
Command
.
user_show
(
user
,
all
=
True
)[
"result"
].
get
(
"krbpasswordexpiration"
,
(
datetime
.
datetime
(
1970
,
1
,
1
),))[
0
]
print
(
f
"Set password expiration time for
{
user
}
from
{
prev_expire
:
%
Y
%
m
%
d
%
H
%
M
%
S
}
to
{
new_expiretime
:
%
Y
-%
m
-%
d
}
"
)
print
(
f
"Set password expiration time for
{
user
}
from
{
prev_expire
:
%
Y
-%
m
-%
dT
%
H
:
%
M
:
%
S
}
to
{
new_expiretime
:
%
Y
-%
m
-%
d
}
"
)
with
suppress
(
ipalib
.
errors
.
EmptyModlist
):
api
.
Command
.
user_mod
(
user
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment