sous-chefs / ntp

Development repository for the ntp cookbook
https://supermarket.chef.io/cookbooks/ntp
Apache License 2.0
68 stars 150 forks source link

cannot determine user id for 'ntp', does the user exist on this system? #247

Open randyrue opened 4 months ago

randyrue commented 4 months ago

Looks like for Ubuntu 24.04 LTS server the ntp service runs as the user "ntpsec" instead of the previous "ntp"

Running handlers: [2024-05-02T15:03:04+00:00] ERROR: Running exception handlers Running handlers complete [2024-05-02T15:03:04+00:00] ERROR: Exception handlers complete Infra Phase failed. 0 resources updated in 06 seconds [2024-05-02T15:03:04+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out [2024-05-02T15:03:04+00:00] FATAL: --------------------------------------------------------------------------------------- [2024-05-02T15:03:04+00:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT [2024-05-02T15:03:04+00:00] FATAL: --------------------------------------------------------------------------------------- [2024-05-02T15:03:04+00:00] FATAL: Chef::Exceptions::UserIDNotFound: directory[/var/lib/ntp] (ntp::default line 71) had an error: Chef::Exceptions::UserIDNotFound: cannot determine user id for 'ntp', does the user exist on this system?

rurku commented 3 months ago

Indeed, looks like not only the user changed but also some of the paths My temporary workaround is setting these attributes

"ntp": {
  "var_owner": "ntpsec",
  "var_group": "ntpsec",
  "conffile": "/etc/ntpsec/ntp.conf",
  "varlibdir": "/var/lib/ntpsec",
  "statsdir": "/var/log/ntpsec/"
},