Commit 15d2d5a3 by Oliver Pinter

change the root password with cloud user's password

parent 9c7b4062
...@@ -85,9 +85,12 @@ class Context(BaseContext): ...@@ -85,9 +85,12 @@ class Context(BaseContext):
@staticmethod @staticmethod
def change_password(password): def change_password(password):
proc = subprocess.Popen(['/usr/sbin/pw', 'user', 'mod', 'cloud', '-h', '0'], proc0 = subprocess.Popen(['/usr/sbin/pw', 'user', 'mod', 'cloud', '-h', '0'],
stdin=subprocess.PIPE) stdin=subprocess.PIPE)
proc.communicate('%s\n' % password) proc0.communicate('%s\n' % password)
proc1 = subprocess.Popen(['/usr/sbin/pw', 'user', 'mod', 'root', '-h', '0'],
stdin=subprocess.PIPE)
proc1.communicate('%s\n' % password)
@staticmethod @staticmethod
def restart_networking(): def restart_networking():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment