Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions distribution/packages/src/common/scripts/preinst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ case "$1" in
adduser --quiet \
--system \
--no-create-home \
--home /nonexistent \
--ingroup elasticsearch \
--disabled-password \
--shell /bin/false \
Expand All @@ -50,8 +51,9 @@ case "$1" in
# Create elasticsearch user if not existing
if ! id elasticsearch > /dev/null 2>&1 ; then
echo -n "Creating elasticsearch user..."
useradd -r \
-M \
useradd --system \
--no-create-home \
--home-dir /nonexistent \
--gid elasticsearch \
--shell /sbin/nologin \
--comment "elasticsearch user" \
Expand Down
2 changes: 2 additions & 0 deletions qa/vagrant/src/test/resources/packaging/utils/packages.bash
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ verify_package_installation() {
id elasticsearch

getent group elasticsearch
# homedir is set in /etc/passwd but to a non existent directory
assert_file_not_exist $(getent passwd elasticsearch | cut -d: -f6)

assert_file "$ESHOME" d root root 755
assert_file "$ESHOME/bin" d root root 755
Expand Down