Telnet GUI client giving problems for one userid.

Hi,

I have written a GUI program to get userid and password to connect to a Telnet session. The purpose of the program is just to check if the user is a valid user and start another application if the user is a valid user. This application works well and is installed for manay users at my work place. But, this program doesn't work well only for one user. That user tried to use this program by changing is password. He tried to login using this GUI in other terminals. Only this user is having problems logging in in any terminal. But, he is able to open a telnet session without any problems if he doesn't use the GUI. I tried to print the characters that are returned by the server. But, it prints all the characters without any problem. The application hangs at the point, when it has to read the $ prompt after logging in. I also, checked if this user has been set with any other properties for his userid than other users. But, he is having the same privelages like all other users.

Any help in fixing this problem is appreciated.

Thanks in advance.

[1085 byte] By [nalinispa] at [2007-9-28 3:55:04]
# 1
Are you sure that it's not user error?(CAPSLOCK...)
eschwartz2003a at 2007-7-7 23:27:11 > top of Java-index,Archived Forums,Portability & Platform Independence [Archive]...
# 2
Yes, I checked it myself.
nalinispa at 2007-7-7 23:27:11 > top of Java-index,Archived Forums,Portability & Platform Independence [Archive]...
# 3

You need to be more specific about what your program does, for us to suggest some troubleshooting techniques.

One possibility:

Your program takes the user's id and password, and if it can authenticate the user, it launches the telnet program (at which point, your user needs to authenticate himself again at telnet's login prompt. In other words, your program provides access to telnet.

If that is the case, then your user may have changed his password on the remote host, but neglected to change his password on the GUI. I doubt this is the case, but the point I wanted to make is perhaps your GUI is having problems authenticating the user.

Check to make sure the string the user typed matches the string you have on file. (See below for more on this.)

The other possibility is:

Your GUI takes the user's id and password, launches a telnet session, and tries to log in the user via proxy. If it works, the telnet session

is returned back to the user. If it fails, an appropriate error message is returned. Your program is essentially a front end to telnet.

If that is the case, then you're likely to have a problem transmitting the password string. Perhaps the user's new password has a character Java and telnet interpret differently.

First thing to check is literally have your GUI output the string to the telnet session. Don't ask the user to type it in, just ask him what it is. If the password is "fido" (hypothetically), then have your GUI do the equivalent of out.write( "fido" );

If it bombs, you know you can't transmit that particular string, and the short term solution is to change the password again. If it works, have the user type in the password, but instead of sending it to telnet, just system.out.println( inputtedPassword ); instead. See if Java does any unintentional formatting when reading it in.

In other words, treat input and output as two seperate cases, and test accordingly.

When you think about it, that particular password is the key. In fact, if you told us what the password is (don't tell us who you are or where you're connecting from), some Java Guru might see it and say "Oh, you can't do a double backslash like that!"

Anyways, I'm sure you've solved the problem, I just posted this explaination for the benefit of others who are curious about how to troubleshoot something like this.

TheDavida at 2007-7-7 23:27:11 > top of Java-index,Archived Forums,Portability & Platform Independence [Archive]...
# 4

Hi,

Thanks for the reply. I have not fixed the problem yet.

The problem that we are having is the second issue you have mentioned.

My GUI is just a front-end to the Telnet session. It just receives the information from the Telnet server and just tranmits the appropritate message. I myself don't know what the password is. But, I checked with the user about the characters that are used in the password. They are just alphabets. I am not able to find the reason for the occurance of this problem because, it works for the same user just the first time he runs this GUI application either it is in his machine or in any other machine. He changed his password couple of times to check if this GUI works for him. But, it doesn't. I really wonder what could be the reason for this problem.

Thanks in advance.

nalinispa at 2007-7-7 23:27:11 > top of Java-index,Archived Forums,Portability & Platform Independence [Archive]...