Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 719876 - net-misc/chrony does not create ntp user
Summary: net-misc/chrony does not create ntp user
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-04-28 02:35 UTC by Tom Poplawski
Modified: 2020-05-02 10:43 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Poplawski 2020-04-28 02:35:18 UTC
fresh gentoo install. net-misc/chrony-3.5-r2 was latest stable version and installed but failed to start.
[quote]
 * Starting chronyd ...
 * start-stop-daemon: failed to start `/usr/sbin/chronyd'
 * Failed to start chronyd                                                                                                                                                                                                            [ !! ]
 * ERROR: chronyd failed to start
[/quote]

Noticed ntp user wasn't created yet. checked newer versions which change whether ntp user is needed or not but no newer ebuild actually creates ntp user.  Checked opennntp for comparison and it seems chrony needs

[quote]
	enewgroup ntp
	enewuser ntp -1 -1 "${NTP_HOME}" ntp
[/quote]

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-04-28 02:36:59 UTC
The newer ebuilds actually depend on an ntp user. The problem is the path to the config is wrong.

I'll fix this as I caused it.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-04-28 02:38:23 UTC
(In reply to Sam James (sec padawan) from comment #1)
> The newer ebuilds actually depend on an ntp user. The problem is the path to
> the config is wrong.
> 

As a workaround, modify /etc/conf.d/chronyd to drop the '-u ntp -F 1'.
Comment 3 Tom Poplawski 2020-04-28 18:23:54 UTC
Thanks for working on this!

So your going to use the enewuser command to add the ntp user in the ebuilds?

Otherwise, if chrony is the first time daemon installed it will still fail without the ntp user in fresh, clean gentoo installs right?  Isn't that why other daemons such as openntp create the user ntp in their ebuilds?
Comment 4 Larry the Git Cow gentoo-dev 2020-05-02 10:43:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3d88f854528be87d8bb689c5dc456a3aab2d64f

commit c3d88f854528be87d8bb689c5dc456a3aab2d64f
Author:     Sam James (sam_c) <sam@cmpct.info>
AuthorDate: 2020-04-19 20:54:06 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-05-02 10:43:27 +0000

    net-misc/chrony: Fix paths to config file
    
    OpenRC only; systemd unaffected by issue.
    New "capsified" versions will use new config file, current stable
    chrony now has a fixed file.
    
    Revbump is complicated here given -r3, ..., already exists.
    This should not have affected many users so this seems like
    the simplest solution.
    
    Closes: https://bugs.gentoo.org/719876
    Signed-off-by: Sam James (sam_c) <sam@cmpct.info>
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 net-misc/chrony/chrony-3.5-r4.ebuild      |  2 +-
 net-misc/chrony/chrony-4.0_pre1-r2.ebuild |  2 +-
 net-misc/chrony/chrony-4.0_pre2-r1.ebuild |  2 +-
 net-misc/chrony/chrony-9999.ebuild        |  2 +-
 net-misc/chrony/files/chronyd.conf        |  2 +-
 net-misc/chrony/files/chronyd.conf-r1     | 12 ++++++++++++
 6 files changed, 17 insertions(+), 5 deletions(-)