Issue installation Samba - Ubuntu 14.04

Discussion in 'Linux Admins, Storage and Virtualization' started by GCM, May 2, 2016.

  1. GCM

    GCM Active Member

    Joined:
    Aug 24, 2015
    Messages:
    137
    Likes Received:
    43
    I followed the wiki exactly, and every time I try to test the new install I get the following:

    smbclient -L localhost -U%
    Connection to localhost failed (Error NT_STATUS_CONNECTION_REFUSED)

    I've confirmed that samba is running, and have confirmed that there are no iptables rules blocking any ports.

    My samba config is as follows:

    # Global parameters
    [global]
    workgroup = INTERNAL
    realm = INTERNAL.GENERIC.COM
    netbios name = BUS-NY-SAMBA-01
    server role = active directory domain controller
    dns forwarder = 8.8.8.8
    interfaces = eth0 lo
    bind interfaces only = yes

    [netlogon]
    path = /var/lib/samba/sysvol/internal.generic.com/scripts
    read only = No

    [sysvol]
    path = /var/lib/samba/sysvol
    read only = No

    DNS as follows:

    127.0.0.1 localhost.localdomain localhost
    192.168.1.225 BUS-NY-SAMBA-01.internal.generic.com BUS-NY-SAMBA-01

    # The following lines are desirable for IPv6 capable hosts
    ::1 localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters


    After a reboot I get the following:
    BUS-NY-SAMBA-01:~$ smbclient -L localhost -U% session setup failed: NT_STATUS_OBJECT_NAME_NOT_FOUND
     
    #1
  2. pricklypunter

    pricklypunter Well-Known Member

    Joined:
    Nov 10, 2015
    Messages:
    1,524
    Likes Received:
    434
    Prolly only binding to your loopback interface, try changing your bind interfaces only to false and reloading :)
     
    #2
  3. GCM

    GCM Active Member

    Joined:
    Aug 24, 2015
    Messages:
    137
    Likes Received:
    43
    I'm testing it locally though. It shouldn't matter if it's bound to my loop back.
     
    #3
  4. pricklypunter

    pricklypunter Well-Known Member

    Joined:
    Nov 10, 2015
    Messages:
    1,524
    Likes Received:
    434
    I know Samba 2 was buggy, and that was one of the things it threw up, but it was fixed (if you can ever call Samba fixed) in ver 2.1.1 as far as I know, but this also raised it's head again in Samba 4. Binding issues aside for a mo, I take it your permissions are set correctly?
     
    #4
  5. SomeGuyInTexas

    Joined:
    Apr 13, 2016
    Messages:
    56
    Likes Received:
    7
    I tried this weekend to "quickly" get Samba running on a fresh install of Ubuntu 16.04, and at the moment still haven't gotten it working... I found several forums complaining of similar issues, as well as the permissions one. Several have noted setting security = user resolves the CONNECTION_REFUSED error.

    Sent via Tapatalk
     
    #5
    Last edited: May 3, 2016
  6. pricklypunter

    pricklypunter Well-Known Member

    Joined:
    Nov 10, 2015
    Messages:
    1,524
    Likes Received:
    434
    Samba is great when it works and a mare when it doesn't. I seem to recall having all sort of issues with Samba and ext4. I tried every version, tweaking, setting this and that, beginning each time from a clean install. I finally gave up banging my head with it and went back to using ext3 just to get up and running :)
     
    #6
  7. GCM

    GCM Active Member

    Joined:
    Aug 24, 2015
    Messages:
    137
    Likes Received:
    43
    Yeah, I think I may switch over to CentOS. Seems a lot of people have issues with Ubuntu and Samba 4.
     
    #7
  8. pricklypunter

    pricklypunter Well-Known Member

    Joined:
    Nov 10, 2015
    Messages:
    1,524
    Likes Received:
    434
    Debian 8 and CentOS 5.11 are the only ones I have really been successful with getting Samba stable-ish, I haven't tried on CentOS 7, but even then its flaky sometimes :D
     
    #8
  9. EffrafaxOfWug

    EffrafaxOfWug Radioactive Member

    Joined:
    Feb 12, 2015
    Messages:
    1,074
    Likes Received:
    356
    I've been running samba 4 as a domain controller (under jessie) for 2 years now and would definitely call it stable; what steps did you go through with regards to doing your dcpromo? Presumably you're using internal DNS rather than BIND? FWIW I had way less trouble with BIND than I did with samba.

    This was done under samba 4.1 and I'm now on 4.2, but it worked at the time:
    Code:
    samba-tool domain provision --use-rfc2307 --interactive --dns-backend=BIND9_DLZ
    Corresponding entries in the globals for smb.conf were (I think you need winbindd instead of winbind for samba 4.2):
    Code:
    [global]
            workgroup = MAGRAMAL
            realm = MAGRAMAL.LOCAL
            netbios name = WUG
            server role = active directory domain controller
            server services = s3fs, rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbind, ntp_signd, kcc, dnsupdate
            idmap_ldb:use rfc2307 = yes
     
    #9
  10. GCM

    GCM Active Member

    Joined:
    Aug 24, 2015
    Messages:
    137
    Likes Received:
    43
    Pretty much did the same as you, but I did use the internal.
     
    #10
  11. EffrafaxOfWug

    EffrafaxOfWug Radioactive Member

    Joined:
    Feb 12, 2015
    Messages:
    1,074
    Likes Received:
    356
    Then all I can suggest is trying to drop the `bind interfaces` option; I'd originally inherited an `allow hosts` option in my smb.conf and when samba was converted into a DC, it all fell over in a big heap - from ramping up the debug level in the logs it seemed that samba was using a lot of weird internal names that didn't match hosts allow and were therefore dropped.

    You also don't mention your `server services` config, when I set mine up at least it was needed, checking now the defaults are
    Code:
    s3fs rpc nbt wrepl ldap cldap kdc drepl winbind ntp_signd kcc dnsupdate dns
    ...which would seem to match your intended configuration so it doesn't look like that is something to worry about.

    Presumably your resolv.conf is all in order and dig is happy as a sandboy for forward and reverse...? Can you locate the DC SRV records with host? Iffy DNS behaviour when samba was misbehaving was my biggest reason for going the BIND DLZ route so that even when samba got its knickers in a twist I'd still have a functional DNS server.

    Assume your krb5.conf config is all in order?
     
    #11
  12. GCM

    GCM Active Member

    Joined:
    Aug 24, 2015
    Messages:
    137
    Likes Received:
    43
    I'll try that.

    And yep, DNS records are perfectly in order and tests good.

    Same with kerberos.
     
    #12
Similar Threads: Issue installation
Forum Title Date
Linux Admins, Storage and Virtualization [FIXED] Issues with CentOS7 OVH kernel Aug 5, 2019
Linux Admins, Storage and Virtualization Proxmox issue on grub boot Jul 23, 2019
Linux Admins, Storage and Virtualization Proxmox - I350 and sr-iov issues Mar 20, 2018
Linux Admins, Storage and Virtualization Linux mdadm scaling issues Mar 6, 2018
Linux Admins, Storage and Virtualization Proxmox & WHMCS API issue. Mar 1, 2018

Share This Page