Esempio n. 1
0
    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)
Esempio n. 2
0
    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)