Example #1
0
 def test_getuser(self):
     user = SAMUser("root")
     user.logoff_time = 2147483647
     user.kickoff_time = 2147483647
     user.pass_can_change_time = 1125418267
     user.username = "******"
     user.uid = None
     user.lm_password = '******'
     user.nt_password = '******'
     user.acct_ctrl = 16
     user.pass_last_set_time = 1125418267
     user.fullname = "root"
     user.nt_username = ""
     user.logoff_time = 2147483647
     user.acct_desc = ""
     user.group_rid = 1001
     user.logon_count = 0
     user.bad_password_count = 0
     user.domain = "BEDWYR"
     user.munged_dial = ""
     user.workstations = ""
     user.user_rid = 1000
     user.kickoff_time = 2147483647
     user.logoff_time = 2147483647
     user.unknown_6 = 1260L
     user.logon_divs = 0
     user.hours = [True for i in range(168)]
     other = self.samdb["root"]
     for name in other.__dict__:
         if other.__dict__[name] != user.__dict__[name]:
             print "%s: %r != %r" % (name, other.__dict__[name], user.__dict__[name])
     self.assertEquals(user, other)
Example #2
0
 def test_getuser(self):
     user = SAMUser("root")
     user.logoff_time = 2147483647
     user.kickoff_time = 2147483647
     user.pass_can_change_time = 1125418267
     user.username = "******"
     user.uid = None
     user.lm_password = '******'
     user.nt_password = '******'
     user.acct_ctrl = 16
     user.pass_last_set_time = 1125418267
     user.fullname = "root"
     user.nt_username = ""
     user.logoff_time = 2147483647
     user.acct_desc = ""
     user.group_rid = 1001
     user.logon_count = 0
     user.bad_password_count = 0
     user.domain = "BEDWYR"
     user.munged_dial = ""
     user.workstations = ""
     user.user_rid = 1000
     user.kickoff_time = 2147483647
     user.logoff_time = 2147483647
     user.unknown_6 = 1260L
     user.logon_divs = 0
     user.hours = [True for i in range(168)]
     other = self.samdb["root"]
     for name in other.__dict__:
         if other.__dict__[name] != user.__dict__[name]:
             print "%s: %r != %r" % (name, other.__dict__[name], user.__dict__[name])
     self.assertEquals(user, other)
Example #3
0
 def test_get_user(self):
     user = SAMUser("rootpw")
     user.lm_password = "******"
     user.nt_password = "******"
     user.acct_ctrl = ACB_NORMAL
     user.pass_last_set_time = int(1125418267)
     user.uid = 0
     self.assertEquals(user, self.samdb["rootpw"])
Example #4
0
 def test_get_user(self):
     user = SAMUser("rootpw")
     user.lm_password = "******"
     user.nt_password = "******"
     user.acct_ctrl = ACB_NORMAL
     user.pass_last_set_time = int(1125418267)
     user.uid = 0
     self.assertEquals(user, self.samdb["rootpw"])