Migration

無法僅在 netbios 別名上訪問 SMB 共享

  • February 1, 2019

所以我們有一台古老的 Win7 機器,它被用作文件伺服器。這個東西已經到了生命的盡頭,20個使用者的限制開始給我們帶來沉重的打擊。

我已經設置了一個 FreeNAS 伺服器,並使用它自己的 NetBIOS 名稱對其進行了配置,並將舊伺服器的 NetBIOS 名稱添加為別名。我在網路上看到別名,但在嘗試連接到別名時無法訪問它並出現系統錯誤 53(未找到網路路徑),但在連接到定義的 NetBIOS 名稱時一切正常。這是怎麼回事?

編輯: 奇怪:即使我在 FreeNAS Web 界面中更改了 NetBIOS 名稱,我仍然無法從新的 NetBIOS 名稱訪問它,但如果我將其更改回來,一切正常。附加了 smb4.conf(注意它會被 FreeNAS 不斷覆蓋)

[global]
server min protocol = SMB2_02
server max protocol = SMB3
interfaces = 127.0.0.1 172.16.5.20
bind interfaces only = yes
encrypt passwords = yes
dns proxy = no
strict locking = no
oplocks = yes
deadtime = 15
max log size = 51200
max open files = 116768
logging = file
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
getwd cache = yes
guest account = nobody
map to guest = Bad User
obey pam restrictions = yes
ntlm auth = no
directory name cache size = 0
kernel change notify = no
panic action = /usr/local/libexec/samba/samba-backtrace
nsupdate command = /usr/local/bin/samba-nsupdate -g
server string = FreeNAS Server
ea support = yes
store dos attributes = yes
lm announce = yes
hostname lookups = yes
time server = yes
null passwords = yes
acl allow execute always = true
dos filemode = yes
multicast dns register = yes
domain logons = yes
local master = yes
idmap config *: backend = tdb
idmap config *: range = 90000001-100000000
server role = standalone
netbios name = FREENAS
workgroup = NEXT_ADVANCE
security = user
create mask = 0666
directory mask = 0777
client ntlmv2 auth = yes
dos charset = CP437
unix charset = UTF-8
log level = 1
wins server = 172.16.1.2


[shareddocs]
path = "/mnt/freenas01-troyvm-pool01.prod/shareddocs"
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = yes
access based share enum = no
shadow:snapdir = .zfs/snapshot
shadow:sort = desc
shadow:localtime = yes
shadow:format = auto-%Y%m%d.%H%M-2w
shadow:snapdirseverywhere = yes
vfs objects = shadow_copy2 zfs_space zfsacl streams_xattr
hide dot files = yes
guest ok = yes
guest only = yes
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = true
zfsacl:acesort = dontcare

編輯2: 發現這實際上歸結為舊伺服器名稱(T_REX)有一個_,這是不允許的字元。有沒有辦法允許共享名稱中出現不允許的字元?

事實證明,FreeNAS/Windows 不能很好地處理共享名稱本身中的不允許字元。我在下班後四處走動,更新了辦公室中約 25 台電腦上網路共享的 UNC 路徑-.-

引用自:https://serverfault.com/questions/951802