|
|
|
@ -142,13 +142,13 @@ class VariableClMigrateRootPwdPlain(GrubHelper, UserHelper, Variable):
|
|
|
|
|
|
|
|
|
|
def check(self, value):
|
|
|
|
|
if not value and not self.Get('cl_migrate_root_shadow_pwd'):
|
|
|
|
|
raise PasswordError(_("Password for user %s missing") % "root")
|
|
|
|
|
raise PasswordError(_("Enter password for user %s") % "root")
|
|
|
|
|
# если plain пароля нет (есть только хэш), но требуется установить
|
|
|
|
|
# пароль на grub (cl_grub_passwd_set), при этом нет 07_passwd
|
|
|
|
|
if (value == self.stub_hash_value and
|
|
|
|
|
not self.read_hash_from_passwd() and
|
|
|
|
|
self.GetBool('cl_grub_passwd_set')):
|
|
|
|
|
raise PasswordError(_("Please specify a root password for Grub"))
|
|
|
|
|
raise PasswordError(_("Please enter a root password for Grub"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableClMigrateRootPwd(ReadonlyVariable):
|
|
|
|
@ -507,7 +507,7 @@ class VariableClMigrateUserPwd(UserHelper, Variable):
|
|
|
|
|
for user, pwd in zip(self.Get('cl_migrate_user'), value):
|
|
|
|
|
if not pwd:
|
|
|
|
|
raise PasswordError(
|
|
|
|
|
_("Password for user %s missing") % user)
|
|
|
|
|
_("Enter password for user %s") % user)
|
|
|
|
|
|
|
|
|
|
def set(self, value):
|
|
|
|
|
"""
|
|
|
|
|