mirror of
https://github.com/retspen/webvirtcloud
synced 2026-03-23 11:04:49 +00:00
An empty root password disable the root password
This commit is contained in:
parent
c25a35e1b1
commit
9db1b060a6
2 changed files with 6 additions and 1 deletions
|
|
@ -288,7 +288,11 @@ def instance(request, compute_id, vname):
|
|||
|
||||
if 'rootpasswd' in request.POST:
|
||||
passwd = request.POST.get('passwd', '')
|
||||
passwd_hash = crypt.crypt(passwd, '$6$kgPoiREy')
|
||||
if passwd:
|
||||
passwd_hash = crypt.crypt(passwd, '$6$kgPoiREy')
|
||||
# if password is empty, disable the root password
|
||||
else:
|
||||
passwd_hash = "*"
|
||||
data = {'action': 'password', 'passwd': passwd_hash, 'vname': vname}
|
||||
|
||||
if conn.get_status() == 5:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue