我正在尝试从 Synology DSM 7.0 安装 CIFS 共享:
$ sudo mkdir /mnt/ADN_Archives
$ echo $?
0
$ kinit [email protected]
$ echo $?
0
$ sudo mount.cifs //myNAS.myDomain.lan/ADN_Archives/ /mnt/ADN_Archives/ --verbose -o [email protected],vers=3,sec=krb5i
mount.cifs kernel mount options: ip=x.y.z.t,unc=\\myNAS.myDomain.lan,vers=3,sec=krb5i,[email protected],pass=********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
$ echo $?
22
$ sudo mount.cifs -V
mount.cifs version: 6.11
$ man mount.cifs
-sh: man: command not found
$
两台机器都加入了域。
同样的错误在mount.cifs
版本 5.5 的 DSM 6.2 上也出现了。
EDIT0:远程myNAS.myDomain.lan
服务器不是 Synology。
以下是该命令的结果smbclient
:
$ mkdir ~/.cache
$ smbclient -k -U [email protected] //myNAS.myDomain.lan/ADN_Archives/
WARNING: The "ldap ssl ads" option is deprecated
/etc/samba/smb.reserved.conf not found
gensec_spnego_client_negTokenInit_step: gse_krb5: creating NEG_TOKEN_INIT for cifs/myNAS.myDomain.lan failed (next[(null)]): NT_STATUS_INVALID_PARAMETER
session setup failed: NT_STATUS_INVALID_PARAMETER
cli_cm_open returned NT_STATUS_INVALID_PARAMETER
$ echo $?
1
$ smbclient -V
Version 4.10.18
Synology Build 42184, Oct 15 2021 18:26:01
$
EDIT1:似乎vers=3
无法被识别:
$ dmesg -T | grep -vw agetty | tail -1
[Tue Apr 9 12:27:23 2024] CIFS VFS: Unknown vers= option specified: 3
$
所以我替换vers=3
为vers=3.0
,我得到了一个不同的错误:
$ sudo mount.cifs //myNAS.myDomain.lan/ADN_Archives/ /mnt/ADN_Archives/ --verbose -o [email protected],vers=3.0,sec=krb5i
mount.cifs kernel mount options: ip=x.y.z.t,unc=\\myNAS.myDomain.lan,vers=3.0,sec=krb5i,[email protected],pass=********
mount error(95): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
$ echo $?
95
$ dmesg -T | grep -vw agetty | tail -2
[Tue Apr 9 12:28:12 2024] CIFS VFS: Send error in SessSetup = -95
[Tue Apr 9 12:28:12 2024] CIFS VFS: cifs_mount failed w/return code = -95
$
EDIT2:尝试vers=3.11/3.02/2.1/1.0
$ sudo mount -t cifs //myNAS.myDomain.lan/ADN_Archives/ --verbose -o [email protected],vers=3.11/3.02/2.1/1.0,sec=krb5 /mnt/ADN_Archives/
mount.cifs kernel mount options: ip=x.y.z.t,unc=\\myNAS.myDomain.lan\ADN_Archives,vers=3.11/3.02/2.1/1.0,sec=krb5,[email protected],pass=********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
$ dmesg -T | grep -vw agetty | tail -2
[Tue Apr 9 18:02:36 2024] CIFS VFS: Unknown vers= option specified: 3.11/3.02/2.1/1.0
[Tue Apr 9 19:03:04 2024] CIFS VFS: Unknown vers= option specified: 3.11/3.02/2.1/1.0
$
EDIT3:两台机器都加入了域,这是我的 kerberos 票:
$ klist -fea
Ticket cache: FILE:/tmp/krb5cc_1067
Default principal: [email protected]
Valid starting Expires Service principal
04/08/2024 18:22:54 04/08/2024 22:22:54 krbtgt/[email protected]
renew until 04/08/2024 22:22:54, Flags: RIA
Etype (skey, tkt): aes256-cts-hmac-sha1-96, aes256-cts-hmac-sha1-96
Addresses: (none)
$