semaphore problem, workaround

Martin Leja Martin.Leja at
Fri Sep 14 08:47:06 GMT 2001


since yesterday i have this strange "Semaphore period was expired" error.
my setup:
samba linux server running kernel 2.4.9, debian woody and samba 2.0.7 which 
is connected to two subnets, one private and one university internet 
subnet, here the extract from /etc/network/interfaces:
iface eth1 inet static
         address X.Y.Z.158   # dont want to let all people know my ip# :)
         broadcast X.Y.Z.255
         gateway X.Y.Z.254
iface eth0 inet static

On the private network i have only a win2kpro box with the ip#
I dont know if its of any importance but I'm masquarading my win box (as 
the linux server) with
iptables -F; iptables -t nat -F; iptables -t mangle -F
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to X.Y.Z.158

Here the [global] section of my smb.conf file:
         workgroup = wg
         netbios name = ASYLUM
         interfaces = eth1 eth0
         security = SHARE
         log level = 0
         syslog = 0
         syslog only = yes
         name resolve order = bcast host
         guest account = ftp
         hosts allow = all
         local master = no     # the win box can play master @
         preferred master = no # and another machine at X.Y.Z.0

I have been using linux samba since about 5 years now with serveral debian 
distribution and kernel updates of course. But for the first time I 
experience the following problem:
* at my win2kpro box i have some drives mapped to some samba shares, 
everything is working just fine

* until i do a "/etc/init.d/samba restart" or a win2kpro reboot

* after that reconnecting the mapped drives fails. I have tested it 
serveral times, windows is complaining with 3 differnt error messages.
either with
Semaphore period was expired
or (2)
AN error occurred while reconnecting L: to \\asylum\admin
Microsoft Windows Network: the local device name is already in use.
This connection has not been restored.
or (3)
Cannot find the file or item '\\asylum'. Make sure the path and file name 
are correct.
Type 'go <SearchText>' to use AutoSearch.

* I cant remember having changed anything yesterday when the errors occured 
for the first time. I'm running kernel 2.4.9 and samba 2.0.7 for about 3 
weeks now without any troubles til yesterday.

* AFAIK the computers on the university internet subnet connected through 
eth1 have no problems accessing the shares of the server

I have found out a workaround, its working but i dont understand it.
After disabling eth1 (the internet subnet) with "ifdown eth1" reconnecting 
to the mapped drives works immediately. And it keeps working if i enable 
eth1 again with "ifup eth1"  but only until i reboot the win2k box or reset 
the samba server with "/etc/init.d/samba restart" as described above.

Can someone please explain this to me? I dont want to do a "ifdown eth1; 
sleep 10; ifup eth1" whenever i want to (re)connect to my shares on my 
samba linux server with my win box.

Regards, martin at

More information about the samba mailing list