We are building a Windows Docker container which installs an application software on top on it which requires Administrator access. But as per Docker requirement we can install application software which is either an runs as Local System or Network Service
“
Windows Active Directory (AD) domains natively support both password and certificate authentication. When you build your application or service on a Windows domain-joined host, it uses the identity of the host by default if run as Local System or Network Service. Otherwise, you may configure another AD account for authentication instead
“
Is there a way to install the application software with Administrator privilege?.
When we tried to install the application software we are getting the below error
"Windows service start failed Error: 1053 I am trying to start the service using localSystem account but it is giving error- The service did not start or respond in a timely manner. "
Are you trying to do user -> service or service -> service authentication and authorization with Active Directory? If not, then that doc doesn’t apply.
Services can run as LocalSystem or Network Service no matter what. I think that the service is failing to start for other reasons, so I recommend looking closer at logs or putting a remote debugger in the container to attach to the service process and figure out why its hanging. From there you can debug the same way as if it’s on a VM.
Have you confirmed that Postgres starts and is running as a first step? I think it would be good to verify one service at a time.
Postgres has installed fine and were able to connect to the database. Our services doesn’t execute on LocalSystem or Network Service , it executes on the local User or the Install Owner username and the domain of the User. We haven’t tried putting a remote debugger but instead we wrote a program to create service and kick it off
SERVICE_STATUS_PROCESS status;
schService = CreateService(
schSCManager, // SCManager database
lpszServiceName, // name of service
lpszDisplayName, // service name to display
SERVICE_ALL_ACCESS, // desired access
SERVICE_WIN32_OWN_PROCESS, // service type
SERVICE_AUTO_START, // start type
SERVICE_ERROR_NORMAL, // error control type
lpszBinaryPathName, // service’s binary
NULL, // no load ordering group
NULL, // no tag identifier
NULL, // no dependencies, for real telnet there are dependencies lor
NULL, // LocalSystem account
NULL); // no password
if (schService == NULL)
{
printf("CreateService() failed, error: %ld\n", GetLastError());
return FALSE;
}
BOOL b = false;
try
{
b = StartService(schService, NULL,NULL);
"Windows service start failed Error: 1053 I am trying to start the service using localSystem account but it is giving error- The service did not start or respond in a timely manner. "