LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   network time in Slackware (https://www.linuxquestions.org/questions/slackware-14/network-time-in-slackware-498647/)

linuxhippy 11-04-2006 03:53 PM

network time in Slackware
 
My Slackware 11 pc loses time. It's an old pc but I replaced the motherboard watch battery and that didn't help. It loses about a minute a day...half hour a month. How do I set it up to read the time off the internet? Also, I have iptables running-which port needs to be opened up?

dunric 11-04-2006 04:11 PM

Install ntp package and add a cron job for ntpdate. See man page for more info.

hussar 11-04-2006 04:16 PM

If you have a good (non-dial-up) connection to the internet, ntpd used in conjunction with pool.ntp.org is a good option. Search the slackware forum here using "ntp" as your keyword and you'll find a thread on ntp that is fairly recent (within the last two months) and has a lot of really good info on setting up ntpd and ntp.conf.

linuxhippy 11-04-2006 08:24 PM

ok, the ntp package was installed. I searched the forums and found a thread that told me how to configure rc.local, /etc/ntp.conf, and /etc/rc.d/rc.ntpd here:

http://www.linuxquestions.org/questi...&highlight=ntp

Time gets updated now, but ntp is running as root. Is this a security vulnerability since my pc is a server and on 24/7? Could I run it as user nobody? How?

kotnik 11-05-2006 01:10 AM

Well, you can run it as non-root user, since it has -u option (check the man page) just for that.

Old_Fogie 11-05-2006 03:55 AM

Regarding root user for time protocol
 
I understand your concern about root for time server.

I believe (not sure) that the time server protocol is tcp wrapped protected by the inetd daemon; the same way that it protects the sendmail daemon for us.

I noticed this in /etc/inetd.conf file:

Quote:

# The first 4 services are really only used for debugging purposes, so
# we comment them out since they can otherwise be used for some nasty
# denial-of-service attacks. If you need them, uncomment them.
# echo stream tcp nowait root internal
# echo dgram udp wait root internal
# discard stream tcp nowait root internal
# discard dgram udp wait root internal
# daytime stream tcp nowait root internal
# daytime dgram udp wait root internal
# chargen stream tcp nowait root internal
# chargen dgram udp wait root internal
time stream tcp nowait root internal
time dgram udp wait root internal
And "netstat -elp" shows:
Quote:

tcp 0 0 *:time *:* LISTEN root 7904 2688/inetd

udp 0 0 *:time *:* root 7905 2688/inetd
So are we not covered by the tcp wrapper "inetd" to run as root? I don't know just asking, but I think this is a protected run as root server.

Please by all means, correct me if I am not accurate in my assumption here.

Fogie.


All times are GMT -5. The time now is 06:30 PM.