Updating MID Server Account
Overview
This guide explains how to update the username and password used by an already established MID Server using a working sequence that updates the configuration file first, then the ServiceNow user record, and finally restarts the MID Server host service.
Common reasons for updating credentials include:
- Service account password rotation
- Migration to a new service account standard
- Security remediation after an audit finding
Before You Start
Prepare these items first:
- Confirm new service account username and password
- Local administrator/root access on the MID host
- ServiceNow admin access to validate MID status after restart
- A maintenance window if the MID Server handles production workflows
Per ServiceNow documentation the MID Server goes down immediately when you save the ServiceNow user record. However, in my expierience, the MID Server remains
Up and continues to pick up jobs for a short time after the user record is updated. Either way complete the password update in the instance and the restart as quickly as possible.Update Procedure
1. Identify the MID Server and service account
- In ServiceNow, navigate to
MID Server > Servers. - Locate the MID Server you want to update.
- Note the
Logged in user,Host name, andHome directoryfields.
2. Update the user/password in the config.xml file
Complete the following steps for all MID Servers that use this service account:
- On the MID Server host, go to the
Home directory. - Open the
config.xmlfile in a text editor. - Locate the
mid.instance.usernameand/ormid.instance.passwordparameters. - For a password change, replace the encrypted value with the new password in plain text.
Note that the password being in plain text in the
config.xml file is expected. The MID Server agent encrypts the password when it reads the file, so do not be alarmed by this.Before:
<parameter name="mid.instance.password" secure="true" value="encrypted:7cHG3x8Ssx9m84qHaHlgKQ=="/>After:
<parameter name="mid.instance.password" secure="true" value="newpassword"/>Important notes:
- Delete the
encrypted:prefix. Authentication fails if this prefix remains. - Escape special XML characters. For example, use
&for&and<for<. - Do not accidentally delete the
/>at the end of the line. Removing it causes an XML parser error in the MID Server agent log. - Save the file.
- Do not restart the MID Server yet. The password change does not take effect until the final restart step.
3. Verify the service account configuration
- Go to
System Security > Users and Groups > Users. - Open the user record for the MID Server service account, which is the
Logged in userfrom Step 1. - Verify the following:
- The user has the
mid_serverrole - The user is active
- The user is not locked out
- The
User IDmatches the value in theconfig.xmlfile, case-sensitive
4. Update the password in the instance
Complete this step and the next step as quickly as possible. The MID Server goes down when you save the user record.
- In the
Passwordfield, enter the new password. Note: To be able to set the password you must fill in the password field from the list view - Select
Update.
5. Restart the MID Server
On the MID Server host, restart the MID Server service:
- Windows: use the Services control panel or MMC snap-in
- Linux: use the appropriate service command for your distribution
After the restart, the MID Server should reconnect and return to Up status.
6. Validate in ServiceNow
- Return to
MID Server > Servers. - Open the MID Server record and confirm the status has returned to
Up. - Check that the latest check-in time is current.
- Review the MID Server agent log if the server does not reconnect.
7. Test capability
Run a small Discovery or orchestration test to confirm the MID Server is processing jobs correctly.
If Authentication Fails
Use this checklist:
- Confirm the
User IDin ServiceNow matches theconfig.xmlvalue exactly - Verify the password was entered correctly in both the host file and the ServiceNow user record
- Review the MID host logs for exact login or XML parser errors
Appendix
Last updated on