New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error thrown when initiating NEW-PSSession to Centos Linux #32

Closed
energizedtech opened this Issue Oct 12, 2016 · 12 comments

Comments

Projects
None yet
3 participants
@energizedtech
Copy link

energizedtech commented Oct 12, 2016

Clean compile of OMI and PSL-OMI-Provider
Providing userid of root and matching password when prompted for Get-Credential on Windows.

PS D:> $o=New-PSSessionOption -SkipCACheck -SkipRevocationCheck -SkipCNCheck
PS D:> New-PSSession -Computername 10.254.0.130 -Credential $c -Authentication basic -UseSSL -SessionOption $o
New-PSSession : The type initializer for 'System.Management.Automation.ConfigPropertyAccessor' threw an exception.
At line:1 char:1

  • New-PSSession -Computername 10.254.0.130 -Credential $c -Authenticati ...
  • - CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], RemoteException
    - FullyQualifiedErrorId : PSSessionOpenFailed
    
@energizedtech

This comment has been minimized.

Copy link

energizedtech commented Oct 12, 2016

Windows 10 PowerShell 5 as Client connecting to PowerShell on CentOS Linux

@andschwa

This comment has been minimized.

Copy link
Member

andschwa commented Oct 12, 2016

PowerShell version? Try building the Linux one from master.

@energizedtech

This comment has been minimized.

Copy link

energizedtech commented Oct 12, 2016

I just redid the process with Ubuntu, didn't re-compile from GitHub. Exact same error

@energizedtech

This comment has been minimized.

Copy link

energizedtech commented Oct 12, 2016

In both cases the Calling Workstation (Windows 10 x64)

Name Value


PSVersion 5.1.14393.206
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.206
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

@energizedtech

This comment has been minimized.

Copy link

energizedtech commented Oct 12, 2016

When you say rebuild are you referring to OMI, PSRP or POWERSHELL on Linux?

@energizedtech

This comment has been minimized.

Copy link

energizedtech commented Oct 12, 2016

For authentication should it be
root@ipaddress or simply root ?

@energizedtech

This comment has been minimized.

Copy link

energizedtech commented Oct 12, 2016

Running OMI regression test now...

@energizedtech

This comment has been minimized.

Copy link

energizedtech commented Oct 12, 2016

Just added PowerShell 6.0 to the equation on Windows 10

@andschwa

This comment has been minimized.

Copy link
Member

andschwa commented Oct 12, 2016

When you say rebuild are you referring to OMI, PSRP or POWERSHELL on Linux?

Sorry, yes I mean PowerShell on Linux.

For authentication should it be root@ipaddress or simply root ?

It should be just the user, root.

New-PSSession : The type initializer for 'System.Management.Automation.ConfigPropertyAccessor' threw an exception.

This is an error we've previously resolved, but has not yet made it into releases. There were two parts:

  1. The PSRP provider was not properly impersonating the expected user, so it would start PowerShell with HOME=/root (the home of root, the user that launched the OMI daemon since it's a service) but run with the user rights of someuser which could not read/write to /root. In #31 I fixed the PSRP provider to set HOME to the home of the user being impersonated, to avoid this permission issue. I don't know if it's in the current package.

  2. PowerShell would crash on start-up because of a regression that required the HOME directory to be readable. This was fixed in PowerShell/PowerShell#2387, which I know didn't make into the alpha.10 release.

Just added PowerShell 6.0 to the equation on Windows 10

I would not do this, it's an extra variable. No work has been done to ensure that PowerShell Core 6.0 remoting works (I mean, I think it does, but I've not personally tested it).

Anyway, what version of PowerShell on Linux are you using, and how are you launching OMI and connecting? Can you post some copy-pastes of your commands?

@paulcallen

This comment has been minimized.

Copy link
Member

paulcallen commented Feb 1, 2017

@energizedtech have you tried this with more recent versions of OMI/psl_omi_provider/powershell? The issues you are seeing should have been resolved some time ago.

@energizedtech

This comment has been minimized.

Copy link

energizedtech commented Feb 1, 2017

@paulcallen

This comment has been minimized.

Copy link
Member

paulcallen commented Feb 24, 2017

I am not aware of anyone seeing this at this point so I am going to close it. If you are still seeing this in newer builds then please re-active it.
Thanks

@paulcallen paulcallen closed this Feb 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment