Question : SC command for changing service passwords isn't working correctly.

I'm installing Apache on Server 2003, but I have found that I need to have the Apache service running as the administrator for some of my web services to work properly.  I'm automating my install for my web servers and I have everything working except for changing the log on as for the Apache2 service.  The command that I'm running is: sc config Apache2 obj= .\administrator password= password type= own.  The command returns a success, but if I try and start the service I get the error:
System error 1069 has occurred.
The service did not start due to a logon failure.

If I manually set the password in the GUI, everything works fine.  If I set the wrong password in the GUI and then run the command, everything works fine.  It appears that my issue is only for the first time trying to set the service from using the administrator logon instead of local service.  Any help would be great.

Thank you.

Answer : SC command for changing service passwords isn't working correctly.

Your command looks to be fine.

Can you check whether the Administrator has the Log on as a service right?

Start - Run - secpol.msc

Local Policies - User Rights Assignment  - Log on as a service
Random Solutions  
 
programming4us programming4us