Samba and cron jobs

Clinton Byrne ccb at lemon-computing.com
Wed Apr 25 17:16:15 GMT 2001


----- Forwarded message from ccb -----

Date: Wed, 25 Apr 2001 18:00:35 +0100
To: samba at samba.org
Subject: Samba and cron jobs
User-Agent: Mutt/1.2.5i

Hi there!

I am trying to backup my linux files to an NT machine using smbmount-2.2x.
I want this process to be automated so i have written a small backup script that will be run by cron as root. If i run the script interactively it works fine. However when run as a cron job it spits out and error saying access denied. The backup script is as follows:

env | grep PATH
/usr/bin/smbmount //tobermory/comp /pub/tobermory -o password=xxxx, user=abc, uid=0, gid=0, fmask=700, dmask=700, debug=100
/bin/cp -Ruv /home/samba/public /pub/tobermory/Backup/orinoco > /var/log/netbackup 2>&1
/bin/umount /pub/tobermory

The error message mailed to me is as follows:

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
session setup failed:ERRDOS - ERRnoaccess (Access denied.)
SMB connection failed
umount: /pub/tobermory: not mounted

Does anyone have any ideas why cron won't run properly. If i run the /usr/bin/smbmount .. blah blah .... on the command line it works fine

Many thanks

Cheers
Clinton

----- End forwarded message -----




More information about the samba-ntdom mailing list