[jcifs] authentication not working

Ashok Kumar K AshokKumar_220060 at infosys.com
Mon Aug 27 14:19:40 GMT 2007


Hi Torben,

Thanks for all your support. Your suggestions and ideas
Helped in gaining more understanding of the issue.

Can you please clear the below doubt so that I will
Try my best to solve the issue.

In the log that gets generated when some one try to login
I noticed that for those who couldn't login its giving 
Java.net.SocketExcepton. with log as shown below



NameQueryRequest[nameTrnId=1,isResponse=false,opCode=QUERY,isAuthAnswer=false,is
Truncated=false,isRecurAvailable=false,isRecurDesired=true,isBroadcast=true,resu
ltCode=0,questionCount=1,answerCount=0,authorityCount=0,additionalCount=0,questi
onName=HYDHTCGDC01<1D>,questionType=0x0020,questionClass=IN,recordName=null,reco
rdType=0x0000,recordClass=0x0000,ttl=0,rDataLength=0]
00000: 00 01 01 10 00 01 00 00 00 00 00 00 20 45 49 46  |............ EIF|
00010: 4A 45 45 45 49 46 45 45 44 45 48 45 45 45 44 44  |JEEEIFEEDEHEEEDD|
00020: 41 44 42 43 41 43 41 43 41 43 41 42 4E 00 00 20  |ADBCACACACABN.. |
00030: 00 01                                            |..              |

NameQueryRequest[nameTrnId=2,isResponse=false,opCode=QUERY,isAuthAnswer=false,is
Truncated=false,isRecurAvailable=false,isRecurDesired=true,isBroadcast=true,resu
ltCode=0,questionCount=1,answerCount=0,authorityCount=0,additionalCount=0,questi
onName=HYDHTCGDC01<20>,questionType=0x0020,questionClass=IN,recordName=null,reco
rdType=0x0000,recordClass=0x0000,ttl=0,rDataLength=0]
00000: 00 02 01 10 00 01 00 00 00 00 00 00 20 45 49 46  |............ EIF|
00010: 4A 45 45 45 49 46 45 45 44 45 48 45 45 45 44 44  |JEEEIFEEDEHEEEDD|
00020: 41 44 42 43 41 43 41 43 41 43 41 43 41 00 00 20  |ADBCACACACACA.. |
00030: 00 01                                            |..              |

NameQueryRequest[nameTrnId=3,isResponse=false,opCode=QUERY,isAuthAnswer=false,is
Truncated=false,isRecurAvailable=false,isRecurDesired=true,isBroadcast=true,resu
ltCode=0,questionCount=1,answerCount=0,authorityCount=0,additionalCount=0,questi
onName=HYDHTCGDC01<20>,questionType=0x0020,questionClass=IN,recordName=null,reco
rdType=0x0000,recordClass=0x0000,ttl=0,rDataLength=0]
00000: 00 03 01 10 00 01 00 00 00 00 00 00 20 45 49 46  |............ EIF|
00010: 4A 45 45 45 49 46 45 45 44 45 48 45 45 45 44 44  |JEEEIFEEDEHEEEDD|
00020: 41 44 42 43 41 43 41 43 41 43 41 43 41 00 00 20  |ADBCACACACACA.. |
00030: 00 01                                            |..              |

NameQueryRequest[nameTrnId=4,isResponse=false,opCode=QUERY,isAuthAnswer=false,is
Truncated=false,isRecurAvailable=false,isRecurDesired=true,isBroadcast=true,resu
ltCode=0,questionCount=1,answerCount=0,authorityCount=0,additionalCount=0,questi
onName=HYDHTCGDC01<1D>,questionType=0x0020,questionClass=IN,recordName=null,reco
rdType=0x0000,recordClass=0x0000,ttl=0,rDataLength=0]
00000: 00 04 01 10 00 01 00 00 00 00 00 00 20 45 49 46  |............ EIF|
00010: 4A 45 45 45 49 46 45 45 44 45 48 45 45 45 44 44  |JEEEIFEEDEHEEEDD|
00020: 41 44 42 43 41 43 41 43 41 43 41 42 4E 00 00 20  |ADBCACACACABN.. |
00030: 00 01                                            |..              |

SmbComNegotiate[command=SMB_COM_NEGOTIATE,received=false,errorCode=0,flags=0x001
8,flags2=0xC003,signSeq=0,tid=0,pid=36103,uid=0,mid=1,wordCount=0,byteCount=12,w
ordCount=0,dialects=NT LM 0.12]
New data read: Transport1[HYDHTCGDC01/10.136.65.55:0]
00000: FF 53 4D 42 72 00 00 00 00 98 03 C0 00 00 00 00  | SMBr......└....|
00010: 00 00 00 00 00 00 00 00 00 00 07 8D 00 00 01 00  |................|

byteCount=54 but readBytesWireFormat returned 28
SmbComNegotiateResponse[command=SMB_COM_NEGOTIATE,received=false,errorCode=0,fla
gs=0x0098,flags2=0xC003,signSeq=0,tid=0,pid=36103,uid=0,mid=1,wordCount=17,byteC
ount=54,wordCount=17,dialectIndex=0,securityMode=0x7,security=user,encryptedPass
words=true,maxMpxCount=50,maxNumberVcs=1,maxBufferSize=16644,maxRawSize=65536,se
ssionKey=0x00000000,capabilities=0x0001F3FD,serverTime=Mon Aug 27 17:19:58 GMT+0
5:30 2007,serverTimeZone=65206,encryptionKeyLength=8,byteCount=54,encryptionKey=
0x555C64778D2D24A5,oemDomainName=ITLINFOSYS]
java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:168)
        at jcifs.util.transport.Transport.readn(Transport.java:29)
        at jcifs.smb.SmbTransport.peekKey(SmbTransport.java:355)
        at jcifs.util.transport.Transport.loop(Transport.java:100)
        at jcifs.util.transport.Transport.run(Transport.java:265)
        at java.lang.Thread.run(Thread.java:595)


can you tell me when does this exception arises. 


Thanks and regards
Ashok


-----Original Message-----
From: Torben Wölm [mailto:torben.wolm at LEGO.com] 
Sent: Monday, August 27, 2007 7:32 PM
To: Ashok Kumar K
Cc: jcifs at lists.samba.org
Subject: RE: [jcifs] authentication not working

Hi Ashok

> Application did not worked when I tried manually also. Even 
> after submitting username and password, its showing 'page can 
> not be displayed' message.
> 
> I could reach tomcat admin console only

Sorry, then I don't have any idea why it doesn't work. It seems it must be something along the lines of what Eric Glass is suggesting, since now there's at least some communication going between the client and server.

I have no more ideas than to run Ethereal at the server and compare the network communication...

Kind regards
Torben

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***


More information about the jcifs mailing list