5

我正在尝试在终端上安装 SMB 共享。如果服务器名称中没有空格,我可以使用以下命令:

$ mount -t smbfs //user:password@server/resource /Volumes/resource

但是在我的情况下,服务器名称有一个空格,我不知道如何正确传递这样的名称。

我尝试使用双引号或单引号:

$ mount -t smbfs "//user:password@ser ver/resource" /Volumes/resource
mount_smbfs: URL parsing failed, please correct the URL and try again: Invalid argument

我试图逃离空间:

$ mount -t smbfs //user:password@ser\ ver/resource /Volumes/resource
mount_smbfs: URL parsing failed, please correct the URL and try again: Invalid argument

我也尝试使用%20,\x20\040,但出现错误:

mount_smbfs: server connection failed: No route to host

我知道我可以使用 IP 地址或重命名服务器,但这将是一种解决方法,而不是解决方案,我想知道我错过了什么。

4

1 回答 1

1

如果将引号和转义结合起来会发生什么:

mount -t smbfs "//user:password@ser\ ver/resource" /Volumes/resource

据报道,在安装 smbfs 卷时,这对用户名中带有空格的人有用。

于 2013-04-05T19:03:52.940 回答