12

I am a little confused when it comes to the users with Docker. When I run a Windows Container (e.g. microsoft/windowsservercore) and I type in whoami I get the following response

user manager\containeradministrator

But when running net user within the container I don't see any containeradministrator but rather only

-------------------------------------------------------------------------------
Administrator            DefaultAccount           Guest

So what user is this conataineradministrator in the end and what permissions does he have? Does he belong to a user group?

papanito
  • 275
  • 1
  • 3
  • 11

1 Answers1

3

'Net User' is being called from the HOST ( Windows itself not the container ) hence the Administrator only in the 'whoami'

'whoami' INSIDE the container is the container's equal which only has Admin rights INSIDE the container and things inside/acting inside the container.

linuxdev2013
  • 1,301
  • 11
  • 21
  • Unfortuantely there are certain cases where permissions are different between Builtin\Administrator and manager\containeradministrator - https://social.msdn.microsoft.com/Forums/Lync/en-US/f426f708-a8fa-41a0-ac4c-4cacf48b1153/run-windows-2016-docker-container-as-administrator?forum=windowscontainers – jrbe228 Feb 19 '22 at 00:48