OpenWrt Forum Archive

Topic: "mount -t cifs" - flaky operation with Windows 2003

The content of this topic has been archived on 16 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Here is the issue. I am running Kamikaze 7.09 (2.4 kernel) on WRT54G (v4) with the"cifs" module.

I go to win2k3, and setup a share there, but keep the "File and Printer sharing for MS Networks" disabled.

I try to mount on WRT54G, command similar to:
mount -t cifs //my-pc/share /mnt/point -o unc=\\\\my-pc\\share,ip=192.168.1.100,user=john,pass=doe

And the mount hangs (Ctrl-C to exit).

I go enable "File and Printer sharing for MS Networks", try again. It hangs again (Ctrl-C to exit).

I go to Microsoft firewall (it is "on"), and enable exceptions for "File and Printer sharing".

Now I try to mount, and it succeeds! If I do "umount" and "mount" again, it succeeds again.

I reboot the router, and try the mount. It goes through, but does not mount anything.

I disable "File and Printer sharing for MS Networks"  and remove firewall exceptions for "File and Printer sharing", reboot the router, and try the mount. It goes through quickly and does not mount anything.

Only after I reboot Windows 2003, and keep "File and Printer sharing for MS Networks" off, then if I try to mount on WRT, it hangs (good sign!). Then I enable "File and Printer sharing for MS Networks" and make a firewall exception again, and it works.

So there seem to be some tricky interplay between WRT and Windows file sharing going on ...

Here is an update. It looks like the issue is most likely some weird bug/feature in Windows 2003.

The solution is a bit kludgy, yet takes only 1 click after the setup. Basically, the idea is to "reboot" the network card, then I can properly mount Windows share on the router again.

Download "devcon" from http://support.microsoft.com/kb/311272

Copy "devcon.exe" to C:\windows\system32, or wherever your windows is.

Open a DOS window and run "devcon find pci*"

In devices, find your network card, such as this line for my computer :
PCI\VEN_14E4&DEV_170C&SUBSYS_018D1028&REV_02\4&16793A72&0&28F0: Broadcom 440x 10/100 Integrated Controller

On desktop, create a file "net_reset.cmd", and put the following commands in there:
###
@echo off
echo Disabling the network adapter...................
devcon disable "PCI\VEN_14E4&DEV_170C&SUBSYS_018D1028"
echo Done................
echo Enabling the network adapter ...............
devcon enable "PCI\VEN_14E4&DEV_170C&SUBSYS_018D1028"
echo Done................
###

Note that the device line is the one you determined for your device, in my case it was "PCI\VEN_14E4&DEV_170C&SUBSYS_018D1028", but yours will be different.

Anytime windows share is flaky, just reboot the network card, and it will work again!

The discussion might have continued from here.