[jcifs] Jcifs 1.3.8_tb and Windows 2008R2

Michael B Allen ioplex at gmail.com
Fri Oct 7 09:29:00 MDT 2011


On Fri, Oct 7, 2011 at 2:45 AM, Mazhar Lateef
<mazhar.lateef at virtualcode.co.uk> wrote:
> Hi Mike/Thomas
>
> Thank you for your responses
>
> The metadata that we need is the "last accessed time" of files, this happened to be available in the version specified but not in any of the later versions.

Uhh, I'm pretty sure JCIFS never supported retrieving the last access
time. Through what part of the API do you retrieve the last access
time? There has never been an SmbFile.getLastAccessTime() method.

Maybe you are using a patched version of JCIFS? In that case I think
you should just get 1.3.8, compare it with your 1.3.8 source using
diff, and then modify the latest version of JCIFS accordingly. The
changes should be very simple actually. You would just have to
uncomment the e.lastAccessTime = readTime(...) in
Trans2FindFirst2Response.java and then add a method to SmbFile
presumably called getLastAccessTime() and then add the code in between
to marshall that value up into SmbFile.

> So if I understand there is no reason why version 1.3.8_tb should not work with any of the windows platforms?

No.

> Are there any change or difference in authentication mechanism that must be considered between the 2 libraries I refer to?

Not that I'm aware of.

Mike

> On 7 Oct 2011, at 05:57, Michael B Allen <ioplex at gmail.com> wrote:
>
>> On Thu, Oct 6, 2011 at 2:20 PM, Mazhar Lateef
>> <mazhar.lateef at virtualcode.co.uk> wrote:
>>> Hi
>>> I am using Jcifs 1.3.8_tb in my application and can not use the latest jcifs
>>> library for some missing functions in the newer versions of the Jcifs
>>> library.
>>> We have been testing our app which requires reading data from a Cifs share,
>>> when testing with Windows 2008 R2, unfortunately it does not seem to work.
>>> We get the following exception which seems to be at the authentication
>>> phase.
>>> smbtransport: new connection 0.0.0.0<00>/10.1.165.15 445 administrator
>>> Oct 06, 2011 4:59:02 PM jcifsdemo.JCIFSDemo printFileMetaDataUsingNTLM
>>> SEVERE: null
>>> jcifs.smb.SmbAuthException: Logon failure: unknown user name or bad
>>> password.
>>> at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:547)
>>> at jcifs.smb.SmbTransport.send(SmbTransport.java:669)
>>> at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:380)
>>> at jcifs.smb.SmbSession.send(SmbSession.java:241)
>>> at jcifs.smb.SmbTree.treeConnect(SmbTree.java:161)
>>> at jcifs.smb.SmbFile.doConnect(SmbFile.java:863)
>>> at jcifs.smb.SmbFile.connect(SmbFile.java:906)
>>> at jcifs.smb.SmbFile.connect0(SmbFile.java:832)
>>> at jcifs.smb.SmbFile.queryPath(SmbFile.java:1285)
>>> at jcifs.smb.SmbFile.exists(SmbFile.java:1371)
>>> at jcifs.smb.SmbFile.isDirectory(SmbFile.java:1446)
>>> at jcifs.smb.SmbFile.getSecurity(SmbFile.java:2877)
>>> at jcifs.smb.SmbFile.getSecurity(SmbFile.java:2960)
>>> at jcifsdemo.JCIFSDemo.printFileMetaDataUsingNTLM(JCIFSDemo.java:89)
>>> at jcifsdemo.JCIFSDemo.main(JCIFSDemo.java:51)
>>>
>>> As this seems to be an authentication issue. is there a way to use Jcifs
>>> version 1.3.8 with Windows 2008 R2?
>>> With the latest version of Jcifs (version 1.3.16) application works fine and
>>> I am able to read the remote directory and list files, but I am not able to
>>> get some file metadata which I can with 1.3.8 which is why I have to use the
>>> older version of jcifs.
>>
>> Hi Maz,
>>
>> I don't know why it would not work with 2008 R2. NTLMv2 was fully
>> functional in 1.3.x.
>>
>> And I don't know of any change that removed functionality like you
>> speak of. What "metadata" are you looking for?
>>
>> You could chase either one of these issues but clearly you don't want
>> to commit yourself to a specific version of JCIFS so describe exactly
>> what "metadata" you're trying to get.
>>
>> Mike
>>
>> --
>> Michael B Allen
>> Java Active Directory Integration
>> http://www.ioplex.com/
>



-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/


More information about the jCIFS mailing list