Question : Setting date/time without being root user?

I need to programmatically set the system date and time on a Linux (RedHat) system without being logged in as the root user. How can I do this, without compromising the security of the system?

I've heard of sudo but that seems a little unsafe to me!

Basically it's a small SIL2 network with a radio clock attached via a serial port; I need to read the time of it, update my local logs, set the system time, then broadcast it around the other systems for them to do likewise. All of this is fine - except setting the system time when not a root user!

Cheers

Answer : Setting date/time without being root user?

All you need to do is log in as root, setuid ug+s date and log out.  Then you can call date from any script and you will be able to set the date.

That is the way to solve your problem.  Where is the aggro?
Random Solutions  
 
programming4us programming4us