Commit f1135093 by Oliver Pinter

implement change_password function

parent 08751629
...@@ -74,9 +74,9 @@ class Context(BaseContext): ...@@ -74,9 +74,9 @@ class Context(BaseContext):
@staticmethod @staticmethod
def change_password(password): def change_password(password):
proc = subprocess.Popen(['/usr/sbin/chpasswd'], proc = subprocess.Popen(['/usr/sbin/pw', 'user', 'mod', 'cloud', '-h', '0'],
stdin=subprocess.PIPE) stdin=subprocess.PIPE)
proc.communicate('cloud:%s\n' % password) proc.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