def test_03_Passwd(self): ACCOUNT = Account(user="******", group="capensis") passwd = 'root' ACCOUNT.passwd(passwd) shadow = ACCOUNT.make_shadow(passwd) if not ACCOUNT.check_shadowpasswd(shadow): raise Exception('Invalid shadow passwd ... (%s)' % shadow) if not ACCOUNT.check_passwd(passwd): raise Exception('Invalid passwd ... (%s)' % passwd) cryptedKey = ACCOUNT.make_tmp_cryptedKey() if not ACCOUNT.check_tmp_cryptedKey(cryptedKey): raise Exception('Invalid cryptedKey ... (%s)' % authkey)
def test_03_Passwd(self): ACCOUNT = Account(user="******", group="capensis") passwd = 'root' ACCOUNT.passwd(passwd) shadow = ACCOUNT.make_shadow(passwd) if not ACCOUNT.check_shadowpasswd(shadow): raise Exception('Invalid shadow passwd ... (%s)' % shadow ) if not ACCOUNT.check_passwd(passwd): raise Exception('Invalid passwd ... (%s)' % passwd) cryptedKey = ACCOUNT.make_tmp_cryptedKey() if not ACCOUNT.check_tmp_cryptedKey(cryptedKey): raise Exception('Invalid cryptedKey ... (%s)' % authkey)