I want to share some files with some of my LAN-friends, disallowing access for rest of the hosts. I uset "hosts deny = all" and hosts allow. with IP's it works fine. But when I'm trying to define allowed hosts by hostname allowed hosts can't connect. In testparm everything seems to be ok:
debian:/home/michal# testparm fell 10.1.1.71
Load smb config files from /etc/samba/smb.conf
Processing section "[Udostepnione]"
Processing section "[Obrazy]"
Processing section "[CS+AoT]"
Processing section "[homes]"
Processing section "[printers]"
Loaded services file OK.
WARNING: You have some share names that are longer than 8 chars
These may give errors while browsing or may not be accessible
to some older clients
Allow connection from fell (10.1.1.71) to Udostepnione
Allow connection from fell (10.1.1.71) to Obrazy
Allow connection from fell (10.1.1.71) to CS+AoT
Allow connection from fell (10.1.1.71) to homes
Allow connection from fell (10.1.1.71) to printers
debian:/home/michal# testparm debian 10.1.1.71

a part of my conf:
;*******************section global*****************
[global]
security = SHARE
netbios name = Fell
workgroup = Workgroup
server string = %h server (Samba %v)
invalid users = root
deadtime = 4
log level = 2
log file = /var/log/samba/log.%m
max log size = 2000
syslog = 0
encrypt passwords = true
socket options = TCP_NODELAY
dns proxy = no
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
obey pam restrictions = yes
;*******************section CS+AoT*****************
[CS+AoT]
hosts deny = all
hosts allow = fell
comment = reality mody + dodatki
path = /mnt/Windows/Documents and Settings/All Users/Udostepniane/CS+TO AoT/
guest ok = True
writeable = no
max connections = 2
in this example "fell" is name of my computer. If I try to enter CS+AoT through samba i get this:


a part of my conf:
spawn smbclient //FELL/CS+AoT -U User -I 10.1.1.71 -W WORKGROUP
added interface ip=10.1.1.71 bcast=10.1.255.255 nmask=255.255.0.0
Password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 2.2.3a-12.3 for Debian]
tree connect failed: NT_STATUS_NETWORK_ACCESS_DENIED