|
|
|
@ -156,8 +156,11 @@ class VariableClMigrateRootShadowPwd(ReadonlyVariable):
|
|
|
|
|
rootPasswd = ""
|
|
|
|
|
# if root password is "root"
|
|
|
|
|
enc = get_shadow_hash()
|
|
|
|
|
if rootPasswd and enc.identify(rootPasswd):
|
|
|
|
|
if enc.verify("root", rootPasswd):
|
|
|
|
|
if rootPasswd:
|
|
|
|
|
if enc.identify(rootPasswd):
|
|
|
|
|
if enc.verify("root", rootPasswd):
|
|
|
|
|
rootPasswd = ""
|
|
|
|
|
else:
|
|
|
|
|
rootPasswd = ""
|
|
|
|
|
return rootPasswd or ""
|
|
|
|
|
|
|
|
|
@ -185,8 +188,8 @@ class VariableClGrubPasswdSet(GrubHelper, Variable):
|
|
|
|
|
opt = ["--grub-passwd"]
|
|
|
|
|
|
|
|
|
|
def init(self):
|
|
|
|
|
self.help = _("Use password for grub")
|
|
|
|
|
self.label = _("use password for grub")
|
|
|
|
|
self.help = _("use root password for edit bootloader")
|
|
|
|
|
self.label = _("Use root password for edit bootloader")
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
|
if path.exists(self.grub_passwd_file):
|
|
|
|
|