In this case my error looked something like:
"The Tomcat6 service was unable to log on..." This service account does not have the necessary user right "Log on as a service."
Because I was running Tomcat6 on an active directory domain controller (windows server 2003) I was unable to grant “Log on as a service” rights.
The FIX:
Run the service as “NT AUTHORITY\NetworkService” (no quotes) with a blank password.
Even after following the recommend options by Microsft Technet Article http://technet.microsoft.com/en-us/library/cc739424%28WS.10%29.aspx Nothing would work (full text of article below), however User “NT AUTHORITY\NetworkService” worked right away.
Updated: August 22, 2005
Applies To: Windows Server 2003 R2
Add the Log on as a service right to an account
- Open Local Security Policy.
- In the console tree, double-click Local Policies, and then click User Rights Assignments.
- In the details pane, double-click Log on as a service.
- Click Add User or Group, and then add the appropriate account to the list of accounts that possess the Log on as a service right.
To add the “Log on as a service” right to an account for a Group Policy object, when you are on a workstation or server that is joined to a domain
- Click Start, point to Run, type mmc, and then click OK.
- On the File menu, click Add/Remove Snap-in.
- In Add/Remove Snap-in, click Add, and then, in Add Standalone Snap-in, double-click Group Policy Object Editor.
- In Select Group Policy Object, click Browse, browse to the Group Policy object (GPO) that you want to modify, click OK, and then click Finish.
- Click Close, and then click OK.
- In the console tree, click User Rights Assignment.
Where?
- GroupPolicyObject [ComputerName] Policy
- Computer Configuration
- Windows Settings
- Security Settings
- Local Policies
- User Rights Assignment
- In the details pane, double-click Log on as a service.
- If the security setting has not yet been defined, select the Define these policy settings check box.
- Click Add User or Group, and then add the appropriate account to the list of accounts that possess the Log on as a service right.
To add the “Log on as a service” right to an account for a Group Policy object, when you are on a domain controller or on a computer that has the Windows Server 2003 Administration Tools Pack installed
- Open Active Directory Users and Computers.
- In the console tree, right-click the domain or organizational unit (OU) for which you want to edit security settings.
- Click Properties, and then click the Group Policy tab.
- In Group Policy Object Links, click the Group Policy object for the domain or OU for which you want to edit security settings, and then click Edit.
- In the console tree, click User Rights Assignment.
Where?
- GroupPolicyObject [ComputerName] Policy
- Computer Configuration
- Windows Settings
- Security Settings
- Local Policies
- User Rights Assignment
- Double-click Log on as a service in the details pane.
- If this security setting has not yet been defined, select the Define these policy settings check box.
- Click Add User or Group, and then add the appropriate account to the list of accounts that possess the Log on as a service right.
To add the “Log on as a service” right to an account for only domain controllers, when you are on a domain controller
- Open Domain Controller Security Policy.
- In the console tree, click User Rights Assignment.
Where?
- Security Settings
- Local Policies
- User Rights Assignment
- In the details pane, double-click Log on as a service.
- If this security setting has not yet been defined, select the Define these policy settings check box.
- Click Add User or Group, and then add the appropriate account to the list of accounts that possess the Log on as a service right.
Notes
- To open Local Security Policy, click Start, point to Control Panel, point to Administrative Tools, and then double-click Local Security Policy.
- To open Domain Controller Security Policy, click Start, point to All Programs, point to Administrative Tools, and then click Domain Controller Security Policy.
- When you change a security setting, that setting will take effect in the next refresh of settings.
- The security settings are refreshed every 90 minutes on a workstation or server and every 5 minutes on a domain controller. The settings are also refreshed every 16 hours, whether or not there are any changes.