1

I am dealing with this issue for the past 4 years and it bugs me very much.

  1. My company generates msi installers with wix toolset, and they create multiple Windows services. Those services run with an AD service user + password. The services are created with the user and a "password" I enter in the installer UI, but always fail to start. The first service to start is stuck in "starting" status.

Eventually it will lock the service user down, just as if the password was incorrect. I guarantee the password I type in the msi UI is correct.

So, during installation while the first service is starting, I simply open that service and update the password under Log On tab and save, and magically, it starts and all the other services start too. WHY? Why do I have to change the password one one service only to get the others working?

  1. The problem is the same if I let the installer create services with LocalSystem, they will start just fine. Then I would update them with the service user and password with sc config, as we all do. They will fail to start, in the same way, all of them. Until I update the password of ONE of them, then they will all start.

What am I doing wrong? What can explain this behavior?

EDIT: the AD service user indeed has login-as-service permissions or the service would never start EDIT: The first time it fails to start, event log shows: "The xyz Service service was unable to log on as DOMAIN\username with the currently configured password due to the following error: Logon failure: the user has not been granted the requested logon type at this computer."

subsequent errors are all the same: "The xyz Service service failed to start due to the following error: The service did not start due to a logon failure."

5
  • 1
    Any errors in the event log? Sometimes an account also needs to be added to the logon-as-service option in the group policy Commented Sep 16, 2023 at 1:55
  • I agree to that, while changing the password, windows verify that the user is in that group from above Commented Sep 16, 2023 at 9:59
  • yes there is as many errors in the event log as times the service fails to start: "The xyz Service service failed to start due to the following error: The service did not start due to a logon failure." The first error is: "The xyz Service service was unable to log on as DOMAIN\username with the currently configured password due to the following error: Logon failure: the user has not been granted the requested logon type at this computer." Commented Sep 21, 2023 at 2:53
  • When you change the executing user in the services.msc UI, Windows tends to do some more things in the background compared to when you configure it on the CLI Commented Sep 21, 2023 at 5:53
  • I would agree that the msi installer does something that I don;t know, that seems incorrect when defining the services. I will close this question as I cannot get the msi script itself. Thank you everyone for your input! Commented Dec 2, 2023 at 19:03

1 Answer 1

0

Just going to link this as far as the logon rights error goes,

https://learn.microsoft.com/en-us/troubleshoot/windows-server/system-management-components/service-startup-permissions

Are the services dependent on one another?

Do you know that there isn't a syntax or string interpretation issue? You could try creating the service or setting the service credential via powershell in a couple different methods, but you seem to indicate after the first service starts the rest start successfully without updating the credential.

Try using the UPN format username@domain instead as sometimes there are issues with Domain\Username .

1
  • thank you so much for taking the time to read and answer. I have no doubt that the problem comes from the dev teams' implementation of the msi script. It's just baffling that no service would start with logon error, until you update the logon on only one of them, then they would all start. Commented Dec 2, 2023 at 19:02

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.