LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 09-09-2004, 02:34 PM   #1
meeble
LQ Newbie
 
Registered: Mar 2004
Distribution: RedHat / slackware
Posts: 13

Rep: Reputation: 0
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
 
Old 09-09-2004, 02:58 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,983
Blog Entries: 11

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


Cheers,
Tink
 
Old 09-09-2004, 04:42 PM   #3
meeble
LQ Newbie
 
Registered: Mar 2004
Distribution: RedHat / slackware
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
Old 09-09-2004, 05:00 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,983
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cron NOT running php script ??!! hendrixx Linux - Software 2 11-15-2006 07:18 AM
cron NOT running php script ??!! hendrixx Programming 1 01-19-2005 05:36 AM
script not running as a cron job sanjith11 Programming 5 11-23-2004 08:42 AM
running a 'dcop' script from 'cron' dsunger Linux - Software 0 05-10-2004 01:17 AM
script not running correctly off cron wedgeworth Linux - Software 3 10-14-2003 08:30 AM


All times are GMT -5. The time now is 04:49 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration