Skip to content
Snippets Groups Projects
Commit 31400797 authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Fixed password set.

parent b652ab99
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ def setup(interactive=True): ...@@ -41,7 +41,7 @@ def setup(interactive=True):
pwd = utils.get_conf('SHELL_UBICAST_PWD') pwd = utils.get_conf('SHELL_UBICAST_PWD')
if pwd: if pwd:
p = subprocess.Popen(['passwd', '-q', 'ubicast'], stdin=subprocess.PIPE) 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: if p.returncode != 0:
raise Exception('Failed to set ubicast account password.') raise Exception('Failed to set ubicast account password.')
utils.log('\033[1;33m The ubicast account password has been set. \033[0m') utils.log('\033[1;33m The ubicast account password has been set. \033[0m')
...@@ -23,7 +23,7 @@ def setup(interactive=True): ...@@ -23,7 +23,7 @@ def setup(interactive=True):
pwd = utils.get_conf('SHELL_ADMIN_PWD') pwd = utils.get_conf('SHELL_ADMIN_PWD')
if pwd: if pwd:
p = subprocess.Popen(['passwd', '-q', 'admin'], stdin=subprocess.PIPE) 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: if p.returncode != 0:
raise Exception('Failed to set admin account password.') raise Exception('Failed to set admin account password.')
utils.log('\033[1;33m The admin account password has been set. \033[0m') utils.log('\033[1;33m The admin account password has been set. \033[0m')
...@@ -14,7 +14,7 @@ def setup(interactive=True): ...@@ -14,7 +14,7 @@ def setup(interactive=True):
pwd = utils.get_conf('MONITOR_SHELL_PWD') pwd = utils.get_conf('MONITOR_SHELL_PWD')
if pwd: if pwd:
p = subprocess.Popen(['passwd', '-q', 'msmonitor'], stdin=subprocess.PIPE) 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: if p.returncode != 0:
raise Exception('Failed to set msmonitor account password.') raise Exception('Failed to set msmonitor account password.')
utils.log('\033[1;33m The msmonitor account password has been set. \033[0m') utils.log('\033[1;33m The msmonitor account password has been set. \033[0m')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment