LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   cron error when running script? (https://www.linuxquestions.org/questions/linux-software-2/cron-error-when-running-script-228660/)

meeble 09-09-2004 02:34 PM

cron error when running script?
 
Hello,

I have a script that runs fine from the command line - no errors whatsoever. Here's the script contents:

#!/bin/bash
su - devin --command="rsync -ae ssh db1:/appFiles/logos /appFiles"
chown 0 /appFiles/logos/*

That's it. Now, I have cron set to run this script every ten minutes. here's the contents of
my cron:

# update logos
*/10 * * * * root /usr/local/bin/rsync-logos 2>&1 > /dev/null

Now, every 10 minutes, the system emails me an email saying:

su: incorrect password

I don't understand the error. The script is being run by root. How can there be a password
error when root is using "su" to switch to one of the system's user accounts?

Thanks,
meeble

Tinkster 09-09-2004 02:58 PM

Works for me, but I don't have the "root" in
my crontab line ...


Cheers,
Tink

meeble 09-09-2004 04:42 PM

But isn't the "root" in the crontab line just specifying that the root user is executing the script?

The weird thing is that I am doing this same thing on another server, and I'm not
getting any error. I think this started happening after we switched to a new C-block
of IPs.

Frustrated,
meeble


Quote:

Originally posted by Tinkster
Works for me, but I don't have the "root" in
my crontab line ...


Cheers,
Tink


Tinkster 09-09-2004 05:00 PM

Odd ... that error makes no sense at all.

And the change of IP ranges wouldn't have
any ill effect on the logins, unless you use
NIS or something...



Cheers,
Tink


All times are GMT -5. The time now is 12:09 AM.