Public bug reported:

I work in an enterprise environment where usernames are decided
centrally. A user has been given the user name 'ntp'. I need to be able
to tell the ntp package to use a different username, but the install
script assumes that the ntp:ntp user/group is available and valid.

At a minimum, this code needs to accept a configured username variable
instead of hard-coding ntp.

if [ "$1" = "configure" ]; then
        addgroup --system --quiet ntp
        adduser --system --quiet --ingroup ntp --no-create-home ntp
        chown -R ntp:ntp /var/lib/ntp /var/log/ntpstats
fi

Additional requested information:

1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> 
About Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:        14.04

2) The version of the package you are using, via 'apt-cache policy pkgname' or 
by checking in Software Center
apt-cache policy ntp
ntp:
  Installed: 1:4.2.6.p5+dfsg-3ubuntu2.14.04.13
  Candidate: 1:4.2.6.p5+dfsg-3ubuntu2.14.04.13
  Version table:
 *** 1:4.2.6.p5+dfsg-3ubuntu2.14.04.13 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 
Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 
Packages
        100 /var/lib/dpkg/status
     1:4.2.6.p5+dfsg-3ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

3) What you expected to happen
I expected the package to install

4) What happened instead
Installation fails because the user 'ntp' already exists.

Setting up ntp (1:4.2.6.p5+dfsg-3ubuntu2.14.04.13) ...
adduser: The user `ntp' already exists. Exiting.
dpkg: error processing package ntp (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 ntp
E: Sub-process /usr/bin/dpkg returned an error code (1)

** Affects: ntp (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1783175

Title:
  Install fails when 'ntp' user already exists

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/1783175/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to