Can't connect to Samba running on Raspbian from Windows 7 Home Premium


  1. Posts : 16
    Windows 7 Home Premium 64-bit
       #1

    Can't connect to Samba running on Raspbian from Windows 7 Home Premium


    Hello,

    I've spent days on this and hours researching what others have tried but no joy.

    I've got Samba 4.5.8-Debian running on Raspbian [GNU/Linux 9.1 (stretch)]. I am trying to connect to a shared folder on the Raspbian OS by connecting from Windows 7 (Home Premium). I get a pop up username/password log-in box but it never authenticates me. I've tried dozens of permutations of the settings in smb.conf and even made registry changes. Nothing has worked!

    I have tested accessing the share from an Ubuntu machine and it does authenticate.

    Here is my smb.conf file. It does allow an Ubuntu machine access the share but not a Win 7 Home Premium client:

    Code:
    # Global parameters
    [global]
            log file = /var/log/samba/log.%m
            max log size = 1000
            syslog = 0
            panic action = /usr/share/samba/panic-action %d
            usershare allow guests = Yes
            map to guest = Bad User
            obey pam restrictions = Yes
            pam password change = Yes
            passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
            passwd program = /usr/bin/passwd %u
            server role = standalone server
            unix password sync = Yes
            dns proxy = No
            idmap config * : backend = tdb
    
    [NextCloudPi]
            path = /var/www/nextcloud/data/admin/files
            create mask = 0770
            directory mask = 0771
            force create mode = 0660
            force directory mode = 0770
            force group = www-data
            read only = No
            valid users = pi
    If I put [guest = ok] in the [NextCloudPi] share definition it lets me straight in to the share without prompting for username/pwd and I can then browse the files in the share but I want to get the authentication working.

    I checked with smbpasswd and the [pi] Samba user does exist both in Samba and in the Raspbian OS and I even changed the pwd to be sure I am using the correct one from the Windows log-in pop up.

    Here is the error I get:



    Other things I tried:
    1. Updated the /etc/hosts file in Win 7 to map the (fixed) ip address of the pi to its hostname: nextcloudpi
    2. Open regedit and navigate to HKLM\SYSTEM\CurrentControlSet\Control\Lsa then choose to create DWORD named LmCompatibilityLevel then set the value to 2 although value 1.
    3. HKLM\System\CCS\Services\LanmanWorkstation\Parameters
    DWORD DomainCompatibilityMode = 1
    DWORD DNSNameResolutionRequired = 0

    I have also turned on Network discovery, File and Printer sharing with 128 bit encryption.

    From my reading there could be a hundred different things that would work for someone else but not for my setup. Nevertheless I would be very grateful for any help or assistance.

    Cheers,

    SeanieOS
      My Computer


  2. Posts : 705
    Windows 7 Ultimate x64
       #2
      My Computer


  3. Posts : 16
    Windows 7 Home Premium 64-bit
    Thread Starter
       #3

    Problem Solved


    Have I added them to the Samba list? By "them" I suppose you mean the user I am trying to log in to the Samba share with.

    From my original post:

    I checked with smbpasswd and the [pi] Samba user does exist both in Samba and in the Raspbian OS and I even changed the pwd to be sure I am using the correct one from the Windows log-in pop up.
    Still though, thank you for responding. I'm surprised at how quiet these forums are. I guess people are slowly migrating to Windows 10.

    I had set the DWORD: LmCompatibilityLevel value in HKLM\SYSTEM\CurrentControlSet\Control\Lsa to 2 which made the Win 7 client connect to Samba server on the Raspberry Pi with NTLM encryption but Samba is using SMB3 version of the Samba protocol which only deals with NTLMv2. By setting that Win 7 registry setting to 3 it started working again.

    Full details in this far more helpful forum... Can't connect to Samba running on Raspbian from Windows 7 Home Premium

    Cheers,

    Flex
      My Computer


  4. Posts : 705
    Windows 7 Ultimate x64
       #4

    You can frame your question here too.
    or maybe another linux forum.
    LinuxQuestions.org
      My Computer


  5. Posts : 1,784
    Linux Mint 18.2 xfce 64-bit (VMWare host) / Windows 8.1 Pro 32-bit (VMWare guest)
       #5

    SeanieOS said:
    I'm surprised at how quiet these forums are. I guess people are slowly migrating to Windows 10.
    In my case, if I haven't posted an answer to someone's question, it's because I don't know the answer.

    Your question is about an unusual topic, and perhaps a difficult one. Sometimes networking between Linux and Windows, or Linux and Linux, can be difficult. This is something I'm trying to do on my own network, but so far without success.

    I will be keeping up with your question, and any responses, however, because maybe the answer I need will be included in someone's response.

    Good luck.

    Jim
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:38.
Find Us