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
On Wed, 25 Apr 2001, Clinton Byrne wrote:> 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=100Do you really have space between the options? Try removing the spaces ...> 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 fineDifferent paths? /Urban