#665917 ntp: don't use /home/ for the users homedir

Package:
ntp
Source:
ntpsec
Submitter:
Christoph Anton Mitterer
Date:
2021-05-01 03:12:03 UTC
Severity:
normal
#665917#5
Date:
2012-03-27 00:20:27 UTC
From:
To:
Hi.

Currently the maintainer scripts set the homedir for this package to be
in /home/<username>.
As this is system user, I'd say this is rather bad style.

Could you please move this to something more reasonable and also change
it for upgraded systems?


Cheers,
Chris.

#665917#10
Date:
2012-03-27 07:04:22 UTC
From:
To:
Which script are you talking about?  I do not see the path
mentioned in any of them.

I don't see how maintair scripts need to change anything for the
upgrade in that case, either they do the right thing or don't.


Kurt

#665917#15
Date:
2012-03-27 12:15:34 UTC
From:
To:
Am 27.03.2012 09:04, schrieb Kurt Roeckx:
/var/lib/dpkg/info$ grep adduser ntp*
ntp.postinst:	adduser --system --quiet --ingroup ntp --no-create-home
ntp

While this doesn't create a directory, it sets the home dir to the
default /home/<user> in /etc/passwd:
$ grep ntp /etc/passwd
ntp:x:102:104::/home/ntp:/bin/false
Well,.. obviously they did it not "cleanly",.. to the usual way is to
clean up on upgrades, otherwise
users will stay with the old settings forever.


Cheers,
Chris.

#665917#20
Date:
2012-03-27 20:14:02 UTC
From:
To:
We could set it to /var/lib/ntp instead, but changing it on upgrade
sounds a bit hairy.

I think it's also kind of a bug in adduser that it creates system users
with a home directory under /home.

#665917#25
Date:
2012-03-27 20:34:39 UTC
From:
To:
Sounds good to me.
Well if it's really a hassle,.. let it be,...
But IMHO it shouldn't be too much of a problem:

usermod -d /var/lib/ntp

in the configure step.


The code can be dropped in wheezy+1 one,... cause only direct upgrades
are officially supported.


Not to costly, and every user get's the "current" state :)
Guess you're right,... the question is what other safe value could it
use?
Then only reasonable I can think of is something like /nonexistent/ as a
fallback when nothing is provided.
Falling back to the current /home/<system-user> is ugly, but at least it
should be "safe".


Cheers,
Chris.

#665917#30
Date:
2021-05-01 03:09:35 UTC
From:
To:
Anything new on that?

It seems fresh installations nowadays get a proper homedir, however all
legacy installations are still left out.

e.g. nfs-common.postinst shows how old installations can be easily
updated.


Cheers,
Chris