如果要以脚本身份运行脚本 vagrant 你需要的用户 privileged: false 。
vagrant
privileged: false
config.vm.provision :shell, privileged: false, path: "scripts/test.sh"