Samba Share - Connection Refused

  • Having issues with smb/cifs share. Attempts to connect to share from client (Linux and Windows) result in connection refused. The client machines have no problem connecting to samba share on a different Linux machine via samba.


    OMV share was setup using web gui and followed several different installation guides found. Searched forum and didn't find a solution to the connection problem. Also did a reboot after setting up and making changes to the share (suggestion from another thread.)


    smbclient -L results in connection failed (Error NT_STATUS_CONNECTION_REFUSED)


    This is a new install of omv3.0.59. First experience with omv - but everything went smoothly until tried to connect to the Test share. User was given privileges to read/write the share. Allowed guest access to try and eliminate any permissions issue.


    Below is smb.conf file generated by setting up the share from the web gui. Hoping there is a fix that I have overlooked.


    #======================= Global Settings =======================
    [global]
    workgroup = WORKGROUP
    server string = %h server
    dns proxy = no
    log level = 2
    syslog = 2
    log file = /var/log/samba/log.%m
    max log size = 1000
    syslog only = yes
    panic action = /usr/share/samba/panic-action %d
    encrypt passwords = true
    passdb backend = tdbsam
    obey pam restrictions = no
    unix password sync = no
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    pam password change = yes
    socket options = TCP_NODELAY IPTOS_LOWDELAY
    guest account = nobody
    load printers = no
    disable spoolss = yes
    printing = bsd
    printcap name = /dev/null
    unix extensions = yes
    wide links = no
    create mask = 0777
    directory mask = 0777
    map to guest = Bad User
    use sendfile = yes
    aio read size = 16384
    aio write size = 16384
    null passwords = no
    local master = yes
    time server = yes
    wins support = no
    #======================= Share Definitions =======================
    [Test]
    path = /media/7b25cf9f-53f7-4767-8ff2-053a436ead4d/Test
    guest ok = yes
    read only = no
    browseable = yes
    inherit acls = yes
    inherit permissions = no
    ea support = no
    store dos attributes = no
    vfs objects =
    printable = no
    create mask = 0664
    force create mode = 0664
    directory mask = 0775
    force directory mode = 0775
    hide special files = yes
    follow symlinks = yes
    hide dot files = yes
    read list =
    write list = "bill"

  • regarding firewall comment - did you mean on the omv computer or client?


    I did not activate on the omv setup unless the install does so by default. No firewall on the client machines.


    Web gui shows smb as green. Should I check via command line? If so what command would I use to confirm samba is running on omv?


    Thanks

  • Output:


    ps aux | grep smbd:


    2151 0.0 0.0 12728 2276 pts/0 S+ 07:16 0:00 grep smbd


    systemctl status samba-ad-dc:


    Samba-ad-dc.service - LSB: start Samba daemons for the AD DC
    Loaded: loaded (/etc/init.d/samba-ad-dc)
    Active: active (exited) since Fri 2017-01-20 07:10:47 CST; 7min ago
    Process: 897 ExecStart=/etc/init.d/samba-ad-dc start (code=exited, status=0/SUCCESS)


    Jan 20 07:10:47 openmediavault systemd[1]: Started LSB: start Samba daemons ....
    Hint: Some lines were ellipsized, use -l to show in full.


    Any help appreciated.


    Thanks,

  • Samba connection issue solved. I had an Ah Ha moment after several days of head banging.


    Issue was the hostname length exceeded what Samba allows. hostname was openmediavault -14 characters long. I believe Samba has a maximum allowable length of 13 characters.


    Changed the hostname to something shorter, and everything works.


    Subzero79 thanks for considering my problem.

    • Offizieller Beitrag

    Pretty sure it can be 15 characters. A Windows box can be 15 and it works. Changing the hostname probably just rewrote a config file you needed re-written.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Ryecoaaron thanksfor the comment. Noticed we are in same state.


    I'm not veryterchnically savy with Linux or Samba. Several sites that I ranacross specify not having the hostname longer than 13 characters whenusing Samba. Technical explanations were given on why the 13characters, but beyond my scope of understanding.


    Previously I had thesame problem with a different linux distribution and Samba. When thehostname was 15 characters, Samba refused connections from othercomputers. When the hostname was shortened, Samba worked perfectly.


    I don’t think thesmb.conf file being rewritten the reason it suddenly started working.Over the course of several days of troubleshooting, made changes tosmb.conf based on recommendations found in various forums includingthis one. Each time ran testparm and either restarted samba orrebooted the computer.


    What led me tosolving my issue was several forum postings to users with sambaissues gave the suggestion to add netbios line to the smb.conf. Itried the suggestion but no success. Then I noticed that the smb.confhad truncated the last character or two in the hostname. Seeing thelast few letters missing reminded me of the long name issue withanother linux distribution and samba.


    I shortened thehostname for the pmv computer and deleted the netbios line in smb.confand my samba connection issue was solved.


    Since I don’t havethe technical background, can’t state with certainty thatshortening the name fixed the issue – but there are numerousreferences on the web indicating the 13 character limitation. I doappreciate not everything on the web is accurate, but twice myconnection issues were solved by shortening the hostname. Maybe lucky. :)


    As a user passedalong what seemed to fix my issue with Samba in case it helps someone else.


    Thanks,

    • Offizieller Beitrag

    Just tried with a 15 character name and it worked fine. Changed the hostname to an 18 character name and it still worked but samba automatically truncates it to the first 15 characters. The 13 character limit from what I found referred to Novell networking stuff because it appended a -w to the hostname.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I actually have a similar issue. I can't connect with a mac or a PC. I followed the setup in the wiki to the letter. It's like the OMV server name, and service type (SMB/CIFS) is broadcasting, but not the actual share.


    Connecting from a mac: The hostname of the OMV server shows in the Finder, but the connection has failed. When I click on "Connect as" I get this error.



    If I try to connect via SMB or CIFS manually using the IP address I get this.



    Connecting this way using hostname gets me the same result.


    Connecting from a PC: I get nothing. It doesn't show up anywhere in network discovery. If I try to connect to it by hostname or IP address, it just times out.


    I can ping the OMV server from all nodes on my LAN. I just cant connect via SMB/CIFS or FTP. I haven't tried enabling NFS as that won't do my Windows clients much good. I want to get SMB to work. I don't have anything set up on the firewall page in the webgui. Is there one on by default? Is that page for just configuring pinholes? If so, can I just turn the firewall completely off? I haven't changed any permissions manually through bash. I thought the whole point of OMV was that you could do everything you need to do through the webgui. SMB/CIFS and FTP are both enabled and green according to the webgui. My user is created and configured to have read/write access to the shared folder I created. I haven't tried connecting from a Linux box. I'll try that tonight.


    So far OMV has not worked for me at all. I had more success with setting up a samba share through Mint. I just like the idea of this being so lean. OMV has only the features I want (samba and rsync) without all of the other unnecessary crap software that coms bundled with a distro. Now if only I could get it to work. Any help would be greatly appreciated.


    Another note. I am using the same username and password combination on every node including the OMV server.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!