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
DEC Digital Computer Mainframe VT100 Keyboard 70-14653-00
$279.99
2 Rare IBM 3275/3277 Beamspring Mainframe 66-key Typewriter Keyboard PCB Boards
$199.99
500+ VINTAGE IBM MAINFRAME COMPUTER Mixed PUNCH Cards
$149.95
Rare Vintage IBM Mainframe PCB 6031161 w/ 36 Double Stacked Gold ICs
$259.99
Zenith Data Systems Mechanical Keyboard Zkb-2 Switches At/Xt Mainframe
$175.11
IBM Vintage Laptop PS/2 Note N51 SX Laptop Mainframe Collection RARE AS IS
$129.95
IBM FRU26F7630 3390 DASD Hard Drive 10.8” from Vintage Mainframe
$219.99
Vintage Mainframe Computer Board Fujitsu Gate Array Motorola Scrap Gold Recovery
$97.95
AST Bravo MS P/60 Vintage Mainframe Computer Old IBM Style NO HDD
$129.94
Attachmate Extra Mainframe For Windows Ver. 4.2 Complete in Box With Manual 90s
$189.98