Cannot connect to SAMBA shares on CENTOS7

Page 1 of 2 12 LastLast

  1. Posts : 7
    Windows 10
       #1

    Cannot connect to SAMBA shares on CENTOS7


    Hello everyone,

    I'm having this very annoying issue with samba shares. The server is running on a CentOS 7 distro with samba-4.1.12-23.el7_1.x86_64. My Windows 10 build is 10240.

    The shares are visible but when I try to connect it waits a while and then gives me this error. I do not even get the chance to authenticate. It worked fine on Windows 8.1.

    Cannot connect to SAMBA shares on CENTOS7-screenshot_1.png

    I've tried various config options and none of them worked. However I can connect from my MBP so it's definitely a W10 issue. Here is a copy of my config. Turning off the firewall and selinux also didn't help. I also have a MyBook with samba shares but they do not have this problem.

    Code:
    [global]
    workgroup = WORKGROUP
    server string = Samba Server %v
    netbios name = CENTOS7
    security = user
    map to guest = bad user
    dns proxy = no
    #smb ports = 2222 139
    domain master = yes
    local master = yes
    preferred master = yes
    os level = 65
    #wins support = yes
    server max protocol = SMB2
    
    #============================ Share Definitions ==============================
    
    [server]
    path = /home/server
    valid users = @standard
    guest ok = no
    writable = yes
    browsable = yes
    readonly = no
    
    [test]
    path = /home/test
    valid users = @standard
    public = yes
    guest ok = yes
    writable = yes
    browsable = yes
    Note the "Test" share which I added to make sure it isn't a permissions issue.

    Anyone knows how to fix this? I've run out of options.
    Last edited by Nikecow; 08 Sep 2015 at 09:01.
      My Computer


  2. Posts : 9,785
    Mac OS Catalina
       #2

    You need to be posting this over at the CentOS forums. CentOS Index page I can tell right now that smb.conf is screwed up. That would be why you are having issues. Your workgroup must stay as "WORKGROUP" on all computers. I always kept a copy of the default smb.conf on my NAS or a USB Pendrive. That way if I screwed it up, I could just copy it back to the OS in the proper folder.

    Once you get the default smb.conf loaded back up. You should be able to use "net config workstation" and get the output that is shown here. Samba Server Installation and Configuration on CentOS 7

    As long as you are running CentOS 7, and follow the steps in the above link, it should work. CentOS is based off of Redhat. I tend to stay more towards the Ubuntu spin off of Xubuntu, because it is a lot easier to work with than CentOS, which was made to be used in an Enterprise environment.

    Linux does have a strong learning curve. So be ready to pull hair out if something happens. Also use the search engines and the forums as much as you can to your advantage. It is a lot easier to keep on staying on top of always learning about Linux and its features as much as you can.

    Last but not to be forgotten. Make an image of the install with Clonezilla either on a drive like the Toshiba Canvio, or on a NAS if you have one on your network. That way if you screw up on something and cannot figure out how to fix it. You can pull the image and start back with a working OS.
      My Computer


  3. Posts : 7
    Windows 10
    Thread Starter
       #3

    Hi bro67

    I've used that guide you linked already. It worked for my MBP and W8.1 installation. I've just added some config options because it didn't work at all on W10.

    The config broke with my upgrade to W10 so that's why I thought I should post it here. I've already searched all available info on google about W10 and samba but there isn't a lot info about it yet, understandably. My workgroup is "WORKGROUP" everywhere and the default samba config didn't work either.
      My Computer


  4. Posts : 265
    Windows 10 Enterprise
       #4

    My first thought was to upgrade your Windows 10 build to the current build. Build 10240 is an insider view build and not the one released to the public. That's what I would do first...my 2 cents.
      My Computer


  5. Posts : 7
    Windows 10
    Thread Starter
       #5

    play2mefish said:
    My first thought was to upgrade your Windows 10 build to the current build. Build 10240 is an insider view build and not the one released to the public. That's what I would do first...my 2 cents.
    I am pretty sure that is the one released to the public. I'm currently accepting insider builds on the fast ring yet I don't get any more updates.
      My Computer


  6. Posts : 9,785
    Mac OS Catalina
       #6

    Samba has a few quirks that regardless of what version of Windows that you are using, Windows does not recognize the shares for some reason. Samba always behaves as if you are on a Domain, regardless if it is a Workgroup. Read through this first and do the Registry fix. Windows 8 Support - SME Server

    Try this registry fix in the Windows machines. Linux and Windows 8 Interoperability ADMIN Magazine

    I have to Map my NAS shares on my Lenovo ix2-4 on Windows 10. Used to be that you could just click and connect to the network shares. The latest updates in 8 and 10 in general, for whatever Microsoft did to SMB, you have to play around.

    Also I would change the Advanced Sharing settings from "Allow windows to manage homegroups" to "Use User Accounts and Passwords to connect to other computers." Also use Smb4K to manage the Samba shares. It is for KDE, but will run in any GUI. Make sure that you have Startup Options set for running KDE & Gnome.
    Last edited by bro67; 08 Sep 2015 at 16:52.
      My Computer


  7. Posts : 265
    Windows 10 Enterprise
       #7

    My bad...I confused the numbers with something else, you are correct you have the updated version.
      My Computer


  8. Posts : 9,785
    Mac OS Catalina
       #8

    play2mefish said:
    My bad...I confused the numbers with something else, you are correct you have the updated version.
    10240 is the version that everyone is running right now. The latest build for Insiders is 10532. Depending on what the Service pack for Windows 10 will be late this year, early next, you can keep up on the insider blog that Microsoft has, or be an Insider and receive the latest updates.

    As for the OP. Samba and Windows has been having issues since Windows 7. Mainly because of the changes dealing with Homegroup. The other is changes that Microsoft added to SMB in Windows.

    To get it right and not devote every free hour and lose sleep when dealing with Samba and Windows. You have to try not to get really insane. I have had where I upgraded from one version of Xubuntu to the next. Ended up that it killed Cups, which runs the printer. In turn it also kills Samba, because Ubuntu is still using the older version of Samba.

    Personally the KDE tool works really great when setting up shares and also adding the username that you log into Linux with to the Samba user config.
      My Computer


  9. Posts : 7
    Windows 10
    Thread Starter
       #9

    For anyone interested, I fixed this by setting the samba protocol to 3 which Windows 10 apparently uses.

    "server max protocol = SMB3"

    I also had to give the samba user a samba password on the server with "smbpasswd <username>"
      My Computer


  10. Posts : 11,247
    Windows / Linux : Arch Linux
       #10

    Hi there

    absolutely no problem - running as individual server - not part of a domain.

    I'm running Centos 7

    Samba.conf file


    #======================= Global Settings =====================================

    [global]
    # max protocol = used to define the supported protocol. The default is NT1. You <<<<<<<<<<<<<<<NOTE I used default here
    # can set it to SMB2 if you want experimental SMB2 support.
    #
    workgroup = WORKGROUP
    server string = Samba Server Version %v

    ; max protocol = SMB2

    log file = /var/log/samba/log.%m
    max log size = 50
    security = user
    passdb backend = tdbsam


    load printers = yes
    cups options = raw

    ; printcap name = /etc/printcap
    # obtain a list of printers automatically on UNIX System V systems:
    ; printcap name = lpstat
    ; printing = cups


    #============================ Share Definitions ==============================

    [homes]
    comment = Home Directories
    browseable = yes
    writable = yes
    valid users = %S

    [printers]
    comment = All Printers
    path = /var/spool/samba
    browseable = no
    guest ok = no
    writable = no
    printable = yes

    [Music]
    comment Music files
    path = /mnt/Audio/Music
    guest ok = yes
    writeable = yes
    browseable = yes

    [Films]
    comment Films
    path = /mnt/Movies/Films
    guest ok = yes
    writeable = yes
    browseable = yes

    [Television]
    comment TV series
    path = /mnt/TV/TV
    guest ok = yes
    writeable = yes
    browseable = yes

    [Datastore]

    comment VM's, Backups, data
    path = /mnt/Datastore
    guest ok = yes
    writeable = yes
    browseable = yes

    keep the samba.conf file as simple as possible, use TESTPARM (as root) from a console to test it then restart smb and nmb services.
    Don't use any weird options like Wins, Netbios etc etc. and you don't need to switch off firewall or selinux.

    No problem seeing any of my Windows machines also whether VM's or Real or a combination -- including W10. Note you might have to wait up to 10 mins after starting Samba before the Windows machines are visible -- I think it's the way Windows polls the network but from Windows machines you can always access the Linux shares almost immediately if you in windows from the RUN window type \\linuxmachine. Eventually your machine will show up automatically in the file explorer Network.

    I wish Windows networking was as easy.

    Cheers
    jimbo
      My Computer


 

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

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




Windows 10 Forums