客户端Debian
,服务器Windows 2019
。
即使 DNS 解析成功,我还是添加了鹰眼在 /etc/hosts 上,还修改了 /etc/samba.smb.conf,添加:
client min protocol = SMB2
client max protocol = SMB3
我可以使用 smbclient 浏览共享:
#> smbclient -V
Version 4.2.14-Debian
#> smbclient -L eagleeye -Uuuu%ppp -Wdom
Domain=[DOM] OS=[] Server=[]
Sharename Type Comment
--------- ---- -------
ADMIN$ Disk Remote Admin
C$ Disk Default share
IPC$ IPC Remote IPC
...
Repo Disk
#> smbclient //eagleeye/repo -Uusername%admin -Wdom
Domain=[DOM] OS=[] Server=[]
smb: \> ls
. D 0 Thu Aug 1 17:56:27 2019
.. D 0 Thu Aug 1 17:56:27 2019
Autodiscover D 0 Fri Apr 20 13:30:00 2018
gitupdate D 0 Tue Aug 6 22:45:33 2019
SharedModules D 0 Tue Aug 6 22:47:17 2019
...
...
26085631 blocks of size 4096. 8936156 blocks available
smb: \>
但是,我无法将其作为共享安装
mount -t cifs //eagleeye/repo ~/share
mount: wrong fs type, bad option, bad superblock on //eagleeye/repo,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so.
#> lsmod | grep cifs
cifs 546304 0
dns_resolver 12641 1 cifs
fscache 45304 2 nfs,cifs
# adding vers=2.0
#> mount -t cifs -o vers=2.0 //eagleeye/repo ~/share
mount: wrong fs type, bad option, bad superblock on //eagleeye/repo,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so.
#> dmesg | tail -n10
...
[226622.680227] Key type dns_resolver registered
[226622.733361] FS-Cache: Netfs 'cifs' registered for caching
[226622.781716] Key type cifs.spnego registered
[226622.828384] Key type cifs.idmap registered
[226622.872472] Unable to determine destination address.
答案1
不知道 Debian 的情况,但 CentOSmount.cifs
默认使用 SMB1,因此您必须使用vers
选项强制使用 SMB2/3:mount -t cifs -o vers=2.0 //eagleeye/repo ~/share
CentOS 上其他可能的值:2.1
,3.0
。