问题描述
我正在尝试在Mac OSX Mavericks上安装Windows共享文件夹.简单的用户名和密码可以正常工作
I am trying to mount a windows shared folder on Mac OSX Mavericks. A simplistic user name and password worked fine
mount -t smbfs //user2:[email protected]/myproject ~/localmap
尝试使用更有效的用户名和密码时,出现解析URL失败的错误.详细是用户名:mydomain \ user1密码:A%b $ c @ d!e#f
On trying out the more valid user name and password I am getting errors that parsing URL failed.The details areUsername: mydomain\user1Password: A%b$c@d!e#f
尝试的命令是
mount -t smbfs //mydomain\user1:A%b\$c\@d\!e#[email protected]/myproject ~/localmap
基于我发现的$和!需要逃脱.在如何转义特殊字符方面需要帮助.顺便说一句,在第一种情况下,仅使用不带域的用户名似乎可行
Based on what I found, $ and ! needs to be escaped. Need help on how to escape the special characters. Incidentally, using only the username without the domain seems to work in the first case
推荐答案
只需对您的特殊字符进行编码.
Just encode your special characters.
@ -> %40
$ -> %24
! -> %21
其他字符可以在这里找到: http://www.degraeve.com/reference/urlencoding.php
Others characters can be found here:http://www.degraeve.com/reference/urlencoding.php
例如
username="someone", password="passw@rd"
那么这应该对您有用:
mount -t smbfs //someone:passw%40rd@server/path /Volumes/path
这篇关于在挂载命令中转义特殊字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!