Node-SMB / marsaud-smb2

SMB2 Client
53 stars 46 forks source link

STATUS_LOGON_FAILURE #62

Open rcarvalho opened 4 years ago

rcarvalho commented 4 years ago

I can't even get my code to connect with the share at all. I have the right credentials and permissions because I can do the following with the smbclient cli:

smbclient \\\\freenas.corp.XXXXX.com\\tamres -W corp.XXXXX.com -U “rodney.carvalho%XXXXX" -c "ls"

I'm trying to use the following code and just list the directories, but I get an authentication failure.

var SMB2 = require('@marsaud/smb2');

// create an SMB2 instance
var smb2Client = new SMB2({share:'\\\\freenas\\tamres', port: 445, domain:'corp.XXXXX.com', username:"rodney.carvalho", password:'XXXXX'});

smb2Client.readdir('hello', function(err, files){
    if(err) {
      console.log("GOT ERROR HERE!!!")
      throw err;
    }
    console.log('HELLO!');
    console.log(files);
});

Does anyone see anything I'm doing wrong? Thanks in advance.

yuchengxie commented 3 years ago

I meet the same problem? anyone reslove it?

azamsolix commented 3 years ago

I also meet the same problem Can anyone help with this?

ww9rivers commented 3 years ago

Having the exact same problem here: smbclient works in Ubuntu 18.4 (WSL). But with Node.js, I am getting this:

Error: STATUS_LOGON_FAILURE (0xC000006D) : The attempted logon is invalid. This is either due to a bad username or authentication information. { messageName: 'session_setup_step2', params: {}, code: 'STATUS_LOGON_FAILURE' }

Just wonder if this could be a problem with NTLMv2 authentication?