Samba – Understanding NT_STATUS_BAD_NETWORK_NAME Error

file-sharinglinuxsamba

I set up a share like this:

[global]
    security = user
    map to guest = Bad Password
    usershare allow guests = yes

[vms]
    comment = VirtualBox Virtual Machines
    path = /home/neil/VirtualBox/HardDisks
    guest ok = yes
    read only = yes

And when I access the share as myself, and type in my password, it works fine:

$ smbclient //neil-ubuntu/vms -U neil
Enter neil's password: 
Domain=[SHUTTERSTOCK] OS=[Unix] Server=[Samba 3.4.0]
smb: \>

But when I access it as guest, it doesn't work:

$ smbclient //neil-ubuntu/vms -U guest
Enter guest's password: 
Domain=[SHUTTERSTOCK] OS=[Unix] Server=[Samba 3.4.0]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME

Regardless of what password I type in.

Does anyone know why?

Also, why does smbclient print such useless error messages?

Best Answer

I recall a problem like this. I think it was caused by a directory permission somewhere in the path missing read. Check the directory perms are 755 for the path.

This error is also returned if the path does not exist.