From 1e40e2951805785f9adf19b03b001725c9bffd85 Mon Sep 17 00:00:00 2001 From: Frederic Lepied Date: Wed, 20 Nov 2002 19:57:06 +0000 Subject: password_aging: chage is l10n now so use LC_ALL=C before calling it. --- share/libmsec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'share') 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: -- cgit v1.2.1