[pkg-ntp-maintainers] Bug#655515: ntp: NTP postinstall script fails

Michael Stapelberg michael+db20090501 at stapelberg.de
Sat Mar 10 16:16:07 UTC 2012


Hi Martin,

Excerpts from Martin Eichenberg's message of 2012-03-09 21:58:27 +0100:
> ~# grep ntp /etc/passwd
> ntp:x:114:114::/home/ntp:/bin/false
> ntpd:x:5014:107::/home/ntpd:/bin/flase
> ~# grep ntp /etc/group 
> ntpd:x:107:
> ntp:x:5021:
The high group id seems to be the problem here.

Note that there is a mismatch: Your /etc/passwd says ntp has the uid 114 and
gid 114, however in /etc/group, the group 'ntp' has gid 5021. I’m not sure why
that is. You could do 'grep 114 /etc/group' and see which group 114 is on your
system.

Also, try the following:
# addgroup --system ntp
(dpkg tries addgroup --system --quiet ntp, which is why you don’t get a proper
 error message in this case :-/. See line 8223 of your strace output.)

This will probably complain and say:
addgroup: The group `ntp' already exists and is not a system group. Exiting.

A way to fix this is to change the gid of the ntp group back to 114, if 114 is
available. If 114 is taken by any other group, delete the entry 'ntp:x:5021:'
from your /etc/group and run addgroup --system ntp. Afterwards, you should find
all files which belong to ntp on your system and fix their group, if necessary:

# find / -uid 114

On my system, all files which are owned by ntp also have gid ntp, and those are
the following paths:

/var/log/ntpstats
/var/lib/ntp
/var/lib/ntp/ntp.drift

Best regards,
Michael





More information about the pkg-ntp-maintainers mailing list