Raspberry Pi Arch Linux: Another thing I have learned. NTPd

by on Apr.16, 2014, under Electronic Projects, Raspberry Pi

A quick post.

NTPd service should not be installed as root. Specially if you want to run it as a daemon.
Make sure you install from a less user.

So install ntpd like so:
sudo pacman -S ntp

Enable the systemd:
sudo systemctl enable ntpd

sudo nano /etc/conf.d/ntpd.conf
NTPD_ARGS=”-g -i /var/lib/ntp -u ntp:ntp”

sudo nano /etc/ntp.conf 
#driftfile /var/lib/ntp/ntp.drift
driftfile /ntp.drift

Now configure the chroot environment:

mkdir /var/lib/ntp/etc /var/lib/ntp/lib /var/lib/ntp/proc
touch /var/lib/ntp/etc/resolv.conf /var/lib/ntp/etc/services

sudo nano /etc/fstab
#ntpd chroot mounts
/etc/resolv.conf /var/lib/ntp/etc/resolv.conf none bind 0 0
/etc/services /var/lib/ntp/etc/services none bind 0 0
/lib /var/lib/ntp/lib none bind 0 0
/proc /var/lib/ntp/proc none bind 0 0

Reboot or run this:
sudo systemctl restart ntpd

Leave a Reply

You must be logged in to post a comment.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...