Re: using the date command
On Sun, Sep 30, 2007 at 07:54:48PM -0700, jekillen wrote: > > > >The removal of ntpdate is something I'll believe in when it happens. > >ntpd -q is a superior drop-in replace for ntpdate when it's being run > >from cron. OTOH if you run ntpd -q in place of ntpdate at boot (before > >starting ntpd), it adds about 15 seconds to the boot-time for no > >significant benefit. Heheh! The threats do seem somewhat hollow these days... > > Thanks for the info. > So ntp, as I understand it, has to have time servers to reference, and > of course > the system has to be connected to the public network to contact the > time servers. > Are there any security issues with ntp? Or, where can I find info on > security issues > related to ntp? > Update on original question related to the use of date in FreeBSD; I > finally brightened > up and set the time in the bios. > Jeff K Provided you use sensible settings in your ntp.conf, you should come to no harm using ntpd. Something like this works well for me: driftfile /var/db/ntp.drift restrict default ignore restrict 127.0.0.1 server ip.ad.dre.ss restrict ip.ad.dre.ss nomodify notrap nopeer noquery restrict 10.37.125.0 mask 255.255.255.0 nomodify notrap This config tells ntpd to use ip.ad.dre.ss as its synchronisation host, and to restrict that host so that it cannot make any alterations to the local machine's clock or to the state of the running ntpd. It also says to allow hosts on my private network to synchronise against it, but again, to prevent them from making any changes to the state of the nptd on the server. There are many more options that may or may not be interesting - check out www.ntp.org for plenty of useful information about configuring ntpd and selecting a suitable set of synchronisation servers. Dan -- Daniel Bye PGP Key: http://www.slightlystrange.org/pgpkey-dan.asc PGP Key fingerprint: D349 B109 0EB8 2554 4D75 B79A 8B17 F97C 1622 166A pgpn7YDpY40Pp.pgp Description: PGP signature
Re: using the date command
On Sep 30, 2007, at 6:13 PM, RW wrote: On Sun, 30 Sep 2007 16:17:30 -0700 jekillen <[EMAIL PROTECTED]> wrote: On Sep 30, 2007, at 12:48 AM, Bruce Cran wrote: ntpdate is deprecated, you should use "ntpd -q" instead if you want ntpd to set the time once then exit. From ntpdate(8): Note: The functionality of this program is now available in the ntpd(8) program. See the -q command line option in the ntpd(8) page. After a suitable period of mourning, the ntpdate utility is to be retired from this distribution. Also, ntpd wil refuse to update the time if the delta is more than 1000s by default, but you can use the -g option to override this. To set the date to within a reasonable delta, use something like "date 200709282027". If you want to set the time more accurately using NTP, edit /etc/ntp.conf and add "server pool.ntp.org" to it. Save it then run "ntpd -q". And if you then add ntpd_enable=YES ntpdate_enable=YES to rc.conf, it will all work automatically thereafter. ntpdate will run at boot-time followed by ntpd. The removal of ntpdate is something I'll believe in when it happens. ntpd -q is a superior drop-in replace for ntpdate when it's being run from cron. OTOH if you run ntpd -q in place of ntpdate at boot (before starting ntpd), it adds about 15 seconds to the boot-time for no significant benefit. Thanks for the info. So ntp, as I understand it, has to have time servers to reference, and of course the system has to be connected to the public network to contact the time servers. Are there any security issues with ntp? Or, where can I find info on security issues related to ntp? Update on original question related to the use of date in FreeBSD; I finally brightened up and set the time in the bios. Jeff K ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: using the date command
On Sun, 30 Sep 2007 16:17:30 -0700 jekillen <[EMAIL PROTECTED]> wrote: > > On Sep 30, 2007, at 12:48 AM, Bruce Cran wrote: > > ntpdate is deprecated, you should use "ntpd -q" instead if you want > > ntpd to set the time once then exit. From ntpdate(8): > > > > Note: The functionality of this program is now available in the > > ntpd(8) program. See the -q command line option in the ntpd(8) > > page. After a > > suitable period of mourning, the ntpdate utility is to be > > retired from > > this distribution. > > > > Also, ntpd wil refuse to update the time if the delta is more than > > 1000s by default, but you can use the -g option to override this. > > To set the date to within a reasonable delta, use something like > > "date 200709282027". If you want to set the time more accurately > > using NTP, edit /etc/ntp.conf and add "server pool.ntp.org" to it. > > Save it then run "ntpd -q". And if you then add ntpd_enable=YES ntpdate_enable=YES to rc.conf, it will all work automatically thereafter. ntpdate will run at boot-time followed by ntpd. The removal of ntpdate is something I'll believe in when it happens. ntpd -q is a superior drop-in replace for ntpdate when it's being run from cron. OTOH if you run ntpd -q in place of ntpdate at boot (before starting ntpd), it adds about 15 seconds to the boot-time for no significant benefit. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: using the date command
On Sep 30, 2007, at 12:48 AM, Bruce Cran wrote: Brian A. Seklecki wrote: To set time: $ sudo /usr/sbin/ntpdate pool.ntp.org 29 Sep 23:48:31 ntpdate[9404]: adjust time server 66.250.45.2 offset 0.001289 sec ntpdate is deprecated, you should use "ntpd -q" instead if you want ntpd to set the time once then exit. From ntpdate(8): Note: The functionality of this program is now available in the ntpd(8) program. See the -q command line option in the ntpd(8) page. After a suitable period of mourning, the ntpdate utility is to be retired from this distribution. Also, ntpd wil refuse to update the time if the delta is more than 1000s by default, but you can use the -g option to override this. To set the date to within a reasonable delta, use something like "date 200709282027". If you want to set the time more accurately using NTP, edit /etc/ntp.conf and add "server pool.ntp.org" to it. Save it then run "ntpd -q". If you need to configure the time zone, an easy way to do this is to run sysinstall and select "Configuration --> Time Zone". To date info about your timezone settings: $ zdump /etc/localtime /etc/localtime Sat Sep 29 23:49:19 2007 EDT Options: $ ls /usr/shaoneinfo/ | egrep -v "^d" total 78 -rw-r--r-- 1 root wheel755 Aug 22 11:11 CET -rw-r--r-- 1 root wheel837 Aug 22 11:11 CST6CDT -rw-r--r-- 1 root wheel679 Aug 22 11:11 EET -rw-r--r-- 1 root wheel 56 Aug 22 11:11 EST -rw-r--r-- 1 root wheel837 Aug 22 11:11 EST5EDT [...] To set timezone: $ ln -s /share/zoneinfo/$WHATEVER /etc/localtime For you probably PST8PDT. For your best NTP experience, use OpenNTP from ports: /usr/ports/net/openntpd/ ~BAS On Sat, 2007-09-29 at 20:33 -0700, jekillen wrote: Thanks, more very helpful info; Jeff K ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: using the date command
On Sep 29, 2007, at 8:52 PM, Brian A. Seklecki wrote: To set time: $ sudo /usr/sbin/ntpdate pool.ntp.org 29 Sep 23:48:31 ntpdate[9404]: adjust time server 66.250.45.2 offset 0.001289 sec To date info about your timezone settings: $ zdump /etc/localtime /etc/localtime Sat Sep 29 23:49:19 2007 EDT Options: $ ls /usr/shaoneinfo/ | egrep -v "^d" total 78 -rw-r--r-- 1 root wheel755 Aug 22 11:11 CET -rw-r--r-- 1 root wheel837 Aug 22 11:11 CST6CDT -rw-r--r-- 1 root wheel679 Aug 22 11:11 EET -rw-r--r-- 1 root wheel 56 Aug 22 11:11 EST -rw-r--r-- 1 root wheel837 Aug 22 11:11 EST5EDT [...] To set timezone: $ ln -s /share/zoneinfo/$WHATEVER /etc/localtime For you probably PST8PDT. For your best NTP experience, use OpenNTP from ports: /usr/ports/net/openntpd/ ~BAS Thanks for the info, very helpful; Jeff K On Sat, 2007-09-29 at 20:33 -0700, jekillen wrote: Hello all; I have built 4 machines and installed FreeBSD 6.0 in one and 6.2 in the other three. They are all using the wrong date and time. The last one (v6.2 on ecs mb with AMD64) is the worst. It is telling me today is Jan 3 2003 PST (I am on the west coast and it is still PDT). These machines are all web servers. So up until now this has not been a big issue but a configuration of software is complaining that the files it creates have an older date than the files in the software bundle, it is time to do something about it. So I am looking at man date and as I interpret the instructions #date ccyymmddHHMM.ss (20079282027.00 or 200709282027.00 for instance) is supposed to set the clock to the current date. But when I run a command with the current date and time in the above format I get the complaint that the format string is wrong. Can anyone be kind enough to give me a quick tutorial on this? I will be looking seriously into using NTP, but for now I need to get the date straight. I have entries in apache error log gener ated by php scripts that are supposed to use its date command. Thanks in advance for assistance. Jeff K ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: using the date command
Brian A. Seklecki wrote: To set time: $ sudo /usr/sbin/ntpdate pool.ntp.org 29 Sep 23:48:31 ntpdate[9404]: adjust time server 66.250.45.2 offset 0.001289 sec ntpdate is deprecated, you should use "ntpd -q" instead if you want ntpd to set the time once then exit. From ntpdate(8): Note: The functionality of this program is now available in the ntpd(8) program. See the -q command line option in the ntpd(8) page. After a suitable period of mourning, the ntpdate utility is to be retired from this distribution. Also, ntpd wil refuse to update the time if the delta is more than 1000s by default, but you can use the -g option to override this. To set the date to within a reasonable delta, use something like "date 200709282027". If you want to set the time more accurately using NTP, edit /etc/ntp.conf and add "server pool.ntp.org" to it. Save it then run "ntpd -q". If you need to configure the time zone, an easy way to do this is to run sysinstall and select "Configuration --> Time Zone". To date info about your timezone settings: $ zdump /etc/localtime /etc/localtime Sat Sep 29 23:49:19 2007 EDT Options: $ ls /usr/shaoneinfo/ | egrep -v "^d" total 78 -rw-r--r-- 1 root wheel755 Aug 22 11:11 CET -rw-r--r-- 1 root wheel837 Aug 22 11:11 CST6CDT -rw-r--r-- 1 root wheel679 Aug 22 11:11 EET -rw-r--r-- 1 root wheel 56 Aug 22 11:11 EST -rw-r--r-- 1 root wheel837 Aug 22 11:11 EST5EDT [...] To set timezone: $ ln -s /share/zoneinfo/$WHATEVER /etc/localtime For you probably PST8PDT. For your best NTP experience, use OpenNTP from ports: /usr/ports/net/openntpd/ ~BAS On Sat, 2007-09-29 at 20:33 -0700, jekillen wrote: Hello all; I have built 4 machines and installed FreeBSD 6.0 in one and 6.2 in the other three. They are all using the wrong date and time. The last one (v6.2 on ecs mb with AMD64) is the worst. It is telling me today is Jan 3 2003 PST (I am on the west coast and it is still PDT). These machines are all web servers. So up until now this has not been a big issue but a configuration of software is complaining that the files it creates have an older date than the files in the software bundle, it is time to do something about it. So I am looking at man date and as I interpret the instructions #date ccyymmddHHMM.ss (20079282027.00 or 200709282027.00 for instance) is supposed to set the clock to the current date. But when I run a command with the current date and time in the above format I get the complaint that the format string is wrong. Can anyone be kind enough to give me a quick tutorial on this? I will be looking seriously into using NTP, but for now I need to get the date straight. I have entries in apache error log gener ated by php scripts that are supposed to use its date command. Thanks in advance for assistance. Jeff K ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: using the date command
To set time: $ sudo /usr/sbin/ntpdate pool.ntp.org 29 Sep 23:48:31 ntpdate[9404]: adjust time server 66.250.45.2 offset 0.001289 sec To date info about your timezone settings: $ zdump /etc/localtime /etc/localtime Sat Sep 29 23:49:19 2007 EDT Options: $ ls /usr/shaoneinfo/ | egrep -v "^d" total 78 -rw-r--r-- 1 root wheel755 Aug 22 11:11 CET -rw-r--r-- 1 root wheel837 Aug 22 11:11 CST6CDT -rw-r--r-- 1 root wheel679 Aug 22 11:11 EET -rw-r--r-- 1 root wheel 56 Aug 22 11:11 EST -rw-r--r-- 1 root wheel837 Aug 22 11:11 EST5EDT [...] To set timezone: $ ln -s /share/zoneinfo/$WHATEVER /etc/localtime For you probably PST8PDT. For your best NTP experience, use OpenNTP from ports: /usr/ports/net/openntpd/ ~BAS On Sat, 2007-09-29 at 20:33 -0700, jekillen wrote: > Hello all; > I have built 4 machines and installed FreeBSD 6.0 in one and 6.2 > in the other three. They are all using the wrong date and time. > The last one (v6.2 on ecs mb with AMD64) is the worst. It is telling > me today is Jan 3 2003 PST (I am on the west coast and it is still PDT). > These machines are all web servers. So up until now this has not been > a big issue but a configuration of software is complaining that the > files > it creates have an older date than the files in the software bundle, > it is time to do something about it. So I am looking at man date and as > I interpret the instructions #date ccyymmddHHMM.ss (20079282027.00 or > 200709282027.00 for instance) is supposed to set the > clock to the current date. But when I run a command with the > current date and time in the above format I get the complaint that > the format string is wrong. > Can anyone be kind enough to give me a quick tutorial on this? > I will be looking seriously into using NTP, but for now I need to > get the date straight. I have entries in apache error log gener > ated by php scripts that are supposed to use its date command. > Thanks in advance for assistance. > Jeff K > > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > > > > > > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
using the date command
Hello all; I have built 4 machines and installed FreeBSD 6.0 in one and 6.2 in the other three. They are all using the wrong date and time. The last one (v6.2 on ecs mb with AMD64) is the worst. It is telling me today is Jan 3 2003 PST (I am on the west coast and it is still PDT). These machines are all web servers. So up until now this has not been a big issue but a configuration of software is complaining that the files it creates have an older date than the files in the software bundle, it is time to do something about it. So I am looking at man date and as I interpret the instructions #date ccyymmddHHMM.ss (20079282027.00 or 200709282027.00 for instance) is supposed to set the clock to the current date. But when I run a command with the current date and time in the above format I get the complaint that the format string is wrong. Can anyone be kind enough to give me a quick tutorial on this? I will be looking seriously into using NTP, but for now I need to get the date straight. I have entries in apache error log gener ated by php scripts that are supposed to use its date command. Thanks in advance for assistance. Jeff K ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"