From 2821ab4372e98bdd39ad52b81d60437312079078 Mon Sep 17 00:00:00 2001 From: Matthias Choules Date: Mon, 28 Jun 2021 14:32:25 +0200 Subject: [PATCH] Decode full name and hint with UTF-8 --- createuserpkg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/createuserpkg b/createuserpkg index 041027e..c4d71e4 100755 --- a/createuserpkg +++ b/createuserpkg @@ -119,7 +119,7 @@ def main(): 'uid': options.uid, 'ShadowHashData': shadowhash.generate(password)} if options.fullname: - user_data['realname'] = options.fullname + user_data['realname'] = options.fullname.decode("utf-8") if options.gid: user_data['gid'] = options.gid if options.generateduid: @@ -131,7 +131,7 @@ def main(): if options.hidden: user_data['IsHidden'] = u'YES' if options.hint: - user_data['hint'] = options.hint + user_data['hint'] = options.hint.decode("utf-8") user_plist = userplist.generate(user_data)