Windows share loses connection to client when Windows sleeps

Lestrad

New member
Local time
9:50 PM
Messages
24
Windows share disconnects from Linux client; smbclient can connect

Hello to all. I have a Linux box that mounts a shared folder on my Windows 7 Ultimate desktop when it boots. Everything is fine until my desktop goes to sleep (or I put it to sleep), but once it resumes from sleep the Linux box can no longer find the share on the desktop. But when I run smbclient I can connect to the share with no problem.

As time goes on I'm more and more convinced that this is a problem of interaction between Windows and Linux samba.
The only clue I've been able to find on the Windows side is that the Netlogon and NetGroup Packet Filter Driver services are not started. Could the absence of one of these be the problem?

On the Linux side I've updated samba and enabled winbind, but still no change.
I'd be happy to provide any and all information anyone might need to help with this.

Cheers and TIA
 
Last edited:

My Computer My Computer

Computer Manufacturer/Model Number
Self-built
OS
Windows 7 Ultimate 64
CPU
Intel
Motherboard
Intel DG45ID
Memory
Corsair
Graphics Card(s)
-
Sound Card
-
Monitor(s) Displays
NEC
Hard Drives
2 HD
1 SSD
PSU
Antec
Case
Antec
Open a cmd prompt type

ipconfig /all

Do it when working and as soon as it comes out of sleep compare the 2 does it loose its ip when sleeping often setting a fixed ip solves this its been a problem since vista
 

My Computer My Computer

Computer type
PC/Desktop
OS
win 8 32 bit
Open a cmd prompt type
ipconfig /all

Do it when working and as soon as it comes out of sleep compare the 2 does it loose its ip when sleeping often setting a fixed ip solves this its been a problem since vista
Thanks for answering! Good point. But I have permanent ips set, so that wouldn't be it.

Maybe the errors I get when trying to connect with Linux's smbclient can give a clue:

Code:
Starting GENSEC submechanism gse_krb5
**********Cannot do GSE to an IP address****************
Failed to start GENSEC client mech gse_krb5: NT_STATUS_INVALID_PARAMETER

- and later-

Code:
SPNEGO login failed: The transport connection has been reset.
session setup failed: NT_STATUS_CONNECTION_RESET

Let me know if I should post the entire output - it's long.
 

My Computer My Computer

Computer Manufacturer/Model Number
Self-built
OS
Windows 7 Ultimate 64
CPU
Intel
Motherboard
Intel DG45ID
Memory
Corsair
Graphics Card(s)
-
Sound Card
-
Monitor(s) Displays
NEC
Hard Drives
2 HD
1 SSD
PSU
Antec
Case
Antec
So itsa fixed ip when it goes can you ping anything local or on the net does the router show it connected?
 

My Computer My Computer

Computer type
PC/Desktop
OS
win 8 32 bit
So itsa fixed ip when it goes can you ping anything local or on the net does the router show it connected?
No problem pinging. In fact now I can actually connect to the share with smbclient. But it won't automount.

But when I reboot the Linux box I can connect again until the Windows box goes to sleep and then resumes.
 

My Computer My Computer

Computer Manufacturer/Model Number
Self-built
OS
Windows 7 Ultimate 64
CPU
Intel
Motherboard
Intel DG45ID
Memory
Corsair
Graphics Card(s)
-
Sound Card
-
Monitor(s) Displays
NEC
Hard Drives
2 HD
1 SSD
PSU
Antec
Case
Antec
Update by OP

I'm still looking for a solution to this. In fact, the share seems to disconnect after about 20 minutes even if the Windows PC doesn't go to sleep. Once it does, any attempt to ls causes a hang for half a minute or so. Then I get the message
Code:
 "Host is down."
If I unmount the share and try to re-mount it with mount -av, I get the
Code:
"no such folder or file"
message.

But I can still connect with no problem with smbclient.

What would be very helpful would be to be able to track when the share disconnects and when I try to re-connect to it. I've enabled auditing for the share but the only messages I see in the Event Viewer are
Code:
"The Windows Filtering Platform has blocked a packet."
They sometimes have the Linux box as source, but they never mention the share as such.

Any help would be appreciated.
 

My Computer My Computer

Computer Manufacturer/Model Number
Self-built
OS
Windows 7 Ultimate 64
CPU
Intel
Motherboard
Intel DG45ID
Memory
Corsair
Graphics Card(s)
-
Sound Card
-
Monitor(s) Displays
NEC
Hard Drives
2 HD
1 SSD
PSU
Antec
Case
Antec
Back
Top