Hi there, I was wondering if anybody knows how I can allow users thats doesn't have root privileges to use the date command to set the time and date. Thanks Henk "Softline VIP provides no warranty, express or implied, as to the accuracy or completeness of any advice or information provided herein and accepts no liability for loss or damage of any nature whatsoever, as a result of or which may be attributable to the use of, or the reliance upon, the advice or information provided herein."
On Monday 21 August 2006 23:48, Henk Roos wrote:
Hi there,
I was wondering if anybody knows how I can allow users thats doesn't have root privileges to use the date command to set the time and date.
man sudo But wouldn't it be wiser to install a network time client and set the time correctly on all machines? -- _____________________________________ John Andersen
Henk Roos wrote:
Hi there,
I was wondering if anybody knows how I can allow users thats doesn't have root privileges to use the date command to set the time and date.
I'd recommend installing ntpd or xntp instead. It's a daemon that sits in the background and will periodically check with time servers to keep your machine's clock accurate.
On Tuesday 22 August 2006 03:48, Henk Roos wrote:
Hi there,
I was wondering if anybody knows how I can allow users thats doesn't have root privileges to use the date command to set the time and date.
Why not set up a cron job (as root) using the NTPDATE command... about twice a day should be sufficient. Then they wouldn't have to do anything.
On Tuesday 22 August 2006 06:48, Bruce Marshall wrote:
On Tuesday 22 August 2006 03:48, Henk Roos wrote:
Hi there,
I was wondering if anybody knows how I can allow users thats doesn't have root privileges to use the date command to set the time and date.
Why not set up a cron job (as root) using the NTPDATE command... about twice a day should be sufficient. Then they wouldn't have to do anything.
Why would you reply to someone telling the proper method to do this (and, by the way, a method fully supported in YAST) and suggest a hack that no one will remember and which takes more effort to set up anyway? -- _____________________________________ John Andersen
On Wednesday 23 August 2006 02:28, John Andersen wrote:
On Tuesday 22 August 2006 06:48, Bruce Marshall wrote:
On Tuesday 22 August 2006 03:48, Henk Roos wrote:
Hi there,
I was wondering if anybody knows how I can allow users thats doesn't have root privileges to use the date command to set the time and date.
Why not set up a cron job (as root) using the NTPDATE command... about twice a day should be sufficient. Then they wouldn't have to do anything.
Why would you reply to someone telling the proper method to do this (and, by the way, a method fully supported in YAST) and suggest a hack that no one will remember and which takes more effort to set up anyway?
Well gee.... now we have people nitpicking the solutions others try to provide. 1) I use this method myself and it works very well. 2) It uses very little system resources as opposed to NTP 3) Based on the traffic on this very list of the problems people have with setting up NTP, it is a much simpler solution. People - - - be aware that from now on you will need to submit justification for any solutions or help you try to provide. Full HOW-TO's of the absolute *best* way to accomplish any task (even tho there may be 10 best ways to do it) will be required. Geesh..... Another reason why I may ditch this list. It has lost its effectiveness.
Bruce Marshall wrote:
On Wednesday 23 August 2006 02:28, John Andersen wrote:
Why would you reply to someone telling the proper method to do this (and, by the way, a method fully supported in YAST) and suggest a hack that no one will remember and which takes more effort to set up anyway?
Well gee.... now we have people nitpicking the solutions others try to provide.
While I agree that the way he worded this could be much less aggressive, I still think ntpd is the proper way for a server to adjust the time.
1) I use this method myself and it works very well.
2) It uses very little system resources as opposed to NTP
3) Based on the traffic on this very list of the problems people have with setting up NTP, it is a much simpler solution.
Much simpler, I agree. So, have you ever wondered why people would still want to use ntp instead of the simple ntpdate?
People - - - be aware that from now on you will need to submit justification for any solutions or help you try to provide. Full HOW-TO's of the absolute *best* way to accomplish any task (even tho there may be 10 best ways to do it) will be required.
Perhaps I should then justify, why I prefer ntpd? The difference between ntpdate and ntpd is that ntpdate will adjust the time in one big step, setting the time backwards or forward to the necessary value. ntpd on the other hand does its best to avoid such a step and strives to adjust the clock speed instead to approach the correct time in small incremental steps, while the system time will not make any strange jumps. On a desktop you don't need to concern yourself with system time. On a server there might be applications that rely on the system time to provide continuous time stamps for critical processes. Is any other novell (netware) engineer here flinching in reflex also, when he hears "synthetical time"? Another example would be transaction based databases where the timestamp is used. You might know today that the time might jump around on your system, but if you leave the company in a year for another job, does you successor who is asked to set up a dbms on the system also know this?
Geesh..... Another reason why I may ditch this list. It has lost its effectiveness.
As with fighting spam, sometimes the most effective means are not the best means for every one and every situation. Please bear with us stupid oldtimers, sometimes we might even have reasons for doing things not the most effective way... Sandy -- List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com
On Wednesday 23 August 2006 13:34, Sandy Drobic wrote:
Bruce Marshall wrote:
On Wednesday 23 August 2006 02:28, John Andersen wrote:
Why would you reply to someone telling the proper method to do this (and, by the way, a method fully supported in YAST) and suggest a hack that no one will remember and which takes more effort to set up anyway?
Well gee.... now we have people nitpicking the solutions others try to provide.
While I agree that the way he worded this could be much less aggressive, I still think ntpd is the proper way for a server to adjust the time.
1) I use this method myself and it works very well.
2) It uses very little system resources as opposed to NTP
3) Based on the traffic on this very list of the problems people have with setting up NTP, it is a much simpler solution.
Much simpler, I agree. So, have you ever wondered why people would still want to use ntp instead of the simple ntpdate?
People who have more stringent needs for time control than just a desktop would probably want something better. Yes. But given a twice a day update, I can't see that there would be much difference. And yes, I used to run ntpd and it worked just fine. Just don't think I need the resource usage required.
People - - - be aware that from now on you will need to submit justification for any solutions or help you try to provide. Full HOW-TO's of the absolute *best* way to accomplish any task (even tho there may be 10 best ways to do it) will be required.
Perhaps I should then justify, why I prefer ntpd? The difference between ntpdate and ntpd is that ntpdate will adjust the time in one big step, setting the time backwards or forward to the necessary value. ntpd on the other hand does its best to avoid such a step and strives to adjust the clock speed instead to approach the correct time in small incremental steps, while the system time will not make any strange jumps.
If you keep the time updated and your system (clock) is working properly, there shouldn't be any 'big' changes.
On a desktop you don't need to concern yourself with system time. On a server there might be applications that rely on the system time to provide continuous time stamps for critical processes. Is any other novell (netware) engineer here flinching in reflex also, when he hears "synthetical time"? Another example would be transaction based databases where the timestamp is used.
See above.
You might know today that the time might jump around on your system, but if you leave the company in a year for another job, does you successor who is asked to set up a dbms on the system also know this?
Geesh..... Another reason why I may ditch this list. It has lost its effectiveness.
As with fighting spam, sometimes the most effective means are not the best means for every one and every situation. Please bear with us stupid oldtimers, sometimes we might even have reasons for doing things not the most effective way...
I'll bet I'm more of an oldtimer than you are.... but let's leave that alone. :-)
List replies only please!
A *very* good sigline.......
Bruce Marshall wrote:
People who have more stringent needs for time control than just a desktop would probably want something better. Yes. But given a twice a day update, I can't see that there would be much difference.
The Big Trouble(tm) starts when things happen you do not expect to happen.
And yes, I used to run ntpd and it worked just fine. Just don't think I need the resource usage required.
People - - - be aware that from now on you will need to submit justification for any solutions or help you try to provide. Full HOW-TO's of the absolute *best* way to accomplish any task (even tho there may be 10 best ways to do it) will be required. Perhaps I should then justify, why I prefer ntpd? The difference between ntpdate and ntpd is that ntpdate will adjust the time in one big step, setting the time backwards or forward to the necessary value. ntpd on the other hand does its best to avoid such a step and strives to adjust the clock speed instead to approach the correct time in small incremental steps, while the system time will not make any strange jumps.
If you keep the time updated and your system (clock) is working properly, there shouldn't be any 'big' changes.
You should not rely on "if", if you have an important server to run. It happened to more than one admin that cron did not run for whatever reason. Some days later you notice that cron isn't running, and restart crond. Shrug, no big deal, you think. One hour later you collegue is tearing his hair out because the replication doesn't work. I hope that this does not happen to you, but it's better to prevent even the possibility of this to happen. Do not design your infrastructure more fragile than necessary. Sandy -- List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com
Sandy Drobic wrote:
Bruce Marshall wrote:
People who have more stringent needs for time control than just a desktop would probably want something better. Yes. But given a twice a day update, I can't see that there would be much difference.
The Big Trouble(tm) starts when things happen you do not expect to happen.
This reminds me of one of the problems I ran into when I tried out Ubuntu. My laptop's clock sometimes goes berserk. For some reason, it'll boot up and be a few hours off. Ubuntu uses a system where, by default, the root account has no password and can't be logged into. All systems tasks are done by sudo with the user's own password. Well, at one point, my laptop loaded up with an odd time such that even ntp would just force the change, rather than do it gradually. I think it was like 5 or 6 hours into the future. Anyway, I had done one operation with sudo already before ntp had a chance to update. Once it did, I couldn't use sudo at all, it would return an error about the time. No matter what arguments I sent its way, it simply refused to run. I had a choice of waiting several hours or do the microsoft thing and reboot. So, as a cautionary tale, it's always good to use sudo most of the time, but give the root account a password, you might need to someday.
Bruce Marshall wrote:
And yes, I used to run ntpd and it worked just fine. Just don't think I need the resource usage required.
Does your NTP really use a lot of resources?? I've never checked, but mine's certainly never caused a problem, not even a lifted eyebrow. /Per Jessen, Zürich
On Wednesday 23 August 2006 22:16, Per Jessen wrote:
Bruce Marshall wrote:
And yes, I used to run ntpd and it worked just fine. Just don't think I need the resource usage required.
Does your NTP really use a lot of resources?? I've never checked, but mine's certainly never caused a problem, not even a lifted eyebrow.
/Per Jessen, Zürich
No, its un-measurably small. With your local server as a time source it would never need to generate any meaningful network traffic either even with a 100 workstations syncing. He disliked my original question so much, I decided not to challenge his assertion of resource usage. ;-) -- _____________________________________ John Andersen
On Thursday 24 August 2006 02:16, Per Jessen wrote:
Bruce Marshall wrote:
And yes, I used to run ntpd and it worked just fine. Just don't think I need the resource usage required.
Does your NTP really use a lot of resources?? I've never checked, but mine's certainly never caused a problem, not even a lifted eyebrow.
Who knows... ? :-) but it *is* another process, that has to start up at boot, and adds something to the network load, etc etc.... and I think I can do just as well with a couple of ntpdate calls every day. Not running critical servers here (home) which seems to be the main argument for ntpd. However, I do have a single server that draws down email to the house and does the firewall stuff. Can that be set up to run ntpd with the other computers on the LAN syncing from that one? I've looked into it but haven't found that it can be done.
On 8/24/06 8:53 AM, "Bruce Marshall" <bmarsh@bmarsh.com> wrote:
On Thursday 24 August 2006 02:16, Per Jessen wrote:
Bruce Marshall wrote:
And yes, I used to run ntpd and it worked just fine. Just don't think I need the resource usage required.
Does your NTP really use a lot of resources?? I've never checked, but mine's certainly never caused a problem, not even a lifted eyebrow.
Who knows... ? :-) but it *is* another process, that has to start up at boot, and adds something to the network load, etc etc.... and I think I can do just as well with a couple of ntpdate calls every day.
Not running critical servers here (home) which seems to be the main argument for ntpd.
However, I do have a single server that draws down email to the house and does the firewall stuff. Can that be set up to run ntpd with the other computers on the LAN syncing from that one? I've looked into it but haven't found that it can be done.
Yep. Not too hard at all... Add this to /etc/ntp.conf on the gateway machine: -------- server 0.pool.ntp.org server 1.pool.ntp.org server 2.pool.ntp.org server pool.ntp.org ----------- And then add this to the clients: -------- server <ip of gateway> --------- Do ntpdate on the gateway to get it synced, then start ntp on it. Do ntpdate on the clients to get them synced, then start ntp on them. And you should be good to go. (Things to note: be sure to do `ntpdate <server>` twice, on each server/client, for each server listed; and you may need to adjust firewall rules and/or ntpd settings to get it to listen on an interface other than lo.) The x.pool.ntp.org servers are chosen from the global list, you can get a regional list by drilling down on http://ntp.isc.org/bin/view/Servers/NTPPoolServers
Bruce Marshall wrote:
On Thursday 24 August 2006 02:16, Per Jessen wrote:
Bruce Marshall wrote:
And yes, I used to run ntpd and it worked just fine. Just don't think I need the resource usage required. Does your NTP really use a lot of resources?? I've never checked, but mine's certainly never caused a problem, not even a lifted eyebrow.
Who knows... ? :-) but it *is* another process, that has to start up at boot, and adds something to the network load, etc etc.... and I think I can do just as well with a couple of ntpdate calls every day.
Not running critical servers here (home) which seems to be the main argument for ntpd.
However, I do have a single server that draws down email to the house and does the firewall stuff. Can that be set up to run ntpd with the other computers on the LAN syncing from that one? I've looked into it but haven't found that it can be done.
Any Linux box configured to use NTP is also a server, though at the next lower stratum.
On Thu, 2006-08-24 at 08:53 -0400, Bruce Marshall wrote:
However, I do have a single server that draws down email to the house and does the firewall stuff. Can that be set up to run ntpd with the other computers on the LAN syncing from that one?
In fact that is exactly what those who run publicly accessible ntp servers ask you to do. I run sites with dozens of IP telephones each calling an ntp server and do this to conserve external bandwidth. It's the users that waste that. Others have given you the method to set this up. -- Dave Cotton <dcotton@linuxautrement.com>
On Thursday 24 August 2006 04:53, Bruce Marshall wrote:
However, I do have a single server that draws down email to the house and does the firewall stuff. Can that be set up to run ntpd with the other computers on the LAN syncing from that one? I've looked into it but haven't found that it can be done.
Look deeper. ;-) That is exactly the recommended method. The email/firewall machine can sync with any public time clock (chances are there is such a thing supported by your ISP at ntp.yourisp.com) and all in house machines simply point their ntpd at the email/firewall. http://www.ntp.org/ntpfaq/ -- _____________________________________ John Andersen
participants (9)
-
Bruce Marshall
-
Dave Cotton
-
Henk Roos
-
Ian Marlier
-
James Knott
-
John Andersen
-
Per Jessen
-
Sandy Drobic
-
suse@rio.vg