How to configure a systemd service in RHEL7 to run as a custom user or group

Solution Verified - Updated -

Issue

  • How can I configure a systemd service in Red Hat Enterprise Linux (RHEL) 7 to run as a custom user or group?
  • How to run services in RHEL7 under a non-standard user?
  • How to change user or group of systemd service unit?

Environment

  • Red Hat Enterprise Linux 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.