Page 4 of 4 FirstFirst ... 234
Results 31 to 38 of 38

Thread: Connecting to a samba share?

  1. #31
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Connecting to a samba share?

    Quote Originally Posted by thault View Post
    Code:
    tault@ubuntu:~$ ping THAULTSERV.local
    ping: unknown host THAULTSERV.local
    
    
    tault@ubuntu:~$ ping 192.168.0.111
    PING 192.168.0.111 (192.168.0.111) 56(84) bytes of data.
    64 bytes from 192.168.0.111: icmp_req=1 ttl=64 time=18.6 ms
    64 bytes from 192.168.0.111: icmp_req=2 ttl=64 time=1.27 ms
    64 bytes from 192.168.0.111: icmp_req=3 ttl=64 time=1.21 ms
    64 bytes from 192.168.0.111: icmp_req=4 ttl=64 time=1.19 ms
    64 bytes from 192.168.0.111: icmp_req=5 ttl=64 time=4.49 ms
    64 bytes from 192.168.0.111: icmp_req=6 ttl=64 time=1.18 ms
    64 bytes from 192.168.0.111: icmp_req=7 ttl=64 time=1.77 ms
    ^C
    --- 192.168.0.111 ping statistics ---
    7 packets transmitted, 7 received, 0% packet loss, time 6007ms
    rtt min/avg/max/mdev = 1.189/4.257/18.664/5.985 ms
    
    tault@ubuntu:~$ ping thaultserv
    PING thaultserv (66.152.109.110) 56(84) bytes of data.
    ^C
    --- thaultserv ping statistics ---
    27 packets transmitted, 0 received, 100% packet loss, time 26208ms
    
    
    
    thault@ThaultServ:~$ sudo service avahi-daemon restart
    avahi-daemon: unrecognized service
    The first block is the pings. pinging THAULTSERV.local didn't work. Pinging the LAN address of the server worked. Pinging thaultserv ended in packets dissapearing.

    also the server doesn't have avahi.
    It's pretty obvious at this point that you do not have DNS services that map the hostname (or hostname.local) to an IP address. You do have IP addressing however.

    At this point you can fix the /etc/hosts file if you have immutable (non-changing) IP addresses and thus use hostnames. Or you can use NETBIOS name services via broadcast. Either one will provide you with the ability to interact with the Samba server using an assigned name. I do not recommend installing avahi at all.

    Previously you said you assigned IP addresses via the router. Do you use a reserved address for this Samba server (THAULTSERV I suppose)?

    Post the output of the following from THAULTSERV so we can advise on the proper way to go on this issue.
    Code:
    cat /etc/hosts
    
    cat /etc/network/interfaces
    To summarize, you can use either DNS hosts or NETBIOS broadcasts to allow browsing of the network shares one THAULTSERV. The DNS hosts method traditionally uses fixed IP addressing while the NETBIOS method can use dynamic IP addressing (DHCP).

    It is interesting to note that the DNS hostname is converted internally to a NETBIOS name by Samba. I don't see any reason to use this extra step on a small LAN as Samba uses the NETBIOS name in the end anyway.
    -BAB1

  2. #32
    Join Date
    Dec 2009
    Beans
    6,776

    Re: Connecting to a samba share?

    Quote Originally Posted by thault View Post
    Code:
    tault@ubuntu:~$ ping THAULTSERV.local
    ping: unknown host THAULTSERV.local
    ...
    
    
    thault@ThaultServ:~$ sudo service avahi-daemon restart
    avahi-daemon: unrecognized service
    The first block is the pings. pinging THAULTSERV.local didn't work. Pinging the LAN address of the server worked. Pinging thaultserv ended in packets dissapearing.

    also the server doesn't have avahi.
    First: I don't know which version of the server you are using so start the service instead of restarting it just to make sure it is in fact missing:
    Code:
    sudo service avahi-daemon start
    Second: If it's truly missing install it:
    Code:
    sudo apt-get install avahi-daemon
    Third: Then see if it's running:
    Code:
    sudo service avahi-daemon status
    If it's not running start it. If for some reason it refuses to start reboot the box.

    Go through the exact same thing on the client machine. Then try the ping again. It would be a shame if avahi is disabled on your network since among other things CUPS now uses it to automatically discover and create local print queues for all enabled network printers.

    Question: Did you at any time ever receive an error message that looked something like this:
    Network service discovery disabled - current network has a .local domain, which is not recommended + incompatible with Avahi network. The service has been disabled.
    If you did then that would explain why avahi isn't starting. The problem is the DNS server - or rather how it was configured - by your ISP. You can correct this only by changing the DNS servers to something like OpenDNS or Google's DNS which is something you might not be willing to do. You can also modify a system file to override it's desire to shut down avahi but I try to avoid things that might be reset after an update in the future.

    Another way to verify this is by running the following command:
    Code:
    host -t SOA local
    If your ISP is not the culprit it should come back with this:
    Host local not found: 3(NXDOMAIN)
    If your ISP is capturing the .local assignment it will come back with something like this:
    local has SOA record...
    Side note: Based on your other post it appears you also use OSX. In OSX avahi is called Bonjour and Bonjour faces the same dilemma as avahi but it handless it seamlessly so .local can be used regarless of how the ISP was configured.
    Last edited by Morbius1; February 26th, 2014 at 01:24 PM.

  3. #33
    Join Date
    Jan 2014
    Beans
    54
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Connecting to a samba share?

    Code:
    tault@ubuntu:~$ cat /etc/hosts
    127.0.0.1 localhost
    127.0.1.1 ubuntu
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    
    tault@ubuntu:~$ cat /etc/network/interfaces
    # interfaces(5) file used by ifup(8) and ifdown(8)
    auto lo
    iface lo inet loopback
    We use DHCP, so netbios looks to be the better option.

  4. #34
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Connecting to a samba share?

    Quote Originally Posted by thault View Post
    Code:
    tault@ubuntu:~$ cat /etc/hosts
    127.0.0.1 localhost
    127.0.1.1 ubuntu
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    This is what I expected to see.

    Code:
    
    tault@ubuntu:~$ cat /etc/network/interfaces
    # interfaces(5) file used by ifup(8) and ifdown(8)
    auto lo
    iface lo inet loopback
    This is NOT what I expected to see.
    We use DHCP, so netbios looks to be the better option.
    To use NETBIOS names you have to edit the /etc/samba/smb.conf file to add one line and modify another. To open up the file for editting you do this
    Code:
    sudo nano /etc/samba/smb.conf
    ...then look for the line in the [global] section that looks like this (it's about the 56th line down in the smb.conf file)
    Code:
    ;   name resolve order = lmhosts host wins bcast
    You edit that line and add a line above it so it now looks like this
    Code:
    netbios name = THAULTSERV
    name resolve order = bcast
    ...now save the edited file and close nano.

    The restart the Samba service
    Code:
    sudo service smbd restart
    After a few minutes you should be able to see THAULTSERV by browsing the network shares.

    FYI -- This will not make pinging by name work. You need DNS hostnames working for ping to be successful.
    Last edited by bab1; February 26th, 2014 at 05:48 PM.
    -BAB1

  5. #35
    Join Date
    Jan 2014
    Beans
    54
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Connecting to a samba share?

    is this what it should look like?
    Code:
    # What naming service and in what order should we use to resolve host names
    # to IP addresses
        netbios name = THAULTSERV
    ;   name resolve order = bcast

  6. #36
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Connecting to a samba share?

    Quote Originally Posted by thault View Post
    is this what it should look like?
    Code:
    # What naming service and in what order should we use to resolve host names
    # to IP addresses
        netbios name = THAULTSERV
    ;   name resolve order = bcast
    Remove the semicolon from the second line.
    -BAB1

  7. #37
    Join Date
    Jan 2014
    Beans
    54
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Connecting to a samba share?

    I made the changes, the only thing that shows up in browse networks is windows network.

  8. #38
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Connecting to a samba share?

    Quote Originally Posted by thault View Post
    I made the changes, the only thing that shows up in browse networks is windows network.
    Click on that. The share will eventually show up as a stand alone share but for now it is located by "windows network">>workgroup>>share
    -BAB1

Page 4 of 4 FirstFirst ... 234

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •