Samba access works with IP address only

sambawins

I added a Debian etch host (hostname: webserver, IP address: 192.168.101.2) running Samba to a Windows network with a Windows 2003 PDC (IP address 192.168.101.3). The Samba server exports a public guest share, called "Intranet". The server shows up fine in the network, but trying to click on it produces an error dialog, stating I don't have the necessary permissions. So does entering \webserver manually and using \webserver\internet states that the path does not exist. Interestingly, accessing the share by IP address (\192.168.101.2 or \192.168.101.2\intranet) works fine. DNS is configured correctly, and "smbclient //webserver/intranet" on another Linux client works fine.

One complicating issue is that the webserver is only a VMware virtual machine running on PDC server.

Here is our smb.conf:

[global]
    workgroup = Foobar
    server string = Webserver
    wins support = yes                 ; commenting out these
    wins server = 192.168.101.3 ; two lines has no effect
    dns proxy = no
    guest account = nobody
    [... snipped some unrelated bits, like logging ...]
    security = share
    [... snipped some password-related things ...]
    domain master = no

[intranet]
    comment = Intranet
    path = /srv/webserver/contents
    browseable = yes
    guest ok = yes
    guest only = yes
    read only = yes
    create mask = 0775
    directory mask = 0775

Best Answer

If your client can access the share using \\<IP-ADDRESS>\<SHARE-NAME>, then this definitely points at name resolution.

I would therefore double-check the DNS side of things, as \\<FQDN>\<SHARE-NAME> is effectively the same as above. If you don't provide an FQDN, and only provide a host name and the [Windows] client is still supporting legacy NBT, it will try WINS name resolution as well.

Finally, if the Windows Client is running on Windows 7 or Windows Server 2008 R2 (not sure about Vista / Server 2008 R1), the client by default wants to use NTLMv2. Older SAMBA distributions only support LAN Manager and NTLMv1, which makes it impossible to connect. However, you've managed to connect, so this is probably irrelevant. You can change the client's modus operandi by means of Local Security Policy or GPO.

Long story short, make sure your SAMBA distro is up to date. And I'd seriously consider dropping the NBT side of your SMB.CONF file (WINS entries).

Good luck!