Fix root account setup
Set password only when provided. In Qubes root account is locked, so no password is provided by user...
This commit is contained in:
parent
12237ad630
commit
35e7e4de35
@ -252,10 +252,11 @@ class Users:
|
|||||||
def setUserPassword(self, username, password, isCrypted, lock, algo=None):
|
def setUserPassword(self, username, password, isCrypted, lock, algo=None):
|
||||||
user = self.admin.lookupUserByName(username)
|
user = self.admin.lookupUserByName(username)
|
||||||
|
|
||||||
if isCrypted:
|
if password:
|
||||||
self.admin.setpassUser(user, password, True)
|
if isCrypted:
|
||||||
else:
|
self.admin.setpassUser(user, password, True)
|
||||||
self.admin.setpassUser(user, cryptPassword(password, algo=algo), True)
|
else:
|
||||||
|
self.admin.setpassUser(user, cryptPassword(password, algo=algo), True)
|
||||||
|
|
||||||
if lock:
|
if lock:
|
||||||
self.admin.lockUser(user)
|
self.admin.lockUser(user)
|
||||||
|
Loading…
Reference in New Issue
Block a user