java - JCIFS: Logon failure: unknown user name or bad password NT_STATUS_LOGON_FAILURE -


i need connect samba server spring batch. (it's first time use jcifs , samba, noob error)

my junit return error : logon failure: unknown user name or bad password

for testing purpose, installed samba (latest version) on linux server.

here result of "testparm -sp"

load smb config files /etc/samba/smb.conf rlimit_max: rlimit_max (1024) below minimum windows limit (16384)   processing section "[homes]" loaded services file ok. server role: role_standalone [global]         server string = samba server version %v         map guest = bad user         obey pam restrictions = yes         pam password change = yes         passwd program = /usr/bin/passwd %u         passwd chat = *enter\snew\s*\spassword:* %n\n *retype\snew\s*\spassword:*$*password\supdated\ssuccessfully* .         unix password sync = yes         syslog = 0         log file = /var/log/samba/log.%m         max log size = 1000         usershare allow guests = yes         panic action = /usr/share/samba/panic-action %d  [homes]         comment = répertoire personnel         read = no         create mask = 0700         directory mask = 0700 

here user "sudo pdbedit -l –v"

--------------- unix username:        samba nt username: account flags:        [u          ] user sid:             s-1-5-21-1403256704-195070793-2903663984-1998 primary group sid:    s-1-5-21-1403256704-195070793-2903663984-731 full name: home directory:       \\s55-app01-dev\samba homedir drive: logon script: profile path:         \\s55-app01-dev\samba\profile domain:               s55-app01-dev account desc: workstations: munged dial: logon time:           0 logoff time:          9223372036854775807 seconds since epoch kickoff time:         9223372036854775807 seconds since epoch password last set:    wed, 09 nov 2016 16:20:40 cet password can change:  wed, 09 nov 2016 16:20:40 cet password must change: never last bad password   : 0 bad password count  : 0 logon hours         : ffffffffffffffffffffffffffffffffffffffffff 

and here junit :

             string user = "samba";              string pass = "yesplaintextpassword";              string sharedfolder = "home/samba";              string path = "smb://myip/" + sharedfolder + "/test.txt";              ntlmpasswordauthentication auth = new ntlmpasswordauthentication("s55-app01-dev", user, pass);              try {                smbfile smbfile = new smbfile(path, auth);                smbfileoutputstream smbfos = new smbfileoutputstream(smbfile);                inputstream = smbfile.getinputstream( ):                system.out.println("pas d’erreur");              } catch (exception e) {                system.out.println(e.getmessage());              } 

i know password good, tried , without domain name. tried without /home sharedfolder variable.

i tried add :

        config.setproperty("jcifs.smb.client.useextendedsecurity", "false");         config.setproperty("jcifs.smb.lmcompatibility", "5");         config.setproperty("jcifs.smb.client.disableplaintextpasswords", "false"); 

with true, or false, value 0 (oldest authentification) 5 (newest authentification protocol if understand correctly)/

i don't know next. administrator told me linux server has no firewall or block on port 139 , 145.

i'm on windows 7, samba-4.5.1 , jcifs 1.3.3.

thanks in advance tips or answer (and sorry english, it's not native language).


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -