-
Java - userid & password checking
Help:
I am writing a Java program to run on Solaris (and probably AIX too) that
opens a
socket for requests. The request will come from a Win98/NT PC. The request
data
will include some function to be performed plus a valid Solaris userid and
password
(i.e. The normal userid & password that the user would use to log onto Solaris
box via telnet.).
I would like to make 1 or 2 class/method calls to verify that not only is
the userid valid
on box where the tool is running but also it is really the correct user (assuming
of
course the user didn't give out their password <grin>). I don't want to
maintain a
userid/password list, I want to go against the OS via Java.
Does anybody know how you do anything like this?? I'm not an expert Java
programmer
(or OO programmer) so sample code would be greatly appreciated.
Thanks for your help.
later
Roger...
-
Re: Java - userid & password checking
I didn't exactly get your question but to my best understanding you want to
evalueate the userid and password. The possible soultion in my mind is you
open an socket to the destination m/c and emulate the telnet protocol. You
can a lot of telnet emulate protocol packages.
"RogerLacroix" <capitalware@yahoo.com> wrote:
>
>Help:
>
>I am writing a Java program to run on Solaris (and probably AIX too) that
>opens a
>socket for requests. The request will come from a Win98/NT PC. The request
>data
>will include some function to be performed plus a valid Solaris userid and
>password
>(i.e. The normal userid & password that the user would use to log onto Solaris
>box via telnet.).
>
>I would like to make 1 or 2 class/method calls to verify that not only is
>the userid valid
>on box where the tool is running but also it is really the correct user
(assuming
>of
>course the user didn't give out their password <grin>). I don't want to
>maintain a
>userid/password list, I want to go against the OS via Java.
>
>Does anybody know how you do anything like this?? I'm not an expert Java
>programmer
>(or OO programmer) so sample code would be greatly appreciated.
>
>Thanks for your help.
>
>later
>Roger...
>
-
Re: Java - userid & password checking
Ok, lets try it this way.
What if I wanted to write my own telnet server in Java. When a user logs
on with a
userid and password (assume plain text), I need to verify the information.
i.e. Is this a valid userid plus is the password correct.
How would I do this in Java?? I want to use native Java class/method calls
so
that it will be platform independent.
later
Roger...
"Ruchi Dhar" <ruchi.dhar@traedum.com> wrote:
>
>I didn't exactly get your question but to my best understanding you want
to
>evalueate the userid and password. The possible soultion in my mind is
you
>open an socket to the destination m/c and emulate the telnet protocol.
You
>can a lot of telnet emulate protocol packages.
>
>"RogerLacroix" <capitalware@yahoo.com> wrote:
>>
>>Help:
>>
>>I am writing a Java program to run on Solaris (and probably AIX too) that
>>opens a
>>socket for requests. The request will come from a Win98/NT PC. The request
>>data
>>will include some function to be performed plus a valid Solaris userid
and
>>password
>>(i.e. The normal userid & password that the user would use to log onto
Solaris
>>box via telnet.).
>>
>>I would like to make 1 or 2 class/method calls to verify that not only
is
>>the userid valid
>>on box where the tool is running but also it is really the correct user
>(assuming
>>of
>>course the user didn't give out their password <grin>). I don't want to
>>maintain a
>>userid/password list, I want to go against the OS via Java.
>>
>>Does anybody know how you do anything like this?? I'm not an expert Java
>>programmer
>>(or OO programmer) so sample code would be greatly appreciated.
>>
>>Thanks for your help.
>>
>>later
>>Roger...
>>
>
-
Re: Java - userid & password checking
So, when an alleged userid and password arrives in your program, you need
some way to determine whether they are correct. This means that you need to
be able to look somewhere outside your program and compare what came in
against some permanent list of userids and passwords, correct? So what
would be a good place to store data permanently outside your program? I'd
suggest using a file or a database. Or am I missing the point of your
question too?
RogerLacroix <roger.lacroix@usa.net> wrote in message
news:395448a3$1@news.devx.com...
>
> Ok, lets try it this way.
>
> What if I wanted to write my own telnet server in Java. When a user logs
on with a
> userid and password (assume plain text), I need to verify the information.
>
> i.e. Is this a valid userid plus is the password correct.
>
> How would I do this in Java?? I want to use native Java class/method
calls
> so that it will be platform independent.
>
> later
> Roger...
>
-
Re: Java - userid & password checking
Yes, you have half of it but I don't want to maintain a list
of userids and passwords. The userids and passwords are
already defined on the Unix box where the Java program
is running.
I want a Java class or the Unix system to validate the
userid and password. I just cannot imagine that there
is not a Java class to do this work.
If I search the web, I can find half-dozen telnet and ftp
servers written in Java (at least they claim to be). I don't
believe they each implement their own internal system.
From my days of doing security calls on MVS (OS/390) in
Assembler, it was a simple matter of calling a system
macro to do the work:
CALL RACROUTE(userid,password)
It would return zero if the userid and password were valid
for the box that the program was running on.
The macro would return an 8 for failure.
It would seem logical to me that the JDK would have
a security method that returns a boolean of either
TRUE or FALSE. i.e.
boolean rc = security.validatePassword(userid,password);
if (rc == true)
// jump for joy
else
// go a way!!
Any help would be appreciated.
later
Roger...
"Paul Clapham" <pclapham@core-mark.com> wrote:
>So, when an alleged userid and password arrives in your program, you need
>some way to determine whether they are correct. This means that you need
to
>be able to look somewhere outside your program and compare what came in
>against some permanent list of userids and passwords, correct? So what
>would be a good place to store data permanently outside your program? I'd
>suggest using a file or a database. Or am I missing the point of your
>question too?
>
>RogerLacroix <roger.lacroix@usa.net> wrote in message
>news:395448a3$1@news.devx.com...
>>
>> Ok, lets try it this way.
>>
>> What if I wanted to write my own telnet server in Java. When a user logs
>on with a
>> userid and password (assume plain text), I need to verify the information.
>>
>> i.e. Is this a valid userid plus is the password correct.
>>
>> How would I do this in Java?? I want to use native Java class/method
>calls
>> so that it will be platform independent.
>>
>> later
>> Roger...
>>
>
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|