Linux Debian Cron Mount cifs issue

Posted on 2013-01-10
Last Modified: 2013-11-13
I created a root task through the gnome-schedule to run the script below. The issue is that I get error but can't see why it won't mount the cifs. I can run this script without issues from a root terminal. I entered the full path of the command like some people suggest. I am using the bash with the script name when I run it from gnome-schedule. I also created a new task that just mount the drive and it is failing.

Any help would be appreciated.

Here is the script
/bin/mount -t cifs //x.x.x.x/syslog -o  username=myusername,password=mypassword /mnt/nfs

/bin/mkdir -p /mnt/nfs/dns/`hostname`-`date +%m-%d-%y`/etc/bind
/bin/mkdir -p /mnt/nfs/dns/`hostname`-`date +%m-%d-%y`/var/lib/bind

/bin/cp -r /etc/bind/* /mnt/nfs/dns/`hostname`-`date +%m-%d-%y`/etc/bind
/bin/cp -r /var/lib/bind/* /mnt/nfs/dns/`hostname`-`date +%m-%d-%y`/var/lib/bind

/bin/umount /mnt/nfs
Question by:CanadaCouncil
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
LVL 40

Expert Comment

ID: 38764510
are you providing full path name for the script as well?

Author Comment

ID: 38764517
the gnome-schedule  task call "bash /etc/bind_backup", I did provide the full path.
LVL 40

Expert Comment

ID: 38764525
but bash it self without path name. Does it work with other scripts?
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.


Author Comment

ID: 38764550
I also created a task with

/bin/mount -t cifs //x.x.x.x/syslog -o  username=myusername,password=mypassword /mnt/nfs

and I get the same result the help from the mount command...

I tried a task without the "bash" and I get the same problem

See picture

I do have /mnt/nfs and if I manual
LVL 40

Expert Comment

ID: 38764618
it looks like mount is not recognizing the file system type !

Author Comment

ID: 38764669
As it turns out the script run but without the mount so it copies everything but not on the network.

Author Comment

ID: 38764678
To reply to the comment... It does reconize it but not entirely. Are there logs anywhere?  The script works when it is being executed as root!

Accepted Solution

CanadaCouncil earned 0 total points
ID: 38768472
I found a work arround thanks anyway...  I mount the drive in the /etc/fstab

Author Closing Comment

ID: 38782007
it is working

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Simple Linear Regression

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question