Exemplo n.º 1
0
 def test_03(self):
     """prompt-local-pw: via ssh"""
     
     if not pamPrompts.pwlCheck:
         self.fail("Couldn't find {}".format(self.pwLclUser))
     else:
         assert self.computer.vastool.configure.vas("pam_vas","prompt-local-pw","'\"{}\"'".format(self.pwLclPrompt.format("%s")))
         self.addCleanup(self.computer.vastool.configure.vas, "pam_vas", "prompt-local-pw")
         self.addCleanup(vasConf.confChange,self.computer)
         assert vasConf.confChange(self.computer), "conf notification failure"
         if self.version > "4.1.0":
             time.sleep(10)
         self.testShell = pexpect.spawn("ssh {}@{}".format(self.pwLclUser,self.computer.hostname))
         if self.testShell.expect([self.pwLclPrompt.format(self.pwLclUser), pexpect.TIMEOUT, pexpect.EOF], timeout=5) == 0:
             self.testShell.close()
         else:
             self.testShell.close()
             self.logger.warn("Expected: %s\nFound: %s", self.pwLclPrompt.format(self.pwLclUser), self.testShell.before)
             self.assertTrue(False, "Did not find {}".format(self.pwLclPrompt.format(self.pwLclUser)))
Exemplo n.º 2
0
 def tearDownClass(cls):
     cls.computer.vastool.configure.vas("pam_vas","prompt-local-pw")
     cls.computer.vastool.configure.vas("pam_vas","prompt-vas-ad-pw")
     cls.computer.vastool.configure.vas("pam_vas","prompt-ad-lockout-msg")
     cls.computer.vastool.configure.vas("pam_vas","show-lockout-message")
     vasConf.confChange(cls.computer)