Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

Rep: Reputation: 0
Cron Problems


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, 07:56 AM   #2
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
* * * * * /path/to/mount.cifs


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

All times are GMT -5. The time now is 10:42 PM.

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