When you install ElectricCommander on Windows, the installer sets up one or more Windows Services, based on which configuration you are installing. These services are set up with a user that you specify during the installation. You may find that you need to change that user later on to adapt to a changing environment. This article describes the steps that you must follow to make sure that all ElectricCommander functions will still work.
When the installer runs, it creates a Windows Service named ElectricCommander Agent. The installer sets the "Log on as:" account and password for the service and it also sets some policies to allow that user to run as a Service and to allow "user impersonation."
If you use the Windows Services application to modify the Agent Service user, a common problems is that Commander steps that use user impersonation fail, displaying a message that begins with:
...and ends with:
If want to change the "Log on as:" User and password for the Agent Service after installation, you have two choices:
- For a standalone Commander Agent*
Uninstall and reinstall the agent - this is the easiest approach for the "local" Agent installed as part of the Commander Server. You will need to set some policies for the user manually - the "Log on as:" user needs a few special permissions that are normally set by the installer program. If you change the user, you must hand configure the policies.
- For the Agent installed with the Commander Server*
- Change the policies for the new Agent user manually - the "Log on as:" user needs a few special permissions that are normally set by the installation program. If you change the user, you must hand configure the policies, according to these instructions:
- Run Control Panel | Administrative Tools | Local Security Policy
- Select "Local Policy | User Rights Assignment"
- Add the new user to these three policies:
- "Logon as a Service"
- "Replace a process level token"
- "Adjust memory quotas for a process"
- Check the directory permissions because some Commander installer versions did not set the protections correctly:
- Go to the permissions for the C:\Program Files\Electric Cloud\ElectricCommander folder
- Select Security-Advanced, and you can then check the box labeled: "Inherit from parent the permission entries that apply to child objects. Include these with entries explicitly defined here." This should get you back to what was present with the 3.0 Agent installation
The Commander Server has three Services in addition to the Agent Service
- ElectricCommander Server
- ElectricCommander Web Server
- ElectricCommander MySQL Service (if you included MySQL in your installation)
You can use the Windows Services application to change the user for the first two. No other changes are needed. You should not change the user for the ElectricCommander MySQL Service.
If you receive errors when restarting the ElectricCommander Agent, check the servicerunner.log file. Some users have reported that the agent.crt file is not readable by the new user. Changing ownership (or adding a read filesystem privilege) can resolve the message.