# Samba, cannot access with host name, only with Ip address

## devilheart

The problem is really simple. I have a samba server with this configuration

```

[global]

   workgroup = CASA

   server string = MULTIVERSE

   log file = /var/log/samba/log.%m

   netbios name = MULTIVERSE

   hosts allow = 192.168.1. 192.168.0. 127. 10.

   guest ok = yes

   guest account = nobody

   security = user

   encrypt passwords = yes

   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

   passdb backend = smbpasswd

   name resolve order = host lmhosts bcast

   preserve case = yes

   short preserve case = yes

   default case = lower

   case sensitive = no

   local master = yes

   os level = 99

[Public]

   comment = Pubblica

   path = /var/pub

   public = yes

   writable = yes

   create mask = 0664

   directory mask = 0775

   force user = patrik

   force group = users

[Docs]

  comment = Manuali

  path = /home/patrik/Manuali

  public = yes

  writable = yes

  force user = patrik

  force group = users

[homes]

  browseable = yes

  path = /home/%S

  read only = no

  valid users = %S

  guest ok = no

```

My server shows up in windows explorer (windows 7 pro) but when I click on it I get an "Unable to access \\MULTIVERSE Network path was not found". If I type in \\192.168.0.10 (server's Ip address) it works. Why is this happening? pinging the server with its host name works

----------

## richard.scott

If you tried to access \\MULTIVERSE  before you had configured Samba to allow you to connect your Windows box will remember that your not allowed to access this box.

Accessing it via IP is (to the Windows box) a totally different server, and it re-checks authentication rather than using its cache.

Try logging out or rebooting your windows box and try again.

Rich

----------

## devilheart

This configuration was in place for quite some time, but only recently I've found some spare time to do some checking. Both the server and the windows 7 client were rebooted a few times. Oddly, if I set security to share I can access via \\MULTIVERSE but homes share doesn't work anymore

----------

