Hi, I am trying upload files to Alfresco with CIFSUniAddress dc = UniAddress.getByName("server_a");
NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("user:pass");
SmbSession.logon(dc, auth );
SmbFile to = new SmbFile("smb://server_a/User Homes/Espacio/file.jpg",auth);
InputStream out= to.getInputStream();but it does not work. The user and the password that I use are the same one with that I connect myself with Alfresco by Web. That I am making bad? This it is the error that shows.jcifs.smb.SmbAuthException: Logon failure: unknown user name or bad password.
at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:503)
at jcifs.smb.SmbTransport.send(SmbTransport.java:614)
at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:277)
at jcifs.smb.SmbSession.send(SmbSession.java:233)
at jcifs.smb.SmbTree.treeConnect(SmbTree.java:154)
at jcifs.smb.SmbSession.logon(SmbSession.java:169)
at jcifs.smb.SmbSession.logon(SmbSession.java:162)
at es.everis.integracion.alfresco.conectar.main(conectar.java:120)
if I used the user and pass of server, this it is the error:jcifs.smb.SmbException: A duplicate name exists on the network.
at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:514)
at jcifs.smb.SmbTransport.send(SmbTransport.java:614)
at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:277)
at jcifs.smb.SmbSession.send(SmbSession.java:233)
at jcifs.smb.SmbTree.treeConnect(SmbTree.java:154)
at jcifs.smb.SmbSession.logon(SmbSession.java:169)
at jcifs.smb.SmbSession.logon(SmbSession.java:162)
at es.everis.integracion.alfresco.conectar.main(conectar.java:120)
The server is in a work group not in a domain.Thanks.