LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-12-2005, 08:17 AM   #1
DNAphil
LQ Newbie
 
Registered: Jul 2005
Location: Buffalo, NY
Distribution: Fedora Core 2 and 4
Posts: 6

Rep: Reputation: 0
Cron Problems


Hello,

I am a relative n00b when it comes to Linux, so I hope that I give you the right information.

I have built a backup server using Fedora Core 4, and have it backing up a Linux Fedora Core 2 machine, and my Windows XP machine.

For the FC2 machine, I have set up NSF and am able to mount the drives using mount.

For the XP machine, I used mount.cifs and am able to mount the drives.

I wrote a backup script which mounted the XP directories, three in total, using mount.cifs. It then uses a perl script to backup the three directories onto the backup server. It then umounts the three directories, and mails me the log from the perl script.

When I tested the script, I logged in as root, ran the script with the command:
/bin/sh < backup_sys.cron

When I do this, the script runs fine and all the backups are completed.

I then put it into Crontab to run nightly at 2:30am. I used the exact same command above, in the Crontab entry.

When Cron runs the script it is unable to mount the XP drives. The email message from Cron, says that mount.cifs command not found. The message says it is logged in as root, but it cannot find the mount.cifs command.

I have checked the script and all directory names are full, there are no relative paths and such for any of the backup or destination directories, so the script should work if run from any directory.

The mount.cifs command I am using is:
mount.cifs //Machine Name/ share name mount-point -o password=
(there is no password for the XP directories)

So what is causing mount.cifs not to work, when cron runs the script compared to when I log in as root and run it?

Any help will be appreciated.
 
Old 07-12-2005, 08:56 AM   #2
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
the problem lies not within the mount.cifs
but with finding mount.cifs
try puting the full path to mount.cifs in your crontab
eg:
Code:
* * * * * /path/to/mount.cifs
 
  


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 problems deadite66 Linux - General 0 08-06-2005 07:29 PM
Cron Problems eagle683 Programming 6 07-26-2005 07:26 PM
problems using cron Mugatu Linux - Software 3 02-26-2004 03:15 PM
Cron problems goochable Linux - General 3 11-15-2003 09:47 PM
Cron problems goochable Linux - Newbie 3 04-17-2001 08:43 AM


All times are GMT -5. The time now is 11:51 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration