> -----Original Message----- > From: [email protected] [mailto:[email protected]] > On Behalf Of Bob Miller > Sent: Tuesday, April 26, 2011 10:09 AM > To: [email protected] > Cc: [email protected] > Subject: Re: [Samba] smbclient doesn't work from cron > > On Tue, 2011-04-26 at 16:04 +0200, Helmut Hullen wrote: > > > > 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. > > I encountered a couple years ago a problem with a cron command, which I > ended up tracing to cron and the shell (debian system, cannot remember > exactly if it was a different shell or different handling of the shell > that cron uses). > My research led me to a new habit/method of creating cronjobs, one that > forces cron to execute the commands in a bash shell just like you do > from the command line. As Helmut suggests, put your commands in a file, > and then use the bash command to call the script: > 0 10 * * * bash /path/to/file/with/commands > >
My experience also has to do with shell paths not getting set properly, so I now explicitely state the path of all binaries that I want to run. i.e. /usr/sbin/nmbd -D /usr/sbin/smbd -D /usr/sbin/winbindd It's not as robust to transfer between platforms, but it does mean that cron jobs always work. -=Andrew -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
