To sync your local clock you can say:
Back home I have to use:Code:ntpdate name.of.some.ntp.server
because my isp blocks the normal ports.Code:ntpdate -u name.of.some.ntp.server
Google for "public ntp server" to find some server near you.
I tried locating man pages, and info pages on the subject, I think the command was "dt" or some other package that was specifically designed for updating the pc hardware clock - my problem is that when I was looking for this information, which has hit the "back burner" because of my ALSA sound issue, I could never find the "server" to get the local time.
Does anyone, or has anyone, setup some kind of script or access, that can demonstrate the use of these packages - and can show me a list of servers to get the atomic clock time, update the local pc hardware clock, and which server I can use for my local time zone - Central Time Zone - I do honor daylight savings as well, being in Wisconsin, USA.
Thanks for any assistance in the "minor" issue,
Cuddles
To sync your local clock you can say:
Back home I have to use:Code:ntpdate name.of.some.ntp.server
because my isp blocks the normal ports.Code:ntpdate -u name.of.some.ntp.server
Google for "public ntp server" to find some server near you.
Windos_No_Thanks,
I don't think this is working... I did a googe, and located three "secondard" sites, all of them reported to use the dns because the IP numbers can change... This is the output:
root@Polaris:/home/cuddles# ntpdate -u ntp1.cs.wisc.edu
10 Mar 07:59:34 ntpdate[8785]: sendto(128.105.39.11): Operation not permitted
10 Mar 07:59:35 ntpdate[8785]: sendto(128.105.39.11): Operation not permitted
10 Mar 07:59:36 ntpdate[8785]: sendto(128.105.39.11): Operation not permitted
10 Mar 07:59:37 ntpdate[8785]: sendto(128.105.39.11): Operation not permitted
10 Mar 07:59:38 ntpdate[8785]: no server suitable for synchronization found
root@Polaris:/home/cuddles# ntpdate ntp3.cs.wisc.edu
10 Mar 08:00:01 ntpdate[8786]: sendto(128.105.37.11): Operation not permitted
10 Mar 08:00:02 ntpdate[8786]: sendto(128.105.37.11): Operation not permitted
10 Mar 08:00:03 ntpdate[8786]: sendto(128.105.37.11): Operation not permitted
10 Mar 08:00:04 ntpdate[8786]: sendto(128.105.37.11): Operation not permitted
10 Mar 08:00:05 ntpdate[8786]: no server suitable for synchronization found
root@Polaris:/home/cuddles# ntpdate ntp3.sf-bay.org
10 Mar 08:00:22 ntpdate[8796]: sendto(206.55.70.42): Operation not permitted
10 Mar 08:00:23 ntpdate[8796]: sendto(206.55.70.42): Operation not permitted
10 Mar 08:00:24 ntpdate[8796]: sendto(206.55.70.42): Operation not permitted
10 Mar 08:00:25 ntpdate[8796]: sendto(206.55.70.42): Operation not permitted
10 Mar 08:00:26 ntpdate[8796]: no server suitable for synchronization found
All three sites come up with the same error, with or without the "-u" - I also have ntp set in my firewall for access. Am I missing something? (again?)
Thanks,
Cuddles
OOPS -=- spoke too soon, I didn't have ntp set in my firewall, unfortunately, when I ran the servers (which are local based here in Wisconsin) - it threw my clock off by +7 hours - do I need to supply some sort of GMT variable? (because I think that is exactly what my "offset" is)
Now that my hardware clock thinks its 3:10 PM, when it actually should be 8:10 AM - I can poke the time change, but I was looking for a quick shell script to run this under to update the clock...
Thanks for any help,
Cuddles
More information needed...
I setup a nice shell script to enter all the info of the ntpdate command, currently got it now to within one hour ahead of my time - so I am getting closer - my STATE isn't even on the list, let alone a city (for setting my time zone) I am currently set to Thunder Bay - which I would guess, is one hour ahead of me...
Problem is that if I run the shell script from a user other than root, I get the message "you are not in the sudoers file, this incident will be reported" - I have the "sudo" infront of the command in the script.
I already added my users into the sudoers file, with the "proper" use of visudo - but it doesn't appear to be loading the changes I made. What gives?
ALSO, how can I make my script shell command "local" to a standard command, like kwrite or something???
I know, why does everything I do require six posts, and problems, I don't know, I guess I am just "lucky" I guess???
Thanks ahead of time,
Cuddles
I'm starting to get the hang of this, sooner, or later...
Figured out what a mucked up in the sudoers file, and now my "users" can run as sudo - now...
So, I guess the only thing I still need to know, is, how can I get a shell script in a location that any of my "sudo" users can run my shell script that I have made to time adjust through ntpdate???
BTW - I found a time zone that worked - It was a city that - I guess - borders Wisconsin and another state - but the result is that the city is in my time zone - heck of a lot better than London and Los Angels, and a whole slew of other time zones that were set by default in the clock - time zone - settings...
Give a girl enough rope, and she just might find another way to hang herself - or in this case - give a girl enough time, and she might just find the answer on her own [giggle]
Cuddles
You can just run it at startup without the need to sudo.
Here's a nice short how-to:
http://www.desktop-linux.net/debian-rclocal.htm
EDIT: This would though need a cable or ADLS connection
Markus,
Sorry to say, nope, dial-up connection only - so the auto-start on boot time adjust isn't going to work...
So, the querry still stands, how and where do I place a shell script that can be accessed by any user. Permissions have already been set for all my users to run the script, and sudo has been enabled on these users as well...
Cuddles
Umm, you could just put it in root's crontab instead and perhaps add something in the beginning of it so that it aborts if it doesn't have network connectivity.Originally Posted by Cuddles
--First of all, you should run ' /usr/sbin/tzconfig ' and set your local timezone.
--The ONLY person who should be updating the machine's clock, is ROOT. Don't give out sudo permissions to just anyone - restrict it to maybe 1-2 other people at the most.
--Here is a copy of the script I use; you should be OK with running the script about once a month. Unless your CMOS battery is dying or something, you really --don't-- need to sync the time all that often.
BEGIN /root/bin/timesync
--Once you have your "master server's" time set, you can edit its /etc/inetd.conf and uncomment the following lines:Code:#!/bin/sh date ntpdate -s pool.ntp.org date #ntp1.linuxmedialabs.com # pool.ntp.org # ntp1.tummy.com - CO # louie.udel.edu - DElwr # ntp.shorty.com - GA # inetd's timeserver is port 37; use ' rdate p233 '
--Then, if you need to, ' /etc/init.d/inetd start ' on the server as root. This should shed some light on the comment at the end of the above script; if you have inetd running with those services, you can go to another computer on the network (running Linux of course) and just ' rdate insert-name-of-internet-connected-box-here '. You may have to ' apt-get install rdate ' on the client(s); I forget if it comes on the live-cd.Code:daytime stream tcp nowait root internal daytime dgram udp wait root internal time stream tcp nowait root internal time dgram udp wait root internal
--The nice thing about this is that only the master server needs to be updated via ntp; the other clients can then set their time from it using rdate.
--However, I wouldn't leave inetd running unless you have to; it opens up ports. I only start it when I need it, personally.
--Best wishes.
Originally Posted by Cuddles
NEW Dell X1018 X-Series Smart Managed Switches 16-Port Gigabit 2-Port SFP Switch
$44.99
Fortinet FortiSwitch FS-124D-POE 24 Port Gigabit Ethernet Switch UNREGISTERED
$99.97
Cisco Catalyst WS-C3650-24PS-L 24-Port Gigabit Ethernet Network Switch TESTED
$49.99
Cisco 24 Ports UPoE Managed Network Switch P/N: C9300-24UX-A Tested
$340.00
SEALED TP-Link TL-SG105 5-Port 10/100/1000 Mb/s Desktop Switch
$15.99
Cisco WS-C2960-48TT-L Catalyst 2960 48 Port Managed Network Switch
$33.01
Cisco SF302-08P 8-Port 10/100 PoE Managed Switch
$20.00
HP ProCurve 1800-24G J9028B 24-Port Managed Gigabit Network Switch, Power Cord
$29.99
Dell X1018 X-Series Smart Managed Switches 16-Port Gigabit 2-Port SFP Switch
$45.00
Juniper Networks EX4300-48P-TAA 48-Port Switch with PoE+ w/ 2x Air Out PSU
$99.99