我试图将对Samba共享的访问限制在.example.com域中的主机上。但是当我试图从那个域的主机连接时,我就被拒绝了。
smb.conf
[share1]
...
valid users = ralph
hosts allow = .example.comSamba日志
check_ntlm_password: authentication for user [ralph] -> [ralph] -> [ralph] succeeded
Denied connection from 10.234.56.1 (10.234.56.1)该IP地址存在反向DNS记录。这让我怀疑Samba服务器是否真的在检查反向记录,以查看主机是否位于该域中。
如果我删除了主机allow语句,共享就会像预期的那样工作。每次重新启动smb服务时,我都会重新启动nmb服务。
哪个组件负责执行PTR记录查找?
发布于 2015-06-29 23:11:57
为了使主机允许使用主机名的条目工作,您需要启用
hostname lookups = yes在smb.conf的全局配置中。
没有一个WINS设置是我需要的,以使这一工作。通过禁用nmb服务进行测试,共享继续工作。
发布于 2015-06-29 21:42:01
DNS解析似乎不起作用。将前三个三元组而不是域添加为hosts allow:
hosts allow = 10.234.56
重新启动samba,然后再尝试登录。
如果需要使用DNS,那么在Samba中需要进行一些额外的配置:
7.3.4.4 dns代理
If you want the domain name service (DNS) to be used if a name isn't found in WINS, you can
set the following option:
[global]
dns proxy = yes还请检查以下内容:
7.3.4.5名称解析命令
The global name resolve order option specifies the order of services that Samba will use
in attempting name resolution. The default order is to use the LMHOSTS file, followed by
standard Unix name resolution methods (some combination of /etc/hosts, DNS, and NIS), then
query a WINS server, and finally use broadcasting to determine the address of a NetBIOS name.
You can override this option by specifying something like the following:
[global]
name resolve order = lmhosts wins hosts bcasthttps://serverfault.com/questions/702455
复制相似问题