2016-12-07 44 views
0

我有SLS文件設置爲將事物從網絡文件夾複製到本地目錄。通過Salt Master使用ROBOCOPY

看起來有點像這樣: CMD-測試: cmd.run: - 名稱: '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在鹽中使用時出現的'使用本地用戶帳戶'。

我也嘗試添加/ MIR和/ SEC哪些沒有工作。

運行Windows 10,爪牙2016年3月3日 站長:紅帽,2016年3月3日

回答

1

鹽似乎連接到與計算機帳戶的網絡資源。一些可能的解決方案:

  1. 嘗試更改客戶端上的Salt服務(如果這是鹽如何執行命令)作爲域用戶運行。
  2. 嘗試使用鹽,文件服務器
  3. 落實在其中創建計劃任務本哈克的解決方法 - 在GitHub的問題是似乎與您問題相關討論:https://github.com/saltstack/salt/issues/16340