The setroubleshootd service fails to start if information of 'setroubleshoot' user could not be read.
Issue
The setroubleshootd service fails to access its user information and reports the following error.
systemctl status setroubleshootd
○ setroubleshootd.service - SETroubleshoot daemon for processing new SELinux denial logs
Loaded: loaded (/usr/lib/systemd/system/setroubleshootd.service; static)
Active: inactive (dead)
Dec 24 03:06:11 rhel9.example.com systemd[1]: Starting SETroubleshoot daemon for processing new SELinux denial logs...
Dec 24 03:06:11 rhel9.example.com systemd[1]: Started SETroubleshoot daemon for processing new SELinux denial logs.
Dec 24 03:06:11 rhel9.example.com setroubleshoot[29851]: Traceback (most recent call last):
Dec 24 03:06:11 rhel9.example.com setroubleshoot[29851]: File "/usr/lib/python3.9/site-packages/setroubleshoot/server.py", line 793, in RunFaultServer
Dec 24 03:06:11 rhel9.example.com setroubleshoot[29851]: assure_file_ownership_permissions(database_filepath, 0o600, 'setroubleshoot')
Dec 24 03:06:11 rhel9.example.com setroubleshoot[29851]: File "/usr/lib/python3.9/site-packages/setroubleshoot/util.py", line 720, in assure_file_ownership_permissions
Dec 24 03:06:11 rhel9.example.com setroubleshoot[29851]: gid = grp.getgrnam(group)[2]
Dec 24 03:06:11 rhel9.example.com setroubleshoot[29851]: KeyError: "getgrnam(): name not found: 'setroubleshoot'"
Dec 24 03:06:11 rhel9.example.com setroubleshoot[29851]: exception KeyError: "getgrnam(): name not found: 'setroubleshoot'"
Dec 24 03:06:11 rhel9.example.com systemd[1]: setroubleshootd.service: Deactivated successfully.
- The below error is seen when the
groupinformation is not accessible or present on the system.
Jun 23 09:42:40 5rhel810.example.com setroubleshoot[3890]: Traceback (most recent call last):
Jun 23 09:42:40 5rhel810.example.com setroubleshoot[3890]: File "/usr/lib/python3.6/site-packages/setroubleshoot/server.py", line 791, in RunFa>
Jun 23 09:42:40 5rhel810.example.com setroubleshoot[3890]: assure_file_ownership_permissions(database_filepath, 0o600, 'setroubleshoot')
Jun 23 09:42:40 5rhel810.example.com setroubleshoot[3890]: File "/usr/lib/python3.6/site-packages/setroubleshoot/util.py", line 619, in assure_>
Jun 23 09:42:40 5rhel810.example.com setroubleshoot[3890]: gid = grp.getgrnam(group)[2]
Jun 23 09:42:40 5rhel810.example.com setroubleshoot[3890]: KeyError: "getgrnam(): name not found: 'setroubleshoot'"
Jun 23 09:42:40 5rhel810.example.com setroubleshoot[3890]: exception KeyError: "getgrnam(): name not found: 'setroubleshoot'"
Environment
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Enterprise Linux 10
- Setroubleshootd service
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.