【问题标题】:Getting access denied while running invoke command ,kerberos dula hop delegation authentication error运行调用命令时访问被拒绝,kerberos dula hop 委托身份验证错误
【发布时间】:2021-01-27 17:21:22
【问题描述】:

您好,我在远程访问文件时遇到访问被拒绝错误,即使我可以访问共享位置。Kerberos 凭据委托已启用

PS C:\Users> $uname = "abrac\svc-igniopro-connect"
$password = "P@er***" | ConvertTo-SecureString -AsPlainText -Force
$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $uname,$password
Invoke-Command -ComputerName EABP01IGCHEA01 -Credential $cred -ScriptBlock {Get-Content "\\Ebrfile01\tcs\IT\INFRA IGNIO SOX\vdi NS list 1.csv"}
Access is denied
    + CategoryInfo          : PermissionDenied: (\\Ebrfile01\tcs...i NS list 1.csv:String) [Get-Content], UnauthorizedAccessExceptio 
   n
    + FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetContentCommand
    + PSComputerName        : EABP01IGCHEA01
 
Cannot find path '\\Ebrfile01\tcs\IT\INFRA IGNIO SOX\vdi NS list 1.csv' because it does not exist.
    + CategoryInfo          : ObjectNotFound: (\\Ebrfile01\tcs...i NS list 1.csv:String) [Get-Content], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand
    + PSComputerName        : EABP01IGCHEA01

【问题讨论】:

    标签: powershell powershell-remoting


    【解决方案1】:

    您必须在客户端和服务器上都启用CredSSP(参见:Enable-WSManCredSSP)(此双跳身份验证所必需的)。

    首先通过在您的机器上运行,在您的客户端启用服务器方向:

    Enable-WSManCredSSP -Role "Client" -DelegateComputer "EABP01IGCHEA01"
    

    然后在您的服务器 EABP01IGCHEA01 上,启用服务器角色,以便它可以充当代理:

    Enable-WSManCredSSP -Role "Server"
    

    然后你必须明确指定身份验证方法为CredSSP,因为它默认不会与它连接:

    Invoke-Command -ComputerName EABP01IGCHEA01 -Authentication Credssp -Credential $cred -ScriptBlock {Get-Content "\\Ebrfile01\tcs\IT\INFRA IGNIO SOX\vdi NS list 1.csv"}
    

    请注意security implications of enabling CredSSP:

    注意:

    CredSSP 身份验证从本地委托用户凭据 计算机到远程计算机。这种做法增加了安全性 远程操作的风险。如果远程计算机受到威胁, 当凭据传递给它时,凭据可用于 控制网络会话。

    【讨论】:

    • 问题是我不能使用 credssp 因为工具的一些限制。我有一台服务器,我可以在启用 keberos 委托后运行此调用命令来轻松获取文件夹内容。但是从我想要的服务器无法正常工作..我检查了所有设置并且一切都相同..无法确定导致此访问被拒绝错误的原因
    猜你喜欢
    • 2016-03-15
    • 2016-02-19
    • 2023-04-06
    • 2017-11-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-26
    • 2019-12-12
    相关资源
    最近更新 更多