def __init__(self,user,password,Lang): AuthBase.__init__(self,user,password,Lang) self.service = 'passwd' self.PamAuth = PAM.pam() self.PamAuth.start(self.service) self.PamAuth.set_item(PAM.PAM_USER, self.user) self.PamAuth.set_item(PAM.PAM_CONV, self._pam_conv)
def __init__(self,creds,Lang,ip): user = creds.get_username() password = creds.get_password() AuthBase.__init__(self,user,password,Lang) self.ip = ip self.creds = creds