[jcifs] unknown user name or bad password

Steve Pruitt bpruitt at opentext.com
Tue Dec 12 19:32:05 UTC 2017

I gotten past this issue, I think.  I now get:  jcifs.smb.SmbAuthException: Logon failure: unknown user name or bad password.

I am trying to hit a Windows folder from another Windows machine.  The credentials are correct and the target folder is set to Sharing and my userid is on the list.

Not sure how to debug this.



From: jCIFS [mailto:jcifs-bounces at lists.samba.org] On Behalf Of Steve Pruitt via jCIFS
Sent: Monday, December 11, 2017 10:27 AM
To: jcifs at lists.samba.org
Subject: [EXTERNAL] - [jcifs] network name not found

I am getting started with jcifs.  I am hitting what seems to be a newbie issue.  jcifs.smb.SmbException: The network name cannot be found.
I am starting off with a hello world based on the Example - List.java

There seems to be many ways to initialize the SmbFile.  I am having trouble determining if its my SmbFile or environment issue on the host I am trying to hit.
My context:

List files on a shared folder.  The folder has been set to Shared for my user id.  The Network path is \\SPWV01\Servers<file://SPWV01/Servers> .  The target machine is a VM running Windows Server 2012.

I tried this, but I get the error above.

NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("mydomain", "mysuser", "mypw");
String sPath = "smb://target IP/SPWV01/Servers/";
SmbFile file = new SmbFile(sPath, auth);

I have tried the fully qualified host name first and then tried the IP address.

Thanks in advance.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/jcifs/attachments/20171212/fc934ef0/attachment.html>

More information about the jCIFS mailing list