addgroup is a perl script, so you can inspect it to see what's going on. You can get additional information about the error running with:
sudo VERBOSE=1 addgroup --system ntp
I think what we're seeing is that your ntp group is a user group (gid >= 1000) instead of a system group (gid < 1000).
From your output above, it looks like you're hitting this logic:
if ($action eq "addsysgroup") {
# Check if requested group already exists and we can exit safely
my $ret = existing_group_ok($new_name, $new_gid);
if ($ret == 3) {
print STDERR "$0: " if $verbose;
printf STDERR (gtx("The group `%s' already exists as a system group. Exiting.\n"), $new_name) if $verbose;
exit RET_OK;
}
if ($ret == 1) {
print STDERR "$0: " if $verbose;
printf STDERR (gtx("The group `%s' already exists and is not a system group. Exiting.\n"), $new_name) if $verbose;
exit RET_OBJECT_ALREADY_EXISTS;
}
So, you're exiting 1 due to the gid of group ntp being > 1000. The fix here would be to apt-get remove --purge ntp ; the --purge flag will trigger the ntp.postrm script to remove the group first. Then when you re-install, it will install the ntp group with --system flag and allocate a GID under <1000.
addgroup is a perl script, so you can inspect it to see what's going on. You can get additional information about the error running with:
sudo VERBOSE=1 addgroup --system ntp
I think what we're seeing is that your ntp group is a user group (gid >= 1000) instead of a system group (gid < 1000).
From your output above, it looks like you're hitting this logic:
if ($action eq "addsysgroup") {
# Check if requested group already exists and we can exit safely group_ok( $new_name, $new_gid);
my $ret = existing_
if ($ret == 3) {
print STDERR "$0: " if $verbose;
printf STDERR (gtx("The group `%s' already exists as a system group. Exiting.\n"), $new_name) if $verbose;
exit RET_OK;
}
if ($ret == 1) { ALREADY_ EXISTS;
print STDERR "$0: " if $verbose;
printf STDERR (gtx("The group `%s' already exists and is not a system group. Exiting.\n"), $new_name) if $verbose;
exit RET_OBJECT_
}
So, you're exiting 1 due to the gid of group ntp being > 1000. The fix here would be to apt-get remove --purge ntp ; the --purge flag will trigger the ntp.postrm script to remove the group first. Then when you re-install, it will install the ntp group with --system flag and allocate a GID under <1000.
See if that helps you moving forward.