我遇到了一个奇怪的问题:我可以使用 Linux 机器连接到 Samba 服务器(在 Mac 上),smbclient
但无法使用以下方式挂载 Samba 共享:CIFS
smbclient
有效的命令是:
smbclient -U MYUSERNAME -W X.YYY.ZZ -m SMB2 -d 3 //SERVER/LEEF
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[global]"
WARNING: The "syslog" option is deprecated
added interface ens3 ip=xx.xx.xx.xx bcast=yy.yy.yy.yy netmask=255.255.0.0
added interface docker0 ip=zz.zz.zz.zz bcast=pp.pp.pp.pp netmask=255.255.240.0
Client started (version 4.7.6-Ubuntu).
tdb(/var/cache/samba/gencache.tdb): tdb_open_ex: could not open file /var/cache/samba/gencache.tdb: Permission denied
resolve_hosts: Attempting host lookup for name xxxxxxxxx<0x20>
Connecting to rr.rr.rr.rr at port 445
got OID=1.2.840.48018.1.2.2
Enter X.YYY.ZZ\ MYUSERNAME's password:
GENSEC backend 'gssapi_spnego' registered
GENSEC backend 'gssapi_krb5' registered
GENSEC backend 'gssapi_krb5_sasl' registered
GENSEC backend 'spnego' registered
GENSEC backend 'schannel' registered
GENSEC backend 'naclrpc_as_system' registered
GENSEC backend 'sasl-EXTERNAL' registered
GENSEC backend 'ntlmssp' registered
GENSEC backend 'ntlmssp_resume_ccache' registered
GENSEC backend 'http_basic' registered
GENSEC backend 'http_ntlm' registered
GENSEC backend 'krb5' registered
GENSEC backend 'fake_gssapi_krb5' registered
Try "help" to get a list of possible commands.
smb: \>
我尝试了以下挂载命令
sudo mount -t cifs //SERVER/LEEF /mnt/LEEF_IEU/ -o username=MYUSERNAME,domain=X.YYY.ZZ,vers=2.0
但我得到了
mount error(95): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
和所有其他vers=
我得到
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
我在这里不知所措,感觉我忽略了显而易见的东西。有什么建议可以告诉我这里发生了什么,以及我如何安装 samba 共享(不一定是 cifs)?
谢谢。