Samba share disconnects on client reboot

2

I've recently set up a simple Shamba share on my home server, running Ubuntu 12.04 x64. The share is basically a whole LVM volume residing in my home directory.

Although everything is working more or less as it should, there are some problems.

I'm unable to connect from my client (Win8 x64) using the Netbios name (I'm neither able to ping it), it only works using the IP of the server. This isn't a big problem, but I mention it in case it might be releated to my other problem:

After each client reboot I have to reconnect to the share using the net use command. Connecting to the share via the Windows Explorer GUI has never worked, I suspected because Windows is insisting I have to use a domain (I've tried both my clients and servers hostname and the workgroup name). If I use the net use command it will connect using only /user:mysambauser. I should also mention that the /persistent option does not have any effect - the share is still disconnected upon reboot.

I am a bit unsure if this is actually a problem with my Samba installation or my W8 Client, but I'm posting here anyway hoping that someone might have a clue on what's wrong.

Posting the smb.conf for now, let me know if you need anything else.

#======================= Global Settings ===================================== 
[global]
    workgroup = workgroup
    server string = Alyx Samba %v
    netbios name = alyx
    name resolve order = bcast
    security = user
    map to guest = bad user
    dns proxy = no
    username map = /etc/samba/smbusers
    encrypt passwords = yes
    guest ok = no
    guest account = nobody
    # Logging, disable in production
#   log file = %S.log
#   log level = 3
#============================ Share Definitions ============================== 
[Mesa]
    path = /home/knut/Mesa/
    browseable = yes
    writeable = yes
    valid users = knut

Index

Posted 2013-07-29T21:04:19.980

Reputation: 223

ok'd for migration to superuser: http://chat.stackexchange.com/transcript/message/10571950#10571950

– fossfreedom – 2013-08-01T17:33:48.760

Answers

1

It turns out it was a router issue, or more specifically the local dns domain. A reboot of the router allowed the server to be reached via dns as originally intended and the share now persists.

Index

Posted 2013-07-29T21:04:19.980

Reputation: 223

1

Did you apply the Registry hack for Windows 7/8? Below is the contents of the .REG file I use here

REGEDIT4
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManWorkstation\Parameters]
"DNSNameResolutionRequired"=dword:00000000
"DomainCompatibilityMode"=dword:00000001

Import that (or manually change the values in the registry), reboot, then connect

Source

Canadian Luke

Posted 2013-07-29T21:04:19.980

Reputation: 22 162

Do you have a source / explanation on what this does? I'm generally a bit cautious about doing registry changes without knowing what to expect. – Index – 2013-07-31T20:41:50.017

@KGChristensen Added source to post – Canadian Luke – 2013-07-31T20:44:35.240

Great, thanks. I'll let you know if it works. – Index – 2013-08-01T07:52:50.497

Sorry for the late response. The regfix didn't seem to work, the connection is still lost upon reboot. I have however been able to connect via the Explorer GUI using workgroup\sambauser, but it apart from that I'm still stuck. – Index – 2013-08-10T12:31:12.943

You also only use a bcast type of name resolve. Can you use wins or dns? – Canadian Luke – 2013-08-10T14:26:41.447

Again, sorry for the late response. It turns out it was a router issue, or more specifically the local dns domain. A reboot of the router allowed the server to be reached via dns as originally intended and the share now persists. – Index – 2013-08-14T21:17:34.730

Glad to hear it! Hopefully that helps other visitors – Canadian Luke – 2013-08-14T21:24:36.770