Bug 2224606

Summary: grafana user is missing home directory in /etc/passwd
Product: Red Hat Enterprise Linux 8 Reporter: Jan Kurik <jkurik>
Component: grafanaAssignee: Lauren Chilton <lchilton>
Status: VERIFIED --- QA Contact: Jan Kurik <jkurik>
Severity: high Docs Contact: Jacob Taylor Valdez <jvaldez>
Priority: medium    
Version: 8.9CC: jkurik, nathans, scox
Target Milestone: rcKeywords: Bugfix, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: grafana-9.2.10-6.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Kurik 2023-07-21 16:10:18 UTC
Description of problem:
grafana user is missing home directory in /etc/passwd

Version-Release number of selected component (if applicable):
grafana-9.2.10-4.el8 and grafana-9.2.10-5.el8

How reproducible:
Always

Steps to Reproduce:
1. On RHEL-8 Install grafana-9.2.10-4.el8 or grafana-9.2.10-5.el8
# yum install -y grafana
2. Check if the home directory of the grafana user is set in the /etc/passwd
# grep grafana /etc/passwd

Actual results:
# grep grafana /etc/passwd
grafana:x:991:991:Grafana user account:/:/sbin/nologin


Expected results:
# grep grafana /etc/passwd
grafana:x:994:991:grafana user account:/usr/share/grafana:/sbin/nologin

Additional info:
The problem is in the grafana.spec file in phase '%pre', where the systemd-sysusers command is not provided with the home directory.