1

I am trying to access a network path to list directory file names, and I should give domain name, username and password to authenticate.

I have tried jcifs library but it's too old and NtlmPasswordAuthentication is deprecated. and it still works with smb version 1. and I have to connect to Windows server.

arash yousefi
  • 376
  • 5
  • 16
  • 1
    Q: What is the "network path"? Windows 10? Windows Server? A non-Windows host (e.g. a NAS running SMB)? Q: What is your Java client running on? Windows 10? – paulsm4 Jan 26 '21 at 06:04
  • @paulsm4 it is Windows Server and I've just posted the answer, thank you. appreciate your help. – arash yousefi Jan 26 '21 at 06:07
  • 1
    The jcifs home page (https://www.jcifs.org/) clearly says that it is in "maintenance mode", and it only supports SMB1 and NTLMv2. It also provides links to newer Java libraries that *do* support SMB2/3 variants, including [jcifs-ng](https://github.com/AgNO3/jcifs-ng) and [smbj](https://github.com/hierynomus/smbj) – paulsm4 Jan 26 '21 at 06:14

1 Answers1

1

I found another library that would support the smb version 2.0 and 3.0. and another solution is to run an ftp server and use ftp protocol instead of smb.

the link below would explain everything about the new library :

Accessing SMB2.1 or SMB3 share from Java?

arash yousefi
  • 376
  • 5
  • 16