You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
windows server 2019 and cmd.script + runas AD user = RPC error. #55080
ConfirmedSalt engineer has confirmed bug/feature - often including a MCVEP4Priority 4ZDThe issue is related to a Zendesk customer support ticket.severity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
running a cmd.script with runas set to be an AD user while on windows 2019 causes the system to throw an RPC Server Unavailable error and not run the script.
If the user is a local user it works fine. if it is on an earlier version of windows server it works fine.
Maybe related at least in part to #54809 However I can not find in the cmdmod code anywhere where it connects to that function.
Setup
have windows connected to a domain and try to run any cmd.script state with runas set as a domain user.
Thanks for reporting this. I skimmed the related issue and I think that is a good place to start. There may of been another recently reported Win Server 2019 issue that is also related.
While I wasn't able to reproduce the exact error message, I was unable to get a basic Powershell script to execute following the same state setup. However, what did work was the following, and I'll explain why.
Two likely reasons why the 1st state doesn't work.. 1. misconfigured netBIOS 2. misconfigured DNS
For example, upon setting up a 2019 Server I installed AD and promoted that machine to become a DC. I setup a forest and configure the Root domain name to be 'mydomain.local'. This acts as the domain information and the default NetBIOS name of the domain becomes 'mydomain'. Now when you add a user to active directory AND under this domain, you would traditionally log in as mydomain\user. However, this style of [Domain name][User name] is pre-windows 2000 and, while it still works at the logon screen, the DNS may not resolve this as a valid name.
In the DNS settings, under the machine name, I have a Forward Lookup Zone with a Host record of mydomain.local, which is exactly the Root domain name. The Shorthand style is called down-level logon name, or mydomain\user and the new style is called User Principle Name, or [email protected]. In the event when mydomain\user is lookup by active directory, it will search a domain for the user object while [email protected] will search the forest for the user object.
This is where the 2 likely reasons arise. If the domain isn't resolving, it won't reach active directory. If the netBIOS isn't configured properly, it won't reach active directory. Either case will cause Powershell to exit with some error that we are returning to the user.
This is all based on my understanding of the issue at play here and potentially what's really going on, as I followed Microsoft's procedure for setting up a 2019 sever with all the bells and whistles, ran the 2nd state, and received this back.
local:
----------
ID: test
Function: cmd.script
Name: salt://echo.ps1
Result: True
Comment: Command 'salt://echo.ps1' run
Started: 06:33:58.829000
Duration: 1459.0 ms
Changes:
----------
pid:
1320L
retcode:
0
stderr:
stdout:
Hello, World!
Summary for local
------------
Succeeded: 1 (changed=1)
Failed: 0
------------
I also wanted to follow up as the specific reason for why this is occurring on Window's Server 2019 and not Window's Server 2016 I haven't yet fully understood - this could be because of different configurations by the user on the 2016/2019 boxes, or Microsoft actually did change something between these releases. In any case, I'll continue to investigate this.
Joe,
Thanks for all your help on this topic.
Switching from domain\username to the UPN did, indeed, resolve the issue. I
am definitely interested to hear any further information you uncover
regarding the differences between 2016 and 2019 that lead to this issue,
but we are very happy to finally put this one to bed.
Connor
On Fri, Dec 20, 2019 at 11:06 AM Joe Eacott ***@***.***> wrote:
I also wanted to follow up as the *specific* reason for why this is
occurring on Window's Server 2019 and not Window's Server 2016 I haven't
yet fully understood - this could be because of different configurations by
the user on the 2016/2019 boxes, or Microsoft actually did change something
between these releases. In any case, I'll continue to investigate this.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#55080?email_source=notifications&email_token=ALNL2Z3MXMTU7HGH5RTUXU3QZT3SFA5CNFSM4JDEGCE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHNQUOI#issuecomment-568003129>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALNL2Z2X77UYG7FM62XWRBDQZT3SFANCNFSM4JDEGCEQ>
.
CAUTION: This message originated from a non-Origami email system.
Please ensure that the email is legitimate, hover over any links before clicking
and use caution opening attachments.
Hi @cburdge
I thought about this some more, investigated, etc. but without knowing the complexities of your custom environment and system it may be difficult to pinpoint.
I added documentation to Salt and while I'll close this issue, we can always reference it or re-open it in the future. :)
ConfirmedSalt engineer has confirmed bug/feature - often including a MCVEP4Priority 4ZDThe issue is related to a Zendesk customer support ticket.severity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Activity
whytewolf commentedon Oct 21, 2019
ZD-4066
xeacott commentedon Oct 23, 2019
Thanks for reporting this. I skimmed the related issue and I think that is a good place to start. There may of been another recently reported Win Server 2019 issue that is also related.
whytewolf commentedon Dec 11, 2019
ZD-4399
whytewolf commentedon Dec 11, 2019
As we get more Windows 2019 users this is going to become a big problem.
xeacott commentedon Dec 20, 2019
While I wasn't able to reproduce the exact error message, I was unable to get a basic Powershell script to execute following the same state setup. However, what did work was the following, and I'll explain why.
Two likely reasons why the 1st state doesn't work.. 1. misconfigured netBIOS 2. misconfigured DNS
For example, upon setting up a 2019 Server I installed AD and promoted that machine to become a DC. I setup a forest and configure the Root domain name to be 'mydomain.local'. This acts as the domain information and the default NetBIOS name of the domain becomes 'mydomain'. Now when you add a user to active directory AND under this domain, you would traditionally log in as
mydomain\user. However, this style of [Domain name][User name] is pre-windows 2000 and, while it still works at the logon screen, the DNS may not resolve this as a valid name.In the DNS settings, under the machine name, I have a Forward Lookup Zone with a Host record of
mydomain.local, which is exactly the Root domain name. The Shorthand style is called down-level logon name, ormydomain\userand the new style is called User Principle Name, or[email protected]. In the event whenmydomain\useris lookup by active directory, it will search a domain for the user object while[email protected]will search the forest for the user object.This is where the 2 likely reasons arise. If the domain isn't resolving, it won't reach active directory. If the netBIOS isn't configured properly, it won't reach active directory. Either case will cause Powershell to exit with some error that we are returning to the user.
This is all based on my understanding of the issue at play here and potentially what's really going on, as I followed Microsoft's procedure for setting up a 2019 sever with all the bells and whistles, ran the 2nd state, and received this back.
xeacott commentedon Dec 20, 2019
I also wanted to follow up as the specific reason for why this is occurring on Window's Server 2019 and not Window's Server 2016 I haven't yet fully understood - this could be because of different configurations by the user on the 2016/2019 boxes, or Microsoft actually did change something between these releases. In any case, I'll continue to investigate this.
cburdge commentedon Dec 20, 2019
xeacott commentedon Jan 7, 2020
Hi @cburdge
I thought about this some more, investigated, etc. but without knowing the complexities of your custom environment and system it may be difficult to pinpoint.
I added documentation to Salt and while I'll close this issue, we can always reference it or re-open it in the future. :)