mitchellh/vagrant — pull request #3642 by jyggen (2014-05-06 14:00:30+00:00)
Title: Don't wrap the escaped password in single quotes.

This fixes issue #3503. From the [Shellwords docs](http://www.ruby-doc.org/stdlib-1.9.3/libdoc/shellwords/rdoc/Shellwords.html#method-c-shellescape):

>Note that a resulted string should be used unquoted and is not intended for use in double quotes nor in single quotes.

The issue is that running the password through `Shellwords.shellescape` will add a backslash before the exclamation mark, and by wrapping it in quotes I guess it's interpreted as part of the string;
```shell
mount -t cifs -o uid=`id -u vagrant`,gid=`id -g vagrant`,sec=ntlm,username=jyggen,pass='password\!' //192.168.50.172/7c916d949ecf5067741bd8c8a4a83f6c /var/www
```
Removing the quotes around the password fixes the issue and share is mounted successfully.

```shell
mount -t cifs -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3`,sec=ntlm,username=jyggen,pass=password\! //192.168.50.172/7c916d949ecf5067741bd8c8a4a83f6c /var/www
```