简体   繁体   English

Hashicorp Vagrant - 如果我的 windows 主机上有 Microsoft 帐户,如何针对 SMB 进行身份验证

[英]Hashicorp Vagrant - How to authenticate against SMB if I have Microsoft Account on my windows host

I have a windows 10 host and I would like to set up Synced Folders for my vagrant box.我有一个 windows 10 主机,我想为我的 vagrant 盒子设置同步文件夹。 In my Vagrantfile I have:在我的 Vagrantfile 中,我有:

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

When I start up (or reload) my box, I get prompted for credentials:当我启动(或重新加载)我的盒子时,系统会提示我输入凭据:

PS D:\Vagrants\first> vagrant reload
==> default: Attempting graceful shutdown of VM...
    default: Configuring the VM...
    default: Setting VM Enhanced session transport type to disabled/default (VMBus)
==> default: Starting the machine...
==> default: Waiting for the machine to report its IP address...
    default: Timeout: 120 seconds
    default: IP: 172.27.23.149
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 172.27.23.149:22
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Preparing SMB shared folders...
    default: You will be asked for the username and password to use for the SMB
    default: folders shortly. Please use the proper username/password of your
    default: account.
    default:
    default: Username (user[@domain]):

Either format I try to specify my microsoft credentials, it gets rejected.我尝试指定我的 Microsoft 凭据的任何一种格式都会被拒绝。 I tried both with and without windows PIN.我尝试了使用和不使用 windows PIN。 Suppose my Microsoft account is username@outlook.com and password is mypass .假设我的 Microsoft 帐户是username@outlook.com ,密码是mypass Workgroup name on my windows machine is WORKGROUP .我的 windows 机器上的工作组名称是WORKGROUP

I found a solution by:我通过以下方式找到了解决方案:

  • disabling the Windows PIN and禁用 Windows PIN 和
  • as username using my "local" windows username (determined by windows environment variable %username% which also seems to equal to the folder named under C:\Users\USERNAME . Note that this is not the same as my Microsoft Account username) and as username using my "local" windows username (determined by windows environment variable %username% which also seems to equal to the folder named under C:\Users\USERNAME . Note that this is not the same as my Microsoft Account username) and
  • as password using my Microsoft Account password使用我的 Microsoft 帐户密码作为密码

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无业游民:Windows主机和Windows来宾-如何限制SMB共享? - Vagrant: Windows host and Windows guest - how to restrict smb share? 无法在Linux主机上的Windows主机上使用Vagrant创建SMB共享文件夹 - Failing to create SMB shared folder using Vagrant on Windows host with linux guest Vagrant - 如何检测Windows主机RAM和CPU - Vagrant - how to detect windows host RAM and CPU 如何在Windows 7上使用Vagrant访问我的Virtualbox - How do I access my Virtualbox using Vagrant on Windows 7 Windows 7上出现流浪汉错误:找不到框'hashicorp / precise32' - Vagrant on Windows 7 error: Box 'hashicorp/precise32' could not be found Vagrant RDP => Windows2012R2 | 我如何 rdp 进入我的流浪盒子? - Vagrant RDP => Windows2012R2 | How do I rdp into my vagrant box? 如何判断我是否在Vagrant主持人中? - How to tell if I am inside a Vagrant host? How to install Ruby Gems for Vagrant, ie for usage in a Vagrantfile and executed on the host, on linux and windows? - How to install Ruby Gems for Vagrant, i.e. for usage in a Vagrantfile and executed on the host, on linux and windows? Vagrant - 如何拥有特定于主机平台的配置步骤 - Vagrant - how to have host platform specific provisioning steps 如何在Windows主机上的Vagrant中以区分大小写的方式处理文件 - How to handle files in case-sensitive way in Vagrant on Windows host
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM