Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to let a standard user change the system date.

So I created a named pipe. The standard user write a date to the named pipe and a root process listens to it and sets the date accordingly:


echo 122515502010 > /tmp/mypipe


date -s < /tmp/mypipe

Unfortunately this doesn't work. Where am I wrong?

I'm doing this from an embedded Linux (busybox) with bash.

share|improve this question
up vote 1 down vote accepted

Got it!


read line < mypipe
date -s $line

Thank you everybody! ;)

share|improve this answer
As a shortcut, note that read will automatically populate $REPLY (unless you override the return variable name, as done in your example) – danlefree Dec 29 '10 at 1:18

Why not give the user access to date via sudo ?

share|improve this answer
busybox doesn't support sudo (at least the version I'm using). – michelemarcon Dec 28 '10 at 16:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.