Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 am running crontab as root user:

screen -S konsola -X stuff 'say hello'`echo -ne '\015'`

How do I run it as the user "nobody"? Only this user has screen with given pid, thats why I need it.

share|improve this question
up vote 0 down vote accepted

Can't you just use crontab -u nobody -e to add your command to nobody's crontab?

Otherwise I would just put this in the root crontab:

su nobody -c "screen -S konsola -X stuff 'say hello'`echo -ne '\015'`"

From the man page:

The su command is used to become another user during a login session.
 -c, --command  COMMAND
    Specify a command that will be invoked by the shell using its -c.
share|improve this answer
nobody user cant do cronjobs/tab - hes not privillaged to. what crontab -u nobody -e does? – Szymon Toda Sep 18 '12 at 18:25
It edits the crontab file of user nobody – m4573r Sep 18 '12 at 18:26
As I said nobody user cant run crontab. Is there a way to let him run it only for one *.sh? – Szymon Toda Sep 18 '12 at 18:28

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.