Skip to content

SMB share with quotation marks in the password in interactive mode failed #13060

@waewoo

Description

@waewoo

SMB share with quotation marks in the password failed in interactive mode
Password example (The quotation marks are therefore part of the password) :
"MySuperPassword"

I have to add backslashes in front of each quotation mark to make it work, which is not too normal for an interactive mode.
\"MySuperPassword\"

Debug output

==> default: Machine booted and ready!
==> default: Preparing SMB shared folders...
    default: folders shortly. Please use the proper username/password of your
    default: account.
    default:
    default: Username (user[@domain]): ftzpr
    default: Password (will be hidden):
==> default: Credentials incorrect. Please try again.

Expected behavior

SMB share folder authentication with quotation marks in the password success

Vagrant requires administrator access to create SMB shares and
may request access to complete setup of configured shares.
==> default: Mounting SMB shared folders...
    default: D:/Travail/SandBox/microvm => /vagrant
Vagrant is currently configured to mount SMB folders with the
`mfsymlink` option enabled. This is equivalent to adding the
following to your Vagrantfile:
  config.vm.synced_folder '/host/path', '/guest/path', type: "smb", mount_options: ['mfsymlink']

Actual behavior

SMB share with quotation marks in the password failed in interactive mode
Password example (The quotation marks are therefore part of the password) :
"MySuperPassword"

I have to add backslashes in front of each quotation mark to make it work, which is not too normal for an interactive mode.
\"MySuperPassword\"

Reproduction information

Vagrant version

Installed Version: 2.3.4
Latest Version: 2.3.4

Host operating system

Windows 10

Guest operating system

hashicorp/bionic64

Steps to reproduce

  1. Run vagrant up
  2. Indicate the SMB login and password (with quotation marks in the password when the question is asked by vagrant)
  3. SMB authentication fails

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "hashicorp/bionic64"
end

Vagrant.configure("2") do |config|
  # Run Ansible from the Vagrant VM
  config.vm.provision "ansible_local" do |ansible|
    ansible.playbook = "playbook.yml"
  end
end

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions