System Password Matching on Unix/Linux
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   jawad_bokhar
Posted On:   Friday, October 19, 2001 04:05 AM

I have to match a password entered by a user to my program with the password stored in the shadow file on the system.
I need to know if there's any implementation of password matching in Java which would let me do the required.
Or
If i have to run the native code, any implementation of "LINUX System password matching" in any language like c/c++ or perl.

Java Implementation of System password matching is the most appropriate for me.
Please help me urgently. My boss is just ready to kill me, if I couldn't do it.
thanks

Re: System Password Matching on Unix/Linux

Posted By:   Alex_Chaffee  
Posted On:   Sunday, December 23, 2001 01:47 PM

See http://cscene.org/CS4/CS4-04.html for a JNI tutorial with source code which verifies a user's password.

Re: System Password Matching on Unix/Linux

Posted By:   Nathan_Meyers  
Posted On:   Friday, October 19, 2001 08:54 AM

You have a couple of choices here:



  • You can use JNI to access native support for authentication - for example, to call getpwent().


  • You can use the Java Authentication and Authorization Service (JAAS). JAAS is available as an add-on for JDK1.3 and is built in to JDK1.4: see this link at Sun to learn more.


    JAAS uses a variety of authentication techniques available on different systems. I don't know if Linux shadow passwords are supported in the Linux JDK - but if they are, JAAS is where you will find that support.


About | Sitemap | Contact