mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-02-12 21:11:53 +00:00
properly expire password upon user creation for template
This commit is contained in:
parent
d7541fe356
commit
e0c564269f
1 changed files with 3 additions and 0 deletions
|
@ -152,6 +152,9 @@ def setup_template(template_id, name, user, password, cores, memory):
|
|||
stdin, stdout, stderr = client.exec_command(
|
||||
"echo '{}' | passwd '{}' --stdin".format(password, user))
|
||||
exit_status = stdout.channel.recv_exit_status()
|
||||
stdin, stdout, stderr = client.exec_command(
|
||||
"passwd -e '{}'".format(user))
|
||||
exit_status = stdout.channel.recv_exit_status()
|
||||
stdin, stdout, stderr = client.exec_command(
|
||||
"echo '{} ALL=(ALL:ALL) ALL' | sudo EDITOR='tee -a' visudo".format(
|
||||
user))
|
||||
|
|
Loading…
Reference in a new issue