mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-02-13 05:21:50 +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(
|
stdin, stdout, stderr = client.exec_command(
|
||||||
"echo '{}' | passwd '{}' --stdin".format(password, user))
|
"echo '{}' | passwd '{}' --stdin".format(password, user))
|
||||||
exit_status = stdout.channel.recv_exit_status()
|
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(
|
stdin, stdout, stderr = client.exec_command(
|
||||||
"echo '{} ALL=(ALL:ALL) ALL' | sudo EDITOR='tee -a' visudo".format(
|
"echo '{} ALL=(ALL:ALL) ALL' | sudo EDITOR='tee -a' visudo".format(
|
||||||
user))
|
user))
|
||||||
|
|
Loading…
Reference in a new issue