[Samba] smbclient doesn't work from cron

Helmut Hullen Hullen at t-online.de
Tue Apr 26 08:04:00 MDT 2011


Hallo, Jeronimo,

Du meintest am 26.04.11:

> /usr/bin/smbclient \\\\windows-server\"backup db"$ -U jelo 123456 -c
> "lcd /root;put mysql-dump.sql"

> But when I try to run the same command from /etc/crontab, it fails:

> 00 10   * * *   root    /usr/bin/smbclient
> \\\\windows-server\\"backup db"$ -U jelo 123456 -c "lcd /root;put
> mysql-dump.sql"

> I tell you I've restarted cron daemon and it always fails.

> What's wrong in cron line ???

One simple way to test the many problems (none of them a samba problem):  
make a simple (executable) shell script and let cron call this shell  
script.
By the way: "smbclient" should accept "/" as delimiter instead of the  
windows delimiter "\". That makes such lines more reliable.

Viele Gruesse!
Helmut


More information about the samba mailing list