aboutsummaryrefslogtreecommitdiffstats
path: root/share/libmsec.py
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2002-11-20 19:57:06 +0000
committerFrederic Lepied <flepied@mandriva.com>2002-11-20 19:57:06 +0000
commit1e40e2951805785f9adf19b03b001725c9bffd85 (patch)
tree91b1ea6582a46ee0b0219bb84204fd672c0f2ba7 /share/libmsec.py
parent3e11cbf780419cfc9f2c31f865a85bcabad4e7e1 (diff)
downloadmsec-1e40e2951805785f9adf19b03b001725c9bffd85.tar
msec-1e40e2951805785f9adf19b03b001725c9bffd85.tar.gz
msec-1e40e2951805785f9adf19b03b001725c9bffd85.tar.bz2
msec-1e40e2951805785f9adf19b03b001725c9bffd85.tar.xz
msec-1e40e2951805785f9adf19b03b001725c9bffd85.zip
password_aging: chage is l10n now so use LC_ALL=C before calling it.
Diffstat (limited to 'share/libmsec.py')
-rw-r--r--share/libmsec.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/libmsec.py b/share/libmsec.py
index e8e77cc..7a016f6 100644
--- a/share/libmsec.py
+++ b/share/libmsec.py
@@ -1164,7 +1164,7 @@ def password_aging(max, inactive=-1):
error(_('User %s in shadow but not in passwd file') % name)
continue
if (len(password) > 0 and password[0] != '!') and password != '*' and password != 'x' and (entry[2] >= uid_min or entry[2] == 0):
- cmd = '/usr/bin/chage -l %s' % entry[0]
+ cmd = 'LC_ALL=C /usr/bin/chage -l %s' % entry[0]
ret = commands.getstatusoutput(cmd)
_interactive and log(_('got current maximum password aging for user %s with command \'%s\'') % (entry[0], cmd))
if ret[0] == 0:
@@ -1184,7 +1184,7 @@ def password_aging(max, inactive=-1):
if current_inactive < inactive:
new_inactive = current_inactive
if new_max != current_max or current_inactive != new_inactive:
- cmd = '/usr/bin/chage -M %d -I %d -d %s %s' % (new_max, new_inactive, time.strftime('%Y-%m-%d'), entry[0])
+ cmd = 'LC_ALL=C /usr/bin/chage -M %d -I %d -d %s %s' % (new_max, new_inactive, time.strftime('%Y-%m-%d'), entry[0])
ret = commands.getstatusoutput(cmd)
log(_('changed maximum password aging for user %s with command %s') % (entry[0], cmd))
if ret[0] != 0: