samdb = self.get_samdb()
- mach_name = samdb.host_dns_name()
+ mach_name = self.host
service = "cifs"
# Create the user account.
use_cache=False)
user_name = user_credentials.get_username()
- mach_credentials = self.get_dc_creds()
+ mach_credentials = self.get_server_creds()
# Talk to the KDC to obtain the service ticket, which gets placed into
# the cache. The machine account name has to match the name in the
self.assertEqual(user_name, account_name.string)
def test_rpc_anonymous(self):
- samdb = self.get_samdb()
- mach_name = samdb.host_dns_name()
+ mach_name = self.host
anon_creds = credentials.Credentials()
anon_creds.set_anonymous()
(account_name, _) = conn.GetUserName(None, None, None)
- self.assertEqual('ANONYMOUS LOGON', account_name.string)
+ self.assertEqual('ANONYMOUS LOGON', account_name.string.upper())
if __name__ == "__main__":