我知道有几个与此相关的主题,但是这些主题都不能解决我的问题。我尝试过提到的不同选项这里
我有一个路由器,它通过 smb: 公开了附加磁盘\\192.168.1.1\diskname
。无需用户名。该磁盘将安装在/mnt/diskname
该目录存在且具有权限的位置777
。
所以我运行这个命令
sudo mount -t cifs //192.168.1.1/diskname /mnt/diskname -o file_mode=0777,dir_mode=0777,rw,sec=none --verbose
这导致
mount.cifs kernel mount options: ip=192.168.1.1,unc=\\192.168.1.1\diskname,file_mode=0777,dir_mode=0777,sec=none,user=root,pass=********
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
$ sudo lsmod | grep fuse
fuse 131072 5
$ sudo lsmod | grep cifs
cifs 1077248 0
dns_resolver 16384 1 cifs
fscache 397312 1 cifs
$ mount.cifs --version
mount.cifs version: 6.8
或者sec=none
我也尝试过,user=,password=,
但这并没有改变结果。
答案1
实际上,唯一缺少的部分是,vers=1.0
因此当将其用作附加选项时,mout 可以工作。显然它是做什么的 - 根据man mount.cifs
vers=arg
SMB protocol version. Allowed values are:
• 1.0 - The classic CIFS/SMBv1 protocol.
• 2.0 - The SMBv2.002 protocol. This was initially introduced in Windows Vista Service Pack 1, and Windows Server 2008. Note that the initial release version of Windows Vista spoke a slightly different dialect (2.000) that is not supported.
• 2.1 - The SMBv2.1 protocol that was introduced in Microsoft Windows 7 and Windows Server 2008R2.