![smbtree 找不到我的 samba 共享,但我可以使用 Mac 客户端连接到共享](https://linux22.com/image/865145/smbtree%20%E6%89%BE%E4%B8%8D%E5%88%B0%E6%88%91%E7%9A%84%20samba%20%E5%85%B1%E4%BA%AB%EF%BC%8C%E4%BD%86%E6%88%91%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%94%A8%20Mac%20%E5%AE%A2%E6%88%B7%E7%AB%AF%E8%BF%9E%E6%8E%A5%E5%88%B0%E5%85%B1%E4%BA%AB.png)
我正在尝试使用 smbtree 查看本地网络上的 samba 共享。其中一些共享托管在我自己的服务器上,我正在该服务器上运行所有这些命令。我知道这些共享存在,因为我可以在 Mac 上使用“连接到服务器”(Cmd + K)命令连接到它们并输入
smb://name_of_my_samba_server
但是,当我运行 smbtree 时,我可以看到网络上的其他 samba 共享,但看不到自己的。当我使用 -d3 选项运行 smbtree 时,唯一与我自己的 samba 共享及其所在服务器有关的输出行如下:
added interface eth0 ip=my.ip.address bcast=first.three.octets.of.my.ip.255 netmask=255.255.248.0
我的 smb.conf 文件位于本文末尾,但我认为问题不在于配置文件,因为我可以访问运行 smbtree 时出现的服务器之一的某人的 smb.conf,而当我将该人的 smb.conf 用作自己的 smb.conf 时,我的 samba 共享仍然没有出现。我想使用 smbtree,因为我正在尝试以编程方式抓取 LAN 上 samba 共享的元数据,并且我正尝试使用 smbtree 显示网络上的所有共享。
编辑:因此,当我运行时,我能够看到服务器上的共享
smbclient -L my_ip_address
但使用 smbtree 仍然无法显示。为什么这两个程序(smbtree 和 smbclient)会区分它们可以看到哪些内容?
[global]
# Network Related Options
# -----------------------
# interfaces to bind to
interfaces = lo eth0
# network segments to allow connections from
hosts allow = 127., 134.173.
# socket / performance options (generally, don't touch these)
socket options = TCP_NODELAY SO_RCVBUF=131072 SO_SNDBUF=131072
aio read size = 16384
aio write size = 16384
use sendfile = true
# Logging Options
# -----------------------
# logs split per machine
log file = /var/log/samba/log.%m
# max 1024KB per log file, then rotate
max log size = 1024
log level = 2
debug timestamp= yes
# Authentication Options
# -----------------------
# generally, don't touch any of this.
security = user
encrypt passwords = yes
passdb backend = tdbsam
map to guest = Bad User
guest account = nobody
# Filesystem Options
# -----------------------
# These options correspond to windows file attributes that don't have
# UNIX equivalents. Instead of ignoring them, we emulate ('map') them.
map archive = yes
map hidden = yes
map read only = yes
map system = yes
store dos attributes = yes
# Nice Global Options
# -----------------------
# makes UNIX dot files look like Windows 'hidden' files.
hide dot files = yes
unix extensions = no
# Miscelaneous Options
# -----------------------
workgroup = MYGROUP
# no one actually uses wins
wins support = no
# this is just a simple file server, no printing
load printers = no
[Movies]
path = /home/alex/Movies
public = yes
browseable = yes
guest ok = yes
fake oplocks = yes
[Ebooks]
path = /home/alex/Ebooks
public = yes
browseable = yes
guest ok = yes
fake oplocks = yes
[Software]
path = /home/alex/Software
public = yes
browseable = yes
guest ok = yes
fake oplocks = yes
[Music]
path = /home/alex/Music
public = yes
browseable = yes
guest ok = yes
fake oplocks = yes