Su in a cronjob
I have a cronjob that runs every midnight that shuts down all my uml(user-mode-linux) VM's, backs them up, and starts them up again. However, i've run into a few issues!
Basically, i have the cronjob run the script as root, but i want a part of the script.. where my VM's get restarted, to run as a different user.
I tried to use su - workshop(workshop being the appropriate user)
that hung, so i tried
su - workshop -c `openvt -fvc 2 /filesystems/start.sh`
but that didn't work either(plus i have 6 uml's that i have to restart in their own tty, so for the sake of ease, i'd rather have one command to su to workshop, then quit that part)
Is this possible? am i missing a simple command?