How does the user running chronyd get set?

General support questions
Post Reply
sawozny
Posts: 48
Joined: 2019/07/13 22:19:14

How does the user running chronyd get set?

Post by sawozny » 2019/07/23 20:28:40

The subject sort of says it all. How does the user running the chronyd service get set in Centos 7? When I do a 'ps -aux | grep chronyd' I see the chrony user is running /usr/sbin/chronyd, which is what I want, but my understanding of how that's set is with a -u <username> in the OPTIONS field in /etc/sysconfig/chronyd. However, on my system (7.6 min install), that file has OPTIONS="" so, in the absence of magic, I don't know how the user running the service got set. Does anyone here know where else I should look or is it an undocumented default I'll never find a file for? I looked through /etc/chrony.conf and /usr/libexec/chrony-helper and couldn't find anything that stood out.

I tried searching for this in the forums, but there are a LOT of posts with chronyd and user in them, so it's hard to pin down; therefore I apologize in advance if this has been asked and answered.

Thanks,

Scott

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How does the user running chronyd get set?

Post by TrevorH » 2019/07/23 21:46:11

Run man chrony.conf and search for "user user"
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

sawozny
Posts: 48
Joined: 2019/07/13 22:19:14

Re: How does the user running chronyd get set?

Post by sawozny » 2019/07/24 16:52:07

Thanks very much for the reply. Unfortunately, cat /etc/chrony.conf | grep user returns nothing so it's not being set there. As the man page says the compiled-in default value is root, I did a sudo find / -name chrony.conf to see if there might be another config file somewhere else, but the only filename I got back was /etc/chrony.conf. Do you think the default might have been overridden and set at compile time (this is a minimal install so I don't think the source is on this machine)? If so, where can I look to validate that?

Thanks,

Scott

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How does the user running chronyd get set?

Post by TrevorH » 2019/07/24 16:56:52

As the man page says the compiled-in default value is root
Not in my man page it doesn't:
The compiled-in default value is chrony.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

sawozny
Posts: 48
Joined: 2019/07/13 22:19:14

Re: How does the user running chronyd get set?

Post by sawozny » 2019/07/24 17:26:14

Wow! Well, today was a good day to learn something new. Until 10 minutes ago, I didn't know how to search man pages in-system and since they're almost always available online, I didn't think I every needed to. I got the statement that the compiled in value was root from what I thought was the horse's mouth at https://chrony.tuxfamily.org/doc/3.2/chrony.conf.html but you're absolutely right that on an installed CentOS 7 system the man page is different and that the compiled in value is chrony. I won't make that mistake again! :)

Thanks for the lesson. :)

Scott

Post Reply