Created attachment 17729 [details] Debug output from libsmbclient I wrote something like this: SMBCCTX *smbcctx = smbc_new_context(); SmbcAuth smbc_auth;smbc_auth.address = "fs.rookad.local"; smbc_auth.user = "rookad/administrator"; smbc_auth.password = mypassword; smbc_auth.workgroup = ""; smbc_setOptionUserData(smbcctx, &smbc_auth); smbc_setFunctionAuthDataWithContext(smbcctx, smbc_auth_fn_ctx); smbc_init_context(smbcctx); SMBCFILE *smbfile = NULL; string smbpath = "smb://" + smbc_auth.address + "/home/sam"; if (NULL == (smbfile = smbc_getFunctionOpendir(smbcctx)(smbcctx, smbpath.c_str()))) { perror("smbc_getFunctionOpendir"); return 1; } But got the output: session setup failed: NT_STATUS_LOGON_FAILURE Could not resolve \sam\* smbc_getFunctionOpendir: No such file or directory In the wireshark file attached, from the packet, I can see the username passed in is a bit strange: User = WORKGROUP\rookad/administrator, it should be User = ROOKAD\administrator. If I change the code above to the following, it works normally: smbc_auth.user = "administrator"; smbc_auth.workgroup = "rookad"; And the wireshark file is attached.
Created attachment 17730 [details] tcpdump from the NT_STATUS_LOGON_FAILURE program
Created attachment 17731 [details] tcpdump from the NT_STATUS_LOGON_FAILURE program (ignore the previous one))
Created attachment 17732 [details] tcpdump from the fixed program