From 314007975f487e84a93d8879acac2b4689a2d6c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Diemer?= <stephane.diemer@ubicast.eu> Date: Thu, 2 Feb 2017 16:52:10 +0100 Subject: [PATCH] Fixed password set. --- 1.Base/2.ubicast_shell_access/0_setup.py | 2 +- 1.Base/3.admin_shell_account/0_setup.py | 2 +- 4.Monitor/1.Install_monitor/0_setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/1.Base/2.ubicast_shell_access/0_setup.py b/1.Base/2.ubicast_shell_access/0_setup.py index 71187300..5bc0e5fa 100644 --- a/1.Base/2.ubicast_shell_access/0_setup.py +++ b/1.Base/2.ubicast_shell_access/0_setup.py @@ -41,7 +41,7 @@ def setup(interactive=True): pwd = utils.get_conf('SHELL_UBICAST_PWD') if pwd: p = subprocess.Popen(['passwd', '-q', 'ubicast'], stdin=subprocess.PIPE) - p.communicate(input=b'%(pwd)s\n%(pwd)s' % dict(pwd=pwd.encode('utf-8'))) + p.communicate(input=b'%(pwd)s\n%(pwd)s' % {b'pwd': pwd.encode('utf-8')}) if p.returncode != 0: raise Exception('Failed to set ubicast account password.') utils.log('\033[1;33m The ubicast account password has been set. \033[0m') diff --git a/1.Base/3.admin_shell_account/0_setup.py b/1.Base/3.admin_shell_account/0_setup.py index 669e58e0..f28da892 100644 --- a/1.Base/3.admin_shell_account/0_setup.py +++ b/1.Base/3.admin_shell_account/0_setup.py @@ -23,7 +23,7 @@ def setup(interactive=True): pwd = utils.get_conf('SHELL_ADMIN_PWD') if pwd: p = subprocess.Popen(['passwd', '-q', 'admin'], stdin=subprocess.PIPE) - p.communicate(input=b'%(pwd)s\n%(pwd)s' % dict(pwd=pwd.encode('utf-8'))) + p.communicate(input=b'%(pwd)s\n%(pwd)s' % {b'pwd': pwd.encode('utf-8')}) if p.returncode != 0: raise Exception('Failed to set admin account password.') utils.log('\033[1;33m The admin account password has been set. \033[0m') diff --git a/4.Monitor/1.Install_monitor/0_setup.py b/4.Monitor/1.Install_monitor/0_setup.py index cb6a8696..3eb8dee7 100755 --- a/4.Monitor/1.Install_monitor/0_setup.py +++ b/4.Monitor/1.Install_monitor/0_setup.py @@ -14,7 +14,7 @@ def setup(interactive=True): pwd = utils.get_conf('MONITOR_SHELL_PWD') if pwd: p = subprocess.Popen(['passwd', '-q', 'msmonitor'], stdin=subprocess.PIPE) - p.communicate(input=b'%(pwd)s\n%(pwd)s' % dict(pwd=pwd.encode('utf-8'))) + p.communicate(input=b'%(pwd)s\n%(pwd)s' % {b'pwd': pwd.encode('utf-8')}) if p.returncode != 0: raise Exception('Failed to set msmonitor account password.') utils.log('\033[1;33m The msmonitor account password has been set. \033[0m') -- GitLab