mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
disable expiring password to troubleshoot
This commit is contained in:
parent
451f992d8f
commit
d7541fe356
1 changed files with 1 additions and 4 deletions
|
@ -145,16 +145,13 @@ def setup_template(template_id, name, user, password, cores, memory):
|
||||||
print("[{}] Running user creation commands.".format(name))
|
print("[{}] Running user creation commands.".format(name))
|
||||||
stdin, stdout, stderr = client.exec_command("useradd {}".format(user))
|
stdin, stdout, stderr = client.exec_command("useradd {}".format(user))
|
||||||
exit_status = stdout.channel.recv_exit_status()
|
exit_status = stdout.channel.recv_exit_status()
|
||||||
print(exit_status)
|
|
||||||
root_password = gen_password(32)
|
root_password = gen_password(32)
|
||||||
stdin, stdout, stderr = client.exec_command(
|
stdin, stdout, stderr = client.exec_command(
|
||||||
"echo '{}' | passwd root --stdin".format(root_password))
|
"echo '{}' | passwd root --stdin".format(root_password))
|
||||||
exit_status = stdout.channel.recv_exit_status()
|
exit_status = stdout.channel.recv_exit_status()
|
||||||
print(exit_status)
|
|
||||||
stdin, stdout, stderr = client.exec_command(
|
stdin, stdout, stderr = client.exec_command(
|
||||||
"echo '{}' | passwd '{}' -e --stdin".format(password, user))
|
"echo '{}' | passwd '{}' --stdin".format(password, user))
|
||||||
exit_status = stdout.channel.recv_exit_status()
|
exit_status = stdout.channel.recv_exit_status()
|
||||||
print(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…
Add table
Add a link
Reference in a new issue