Powershell Console for Windows, run as Administrator #9355
Replies: 9 comments
-
Can't you just specify |
Beta Was this translation helpful? Give feedback.
-
As we're limited by the Docker API usage here, we need to figure out how this can be done via the Docker API (check if it's available when using the Docker CLI as well). |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@ncresswell I have just tried to run as Administrator and ended up with ContainerAdministrator : |
Beta Was this translation helpful? Give feedback.
-
@yassirh On Windows Server 2016 and its Docker images default is ContainerAdministrator but on semi-annual channel versions 1709 and 1803 and on just released Windows Server 2019 ContainerUser is default. So probably it would be good idea to fix this now when more and more uses will start migrate to Windows Server 2019 and see this issue. EDIT: It is also possible to change user on Dockerfile like we do with Portainer https://github.com/portainer/portainer/blob/develop/build/windows/nanoserver/Dockerfile#L3 but that should be only used with containers which really need it. |
Beta Was this translation helpful? Give feedback.
-
@yassirh I did some more testing with this. By writing username ContainerAdministrator to user field works fine so it can be set as a default for Windows but we need implement Windows version checking to this one because Windows Server 2016 does not support to specify username even on docker exec command and starting console will fail if on that scenario. |
Beta Was this translation helpful? Give feedback.
-
This issue has been marked as stale as it has not had recent activity, it will be closed if no further activity occurs in the next 7 days. If you believe that it has been incorrectly labelled as stale, leave a comment and the label will be removed. |
Beta Was this translation helpful? Give feedback.
-
Since no further activity has appeared on this issue it will be closed. If you believe that it has been incorrectly closed, leave a comment and mention @itsconquest. One of our staff will then review the issue. |
Beta Was this translation helpful? Give feedback.
-
Re-opening this as it should not be closed |
Beta Was this translation helpful? Give feedback.
-
When starting the Powershell Console of a Windows Server Core Container, the session is started in "user context", which means you are unable to run any privileged actions. You cannot elevate to Administrator from within Powershell.
We need to find a way to start powershell with elevated permissions
Beta Was this translation helpful? Give feedback.
All reactions