1833876 Members
1609 Online
110063 Solutions
New Discussion

SAMBA / CIFS messages

 
Rudy Williams
Regular Advisor

SAMBA / CIFS messages

Hello--

I am using smbclient every 8 minutes to put or get files from a Windows server. The script is run via cron and sends stdout and stderr to the same log file so cron does not send an email with the output.

Unfortunately, cron sends me an email message with this entry anyway:

Domain=[WINDOMAIN] OS=[Windows Server 2003 3790 Service Pack 2] Server=[Windows Server 2003 5.2]

Is there some way to tell SAMBA/CIFS to be quiet so that I am not receive this message every 8 minutes?
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: SAMBA / CIFS messages

Shalom,

1) take a look at the cron entry. Maybe the output is going to | mailx and it should go to /dev/null

2) Take a look at smb.conf see if the log level is turned up. Change it to zero. Restart the service.

If this does nto work, I am out of ideas.

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Denver Osborn
Honored Contributor

Re: SAMBA / CIFS messages

Can you cut/paste your crontab entry? Also, as SEP suggested, look at you smb.conf to see what log level is set to.

Chances are good there's a problem with your crontab entry as you said it redirs stdout and stderr to the same log... but if it did, you shouldn't get the output emailed when the job runs.

-denver
Rudy Williams
Regular Advisor

Re: SAMBA / CIFS messages

The cron entry is just the script. So any stdout or stderr will be sent to root by email.

I think that I have found the source of the text. After more research, not all of the scripts are producing the dreaded output, only half of them. There is one "smbclient" line in which the stderr is not redirected to a file:

smbclient "$share" "$pass" -D "$ntdir" -c "$command" | awk '{print $1}' \
| egrep "^u[0-9]+$" > $tmp

I will append " 2>&1 " and test. Stay tuned...