RE: Service account and logon as service permission.
From: Kevin Burton (KevinBurton_at_discussions.microsoft.com)
Date: Wed, 3 Nov 2004 12:58:03 -0800
This is a domain account call it PPC\test. The ChangeServiceConfig seems to
work so the user name and password are correctly entered into the service
database. But I still get a logon failure. I have added PPC\test to the
"logon as service" for the domain policy. This is why when I run the Services
MMC and go to the Log on tab and change the user and password I get a message
box that says that PPC\test has been granted "logon as service" permission.
Is what I want to happen is for this to happen automatically without the need
to go to the MMC. Do I need to modify the domain policy, local policy (the
local machine where the service is running)? If so how? I have successfully
been able to get a policy handle for the local machine but the domain account
PPC\test can't be found when I try to enumerate the rights.(although I can
get a SID for this account)
"Kevin Burton" wrote:
> I will start here. Please redirect me if there is another group that is more
> appropriate for my question.
> I am trying the change the account under which some services run using the
> ChangeServiceConfig method. This seems to effectively change the user and
> password for the service but when I try to start the service I get a logon
> failure most likely because I do not have the 'logon as service' permission.
> If I go to the MMC for services and on the Log On tab type in the user and
> password I get a message box indicating that the user has been granted the
> 'logon as service' permission. How can I make sure this 'logon as service'
> permission is granted like it is for the MMC (hopefully without the need for
> the message box)?
> Thank you.
> Kevin Burton