Skip to content
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

Cluster: Can't logon as user {username}. #203

Open
emyatsuna opened this issue Sep 2, 2019 · 3 comments
Open

Cluster: Can't logon as user {username}. #203

emyatsuna opened this issue Sep 2, 2019 · 3 comments
Labels
documentation The issue is related to documentation only. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub help wanted The issue is up for grabs for anyone in the community.

Comments

@emyatsuna
Copy link

Hi, I tried to manually create Cluster via GUI in my server and it went smoothly. I am using the same credentials (username&password) as input for the mandatory DomainAdministratorCredential but upon execution, I get the error below. Any ideas/ suggestions? Is it possible to disable the mandatory admincred param too and use the current windows user credentials if not provided? Thanks.

Error: PowerShell DSC resource MSFT_xCluster failed to execute Set-TargetResource functionality with error message: System.InvalidOperationException: Can't logon as user <username>.

@johlju
Copy link
Member

johlju commented Sep 3, 2019

Currently it is not possible to use PsDscRunAsCredential as the resource requires DomainAdministratorCredential to impersonate the user. But it should be possible to use PsDscRunAsCredential so I label this as enhancement that enhancement is tracked in another issue and wait for someone in the community to add that.

In regards to your error, how to you specify the credentials? This line is the one that fails for you.

https://github.com/PowerShell/xFailOverCluster/blob/44b3736f1aa0db53f2fa272527ba4c72306a8f05/DSCResources/MSFT_xCluster/MSFT_xCluster.psm1#L444-L445

@johlju johlju added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. question The issue is a question. and removed enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Sep 3, 2019
@emyatsuna
Copy link
Author

Hi, Glad to know that this will be enhanced.

I did the following call using Puppet:

dsc_xcluster{'CreateFailoverCluster':
      dsc_name => 'myclustername',
      dsc_domainadministratorcredential => {'user' => 'myuser', 'password' => 'mypassword'}
    }

I have successfully move forward with this by adding mydomain domain as additional input in user parameter. user => 'mydomain/myuser'

Thank you.

@johlju
Copy link
Member

johlju commented Sep 6, 2019

Glad you resolved it! Let us update the parameter description in the documentation saying that domain must be provided. 🙂

@johlju johlju added documentation The issue is related to documentation only. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub help wanted The issue is up for grabs for anyone in the community. and removed question The issue is a question. labels Sep 6, 2019
@johlju johlju changed the title xCluster: Can't logon as user {username}. Cluster: Can't logon as user {username}. Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation The issue is related to documentation only. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

2 participants