Hello Everyone

When execute below script I got lots of exception "Logon failure: unknown user name or bad password." which is correct and what I want as only one userName and userPassword is correct.

Unfortunately for the one I should have access to insted of that I am getting error jcifs.smb.SmbException: The parameter is incorrect.

Can someone advice me what I am doing wrong or not doing

Important: I have search on google and got myslef new liblary 1.3.15 which apparently have a fix for that but I still have that issue.


Java Code:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package deployj;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.UnknownHostException;
import jcifs.smb.NtlmPasswordAuthentication;
import jcifs.smb.SmbException;

import jcifs.smb.SmbFile;
import jcifs.smb.SmbFileOutputStream;
import jcifs.smb.SmbSession;

/**
 *
 * @author 
 */
public class DeployJ {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws FileNotFoundException, IOException {

        String userName[] = {"Administrator", "Admin", "test", "jojo"};
        String userPassword[] = {"test", "password", "jojo"};
        
        for (int i = 0; i < userName.length; i++) {
            for (int k = 0; k < userPassword.length; k++) {
                System.out.print("  " + userName[i] + " " + userPassword[k] + " - ");
                
                NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("Domain", userName[i], userPassword[k]);     
                String path = "smb://XX.XX.X.XX/";               
                SmbFile sFile = new SmbFile(path, auth);

                SmbFileOutputStream sfos;
                try {
                    sfos = new SmbFileOutputStream(sFile);
                } catch (SmbException ex) {
                    System.out.println(ex.toString());
                    continue;
                } catch (MalformedURLException ex) {
                    System.out.println(ex.toString());
                    continue;
                } catch (UnknownHostException ex) {
                    System.out.println(ex.toString());
                    continue;
                }

                System.out.println("Done");

            }
        }
    }
}