I was just fighting with the same thing, the error description has nothing to do with the actual issue.
antares tmp # smbclient \\\\XDESPAIR\\HateYou -U antares -d 3 -I 18.104.22.168
Initialising global parameters
m_process() - Processing configuration file "/etc/samba/smb.conf"
added interface ip=22.214.171.124 bcast=126.96.36.199 nmask=255.255.255.128
Client started (version 2.2.8a).
Connecting to 188.8.131.52 at port 139
Domain=[XDESPAIR] OS=[Unix] Server=[Samba 2.2.8]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
And when you try to connect from windows it gives you these
weird errors about "network not found". It's a mess, and probably should be filed as a bug, since these errors are horrible.
What I ended up doing is changing the log level in /etc/samba/smb.conf
# Set the log (verbosity) level (0 <= log level <= 10)
log level = 3
Then, I went in and saw that I was getting permission denied messages from the server's point of view. Since samba maps the user name from windows to an actual user on the linux machine, I went into the linux box as the user I was logging in with from windows, and tried to access the share as that user. As it turns out, I didn't have local permission, which prevented me from gaining access to the resource.
The worst way to fix it is to chmod 777 /folder
the whole share, but it's a horrible security issue.
Instead, make a new group with
and then go to the resource that you want to share, and issue a chgrp groupnamehere /folder
then make sure the group has permission to access that share
chmod g+rwx /folder
Finally, you need to add your user to that group, and you do so by:
usermod -G groupnamehere username
Then, try to access that share from that user, and not from your root account. If you can access those files as the user, odds are your samba share will start to work a lot better.