Package fails to install when user already exists.

Bug #1739664 reported by Steve Wormley
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
elasticsearch (Ubuntu)
New
Undecided
Unassigned

Bug Description

We have our system pre-create users before installing packages so the UIDs match across all of our systems, however elasticsearch fails to install due to error:

Preparing to unpack .../elasticsearch_1.7.3+dfsg-3_all.deb ...
Warning: The home dir /var/lib/elasticsearch you specified can't be accessed: No such file or directory
adduser: The user `elasticsearch' already exists. Exiting.
dpkg: error processing archive /var/cache/apt/archives/elasticsearch_1.7.3+dfsg-3_all.deb (--unpack):

It appears that the problem is the preinst control file:
 if ! getent user 'elasticsearch' > /dev/null 2>&1 ; then

This should be "getent passwd"

It appears this is still present in the 1.7.5-1 version as well.

Versions:
Description: Ubuntu 16.04.3 LTS
Release: 16.04

elasticsearch:
  Installed: (none)
  Candidate: 1.7.3+dfsg-3
  Version table:
     1.7.3+dfsg-3 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

Tags: xenial
tags: added: xenial
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.