Skip to main content

Thread: sudo / crontab help


hi

suspect newbie type issue i'm not sure what's going on. perhaps can me understand.

using program 'motion' run webcams box. start it, use

sudo motion

starts , runs, fine. if try run without sudo, get

cannot create process file /var/run/motion.pid

if run motion crontab -e starts, doesn't work... presumably same error above.

if change crontab execute 'sudo motion', works... , doesn't prompt me password quite odd.

, what's confusing, worked (without sudo in crontab) before built , installed latest version (whereas i'd used apt-get install motion).

so, question this: why, if crontab runs sudo default, need execute command sudo motion in work?

hope that's clear!

sudo won't *keep* working crontab...

sudo has timeout.

try it:
code:
sudo ls  sudo ls
how many times did asked password?

way a) configure motion put pid file somewhere you're allowed write, or b) put command in root's crontab
code:
sudo crontab -e


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] sudo / crontab help


Ubuntu

Comments