Okay, here is the problem.
I have downloaded JPAM 1.1 for Linux and installedas it was told in the INSTALL File and the Online Documentation.
But i had this problem that the $java_home/bin/x where x=client OR server didn't exist. So i created both folders and pasted the libjpam.so file there.
After that i ran my code(provided below), and it gave exceptions. I read the manual again, and it says, if the JPAM can't find files, it will seach in local fodler as well, so i made a copy in local folder as well. and ran the same code again but the same ClassNotFound Exception appeared.
I posted on JPAM Forums, but no one replied, so i am posting it here so that if anyone knows JPAM, i would request his help.
Here is the list of pan modules that i have installed:
Code:
pam_krb5-2.2.11-1
pam_smb-1.1.7-7.2.1
pam_pkcs11-0.5.3-23
pam-0.99.6.2-3.14.el5
pam_ccreds-3-5
pam_passwdqc-1.0.2-1.2.2
pam-devel-0.99.6.2-3.14.el5
Here is the code:
Code:
/*
* Main.java
*
* Created on October 2, 2007, 12:09 PM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package autenticate;
import net.sf.jpam.*;
/**
*
* @author shoaibi
*/
public class Main {
/** Creates a new instance of Main */
public Main() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
String user1Name = "test";
String user1Credentials = "password";
Pam mypam = new Pam(); //When i click the link in error, i get here.
boolean authenticated = mypam.authenticateSuccessful(user1Name, user1Credentials);
if(authenticated ==true)
{
System.out.println("Congrats\nYou have logged In");
}
else
System.out.println("Sorry\nAuthentication Failed");
}
}
Here is the Error:
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at net.sf.jpam.Pam.<clinit>(Pam.java:38)
at autenticate.Main.main(Main.java:28) //this points to the Pam object creation line
Java Result: 1
What could possibly go wrong?
I have JDK6u2 installed. and i set all classpaths and etc....