Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Authenticate linux based user in java

I have a username and password for a particular user in Linux i need to verify that if the user is valid or not using java?

Abdul Khaliq

like image 832
Abdul Khaliq Avatar asked Jun 23 '09 09:06

Abdul Khaliq


2 Answers

The Java way to do this would be JAAS, but you'll still need a LoginModule that works with Linux. Here's a beta implementation that claims to work.

like image 148
Michael Borgwardt Avatar answered Sep 24 '22 13:09

Michael Borgwardt


You could use Java Runtime-object to run the command line commands that suit your needs. Runtime API

like image 28
simoraman Avatar answered Sep 25 '22 13:09

simoraman