Closed AlexRuiz7 closed 10 months ago
After adding the folder, the user is still not getting created:
Setting up wazuh-indexer (4.9.0) ...
/usr/lib/tmpfiles.d/wazuh-indexer.conf:1: Failed to resolve user 'wazuh-indexer': No such process
Scanning processes...
Scanning linux images...
Running kernel seems to be up-to-date.
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
N: Download is performed unsandboxed as root as file '/root/wazuh-indexer-4.9.0-1_amd64_8f716057590.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
root@pkg-tests-ubuntu2204:~#
Looks like rpm
packages handle this through wazuh-indexer.rpm.spec
:
fede@tyner:~/src/wazuh-indexer (101-wazuh-indexer-user-doesnt-exist)$ sed -n '100,105p' distribution/packages/src/rpm/wazuh-indexer.rpm.spec
# Create user and group if they do not already exist.
getent group %{name} > /dev/null 2>&1 || groupadd -r %{name}
getent passwd %{name} > /dev/null 2>&1 || \
useradd -r -g %{name} -M -s /sbin/nologin \
-c "%{name} user/group" %{name}
exit 0
It seems debmake
ignores the existing contents of the debian
folder:
https://www.debian.org/doc/manuals/debmake-doc/ch04.en.html
Package installation throws a warning whenever systemd-sysctl.service
cannot be restarted by postinst
on certain platforms (tested on Vagrant with a generic/ubuntu2204
box instance).
However this happens with OpenSearch's packages as well:
postinst
is checking only whether systemctl
exists before it goes ahead and tries to restart the systemd-sysctl
service:
fede@tyner:~/src/wazuh-indexer (101-wazuh-indexer-user-doesnt-exist)
$ sed -n '35,42p' distribution/packages/src/deb/debian/postinst
# Reload other configs
if command -v systemctl > /dev/null; then
systemctl restart systemd-sysctl.service || true
fi
if command -v systemd-tmpfiles > /dev/null; then
systemd-tmpfiles --create wazuh-indexer.conf
fi
Description
Related issue: https://github.com/wazuh/wazuh-indexer/issues/99
The installation of the
deb
packages fail, caused by thewazuh-indexer
user not being created.