On my Ubuntu 10.04 box I (a user, not root) can issue
sudo net time set
and it works great.
I'd prefer that the box get the net time on a more regular basis, or at least each time it gets logged in. So, I tried adding net time set to /etc/profile. That fails. I added stanzas that look like
user ALL=(ALL) NOPASSWD: /usr/bin/net
to /etc/sudoers (using visudo). Didn't help.
I have never touched cron so I have no idea how to add a chron tab. (does seem oxymoronic to depend on the system time to reset the system time.)
- What is the best way to do this?
- If it's a cron job, I'd appreciate a quick example.
- Same questions but for the command service dhcp3-server restart?
(yes, my box gets its address by dhcp, but its dhcp server controls 4 gigabit enet cards attached to high speed cameras. Sometimes, at login? bootup? the dhcp server leaves me seeing only 1 camera.)
Thanks in advance.