mirror of
https://git.56k.es/fanta/q.git
synced 2024-05-29 10:43:32 +02:00
password root oculta
This commit is contained in:
parent
cf3c896fbb
commit
e7afb901da
5
q.py
5
q.py
|
@ -5,6 +5,7 @@
|
|||
import os
|
||||
import requests
|
||||
import shutil
|
||||
from getpass import getpass
|
||||
|
||||
dirVms=os.path.expanduser('~')+"/vms"
|
||||
dirVmsTemp=dirVms+"/templates"
|
||||
|
@ -57,7 +58,9 @@ def createVms():
|
|||
vmSize=input("\nSize: ")
|
||||
os.system("qemu-img resize "+dirVmsImgs+"/"+vmName+".qcow2 "+vmSize+"G")
|
||||
print("\nPassword de root")
|
||||
vmPasswd=input("\nPassword: ")
|
||||
#vmPasswd=input("\nPassword: ")
|
||||
vmPasswd=getpass("\nPassword: ")
|
||||
|
||||
os.system("virt-customize -a "+dirVmsImgs+"/"+vmName+".qcow2 --root-password password:"+vmPasswd)
|
||||
os.system("virt-customize -a "+dirVmsImgs+"/"+vmName+".qcow2 --hostname "+vmName)
|
||||
os.system("virt-customize -a "+dirVmsImgs+"/"+vmName+".qcow2 --install dropbear")
|
||||
|
|
Loading…
Reference in New Issue
Block a user