【问题标题】:Using ROBOCOPY through Salt Master通过 Salt Master 使用 ROBOCOPY
【发布时间】:2022-02-04 19:58:49
【问题描述】:

我设置了 SLS 文件以将内容从网络文件夹复制到 minion 上的本地目录。

看起来有点像这样: 命令测试: cmd.运行: - 名称:'ROBOCOPY \\\CygwinSource C:\CygwinSource /E'

并得到以下输出:

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows                              
-------------------------------------------------------------------------------

  Started : Tuesday, December 6, 2016 10:50:35 AM
2016/12/06 10:50:35 ERROR 1808 (0x00000710) Getting File System Type of Source \\<Server>\<program>\<file>\
The account used is a computer account. Use your global user account or local user account to access this server.


   Source - \\<Server>\<program>\<folder>\
     Dest : C:\<path>\<folder>\

    Files : *.*

  Options : *.* /S /E /DCOPY:DA /COPY:DATS /PURGE /MIR /NP /R:1 /W:1 

------------------------------------------------------------------------------

NOTE : NTFS Security may not be copied - Source may not be NTFS.

2016/12/06 10:50:35 ERROR 1808 (0x00000710) Accessing Source Directory \\<Server>\<program>\<file>\
The account used is a computer account. Use your global user account or local user account to access this server.

Waiting 1 seconds... Retrying...

当我在命令行中本地运行与“ROBOCOPY \\\CygwinSource C:\CygwinSource /E”相同的东西时,它运行良好。我不知道如何修复 Robocopy 在通过 salt 使用它时似乎给出的“使用本地用户帐户”。

我还尝试添加 /MIR 和 /SEC,但没有成功。

运行 Windows 10、Minion 2016.3.3 硕士:红帽,2016.3.3

【问题讨论】:

    标签: salt-stack robocopy


    【解决方案1】:

    Salt 似乎正在使用计算机帐户连接到网络资源。一些可能的解决方案:

    1. 尝试将客户端上的 Salt Service 更改为以域用户身份运行(如果这是 salt 执行命令的方式)。
    2. 尝试使用 salt 文件服务器
    3. 在创建计划任务的地方实施这个 hacky 解决方法 - 在似乎与您的问题相关的 github 问题中讨论:https://github.com/saltstack/salt/issues/16340

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多