Create and Configure a Linux Service Account for ServiceNow MID ServerIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } By default, some administrators run the ServiceNow MID Server process as the root user on Linux servers. This introduces unnecessary security risks and violates the principle of least privilege. A dedicated service account should be created for the MID Server to: Isolate the service from root privilegesControl ownership and permissions of MID Server filesAllow better auditing and accountability Unlike Windows, Linux does not have a "Log on as a service" setting. Instead, you must configure a non-root service account and run the MID Server as a systemd-managed service under that account. Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } ALL Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } On Linux, the ServiceNow MID Server runs as a background service (systemd unit or older init.d script). You create a dedicated Linux user (e.g., midserver) to run the service, instead of root, for security and isolation.Steps to Create a Service Account for MID Server on Linux1. Create a Dedicated User:sudo useradd -r -m -d /opt/midserver -s /bin/bash midserver-r → creates a system account-m -d /opt/midserver → home directory for the MID Server-s /bin/bash → shell assigned (optional; can also be /usr/sbin/nologin if you don't want interactive shell access)Set a password only if interactive login is needed: sudo passwd midserver2. Assign Directory Permissions: Extract or install the MID Server software under /opt/midserver. Make sure the user owns the directory:sudo chown -R midserver:midserver /opt/midserver3. Configure Systemd Service File. Create a service file:/etc/systemd/system/midserver.service[Unit]Description=ServiceNow MID ServerAfter=network.target[Service]Type=simpleUser=midserverGroup=midserverExecStart=/opt/midserver/agent/bin/mid.shRestart=on-failureRestartSec=10[Install]WantedBy=multi-user.targetReload systemd and enable the service:=====================================sudo systemctl daemon-reloadsudo systemctl enable midserversudo systemctl start midserver4. Verify the Service; Check if the MID Server runs under the correct user: ps -ef | grep midserverYou should see the midserver user, not root.5. Do not run the MID Server as root unless explicitly required (security best practice). The midserver user only needs access to its installation directory and any OS/network permissions required for Discovery/Orchestration (sudoers entries can be added case-by-case).If you need privileged commands (e.g., sudo for certain patterns), configure /etc/sudoers.d/midserver with least-privilege rules:To improve security, this procedure installs and run the MID Server service as a non-root user. Root privilege is required to deploy and configure a MID Server on a Linux server. A non-root user can manage a service only if they have the required permissions. For more details, see PolicyKit issues with Linux MID Servers using non-admin accounts [KB0815542]KB0815542: PolicyKit issues with Linux MID Servers using non-admin accounts Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Install a MID Server on Linux: https://www.servicenow.com/docs/bundle/yokohama-servicenow-platform/page/product/mid-server/task/t_InstallAMIDServerOnLinux.html#title_linux-silent-install