Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Server 2016 docker image default username/password

Is there a default user/password that the base microsoft/windowsservercore image uses?

like image 884
maxfridbe Avatar asked Oct 05 '16 14:10

maxfridbe


2 Answers

I faced the same problem when i used microsoft/iis image. You are able to connect trough IIS Manager, but you are forced to enter a password because "empty" is not valid. so what i did with both docker images was the following: i added an admin user

RUN NET USER testing "Password01!" /ADD
RUN NET LOCALGROUP "Administrators" "testing" /ADD

hope that helps you, using this method for many docker images

like image 105
Ingo B Avatar answered Oct 14 '22 15:10

Ingo B


You can login into running container with Enter-PSSession with -RunAsAdministrator command and then create user and add to administrator's group via get-command -module Microsoft.Powershell.localaccounts I put it in start up script of container and read those off values passed as environment variables which are used to start a container. This way you don't need to hardcode those values into image.

like image 38
Gregory Suvalian Avatar answered Oct 14 '22 14:10

Gregory Suvalian