Hail to the great Samba gurus,
I have a frustrating problem with a daily bash script that uses Samba on CentOS
5.10 to mount a share drive from a Windows Small Business Server 2011 Standard.
It had been working fine for months but mid-November the script started
intermittently failing at:
mount -t cifs -o user=AsteriskReports,pass=password,domain=CARETOUCH
//ctserve2/ct/Marketing/Daily\ Call\ Metrics /DailyCallMetrics
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
I say intermittently because the script would fail only two or three days a
week. The other four or five days the script ran flawlessly. Adding the
"sec=" option appeared to have no effect. I suspect this problem is
on the Windows side because I took packet traces of successful and failing
authentication attempts. The packets are pretty much the same save for the
encrypted challenge hashes.
Today I discovered that initial mount requests seem to succeed but subsequent
ones right after fail. With some trial an error, I found that waiting 180
seconds between umount and mount request seems to resolve the problem. So, this
suggests to me some sort of cached credentials problem on the Windows side.
I've modified the script to wait 4 minutes between each mount request but
this is a kludge fix and I'd like to resolve the issue properly. Might
anyone have any ideas of tests I could run to pinpoint and resolve this issue?
Brian