elastic / elastic/logstash

rpm removal: Error in PREUN scriptlet in rpm package 1:logstash-5.4.1-1.noarch

Open
#7,473 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
19h 14m
Merged PRs (30d)
63

Description

- Version: 5.4.1-1
- Operating System: RHEL 7
- Config File (if you have sensitive info, please remove it): n/a
- Sample Data: n/a
- Steps to Reproduce:
1. Create the user and group logstash in an external user directory (e.g., ldap)
2. Install logstash using rpm or yum
3. Uninstall logstash using rpm or yum

The following error is generated:

[root@ha21t52bd ~]# rpm -e logstash
userdel: cannot remove entry 'logstash' from /etc/passwd
groupdel: cannot remove the primary group of user 'logstash'
error: %preun(logstash-1:5.4.1-1.noarch) scriptlet failed, exit status 8
error: logstash-1:5.4.1-1.noarch: erase failed

Most rpm's rely on useradd/userdel to add/remove users and handle external users without issue. There are rare exceptions where a specific uid/gid are required where this is not the case (squid) because there are configuration references that expect a certain uid or gid value.

In the even logstash is installed with an external user/group, uninstallation requires the removal or external user/group entries, then a reinstallation of logstash.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.