diff --git a/instances/templates/instance.html b/instances/templates/instance.html
index 38b4c33..5c3b73d 100644
--- a/instances/templates/instance.html
+++ b/instances/templates/instance.html
@@ -257,6 +257,7 @@
{% endifequal %}
+
{% trans "An empty password disable the root password." %}
diff --git a/instances/views.py b/instances/views.py
index d0b4773..fbd8b34 100644
--- a/instances/views.py
+++ b/instances/views.py
@@ -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: