从命令行以访客身份挂载 Windows 共享

从命令行以访客身份挂载 Windows 共享

所以我在一位朋友那里将我的外置 EXT4 HDD 连接到他的路由器,路由器识别它并且他可以将他的整个家人​​连接到它,一切都正常运行。

然而在我的 Ubuntu 机器上我可以

  • 转到我的文件管理器 (Nemo)
  • File Connect to Server

连接对话框

并且效果很好!

但是我不能:

sudo mount -t smbfs //192.168.1.1/Fab-EXT4 /media/MichelNAS/
mount: unknown filesystem type 'smbfs'

sudo mount -t cifs //192.168.1.1/Fab-EXT4 /media/MichelNAS/
Password for root@//192.168.1.1/Fab-EXT4: 

sudo mount -t cifs -o guest //192.168.1.1/Fab-EXT4 /media/MichelNAS/
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

sudo mount -t cifs //192.168.1.1/Fab-EXT4 -o user=,password= /media/MichelNAS/ 
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

sudo mount -t cifs -o rw,noperm,sec=none //192.168.1.1/Fab-EXT4 /media/MichelNAS/
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

然而:

smbclient --list=192.168.1.1 --no-pass

运行完美,输出如下:

WARNING: The "syslog" option is deprecated
Domain=[HOME] OS=[Unix] Server=[Samba 3.0.24]

    Sharename       Type      Comment
    ---------       ----      -------
    IPC$            IPC       IPC Service (mymodem Sharing Files)
    Fab-EXT4        Disk      Share Fab-EXT4 directory
Domain=[HOME] OS=[Unix] Server=[Samba 3.0.24]

    Server               Comment
    ---------            -------
    MYMODEM              mymodem Sharing Files

    Workgroup            Master
    ---------            -------
    HOME                 

所以我显然遗漏了一些东西完全愚蠢,但我不明白为什么我无法从命令行挂载此共享???

答案1

您需要根据您使用的 cifs 版本将版本添加到选项中。因此,对于 v1.0,这将是:

sudo mount -t cifs -o rw,guest,vers=1.0 //192.168.1.1/Fab-EXT4 /media/MichelNAS/

还有vers=2.0vers=3.0

相关内容