Trying to connect OS X to Samba share under Ubuntu.

Discussion in 'Other Operating Systems' started by flu!d, Apr 30, 2016.

  1. OP
    OP
    flu!d

    flu!d Never perfect, always genuine

    Joined:
    Jun 27, 2001
    Messages:
    19,988
    Here you go:

    [​IMG]

    I assume the mount point isn't being found by the Mac as the Mac cannot authenticate the login credentials.
     
  2. OP
    OP
    flu!d

    flu!d Never perfect, always genuine

    Joined:
    Jun 27, 2001
    Messages:
    19,988
    And looking at that image, I've got totally the wrong mount point, idiot.

    Here's another screenshot with the correct mount point (being /home), there's something wrong with that command:

    [​IMG]
     
  3. Fred Nurk

    Fred Nurk Member

    Joined:
    Apr 5, 2002
    Messages:
    2,251
    Location:
    Cairns QLD
    I think elvis was on the money with the use of nmap, clearly the network is up, the devices in question are responding, but there's no indication that SMB is actually open on the host.
     
  4. ex4n

    ex4n Member

    Joined:
    Oct 5, 2011
    Messages:
    2,223
    Location:
    Perth
    Try creating a new folder to mount to eg. /Users/matt/test

    mount -t smbfs //matt@192.168.0.13/Complete /Users/matt/test

    assuming your share is actually called Complete
    Tried this on my hackintosh vm and it works.

    Code:
    hxint0sh:~ madhax$ pwd
    /Users/madhax
     madhax$ mkdir testies
    hxint0sh:~ madhax$ mount -t smbfs //patrickr@192.168.12.28/testies /Users/madhax/testies
    Password for 192.168.12.28: 
    hxint0sh:~ madhax$ ls testies
    testfile.txt
    hxint0sh:~ madhax$ 
    
    edit: also works in the format I mentioned above - with user : password @ hostname - so something else (not the command, unless it's depricated in el capitan) is the issue.
     
    Last edited: May 3, 2016
  5. OP
    OP
    flu!d

    flu!d Never perfect, always genuine

    Joined:
    Jun 27, 2001
    Messages:
    19,988
    Ok,

    Sorry, I misunderstood the context of the command before, your last example makes it clear.

    So I format the command the way you describe, essentially mounting matt@192.168.0.13/Complete to Users/matt/test on the Mac and the command still does not work with the error invalid argument.

    Could it be that the command is depreciated on El Cappytian?

    Share is without a doubt 'Complete' and IP is defiantly 192.168.0.13 on the Ubuntu machine.

    [​IMG]

    [​IMG]

    [​IMG]
     
    Last edited: May 3, 2016
  6. ex4n

    ex4n Member

    Joined:
    Oct 5, 2011
    Messages:
    2,223
    Location:
    Perth
    i'm pretty much out of ideas, maybe time to ask a 'genius'?
    if you share a folder on your windows pc and try to connect, does that work?

    if you haven't already (can't see it) can you post up a sanitized version of your smb config for this share?

    here is an example i'm happy to share. if yours looks radically different, maybe try something like the below, replacing my name with yours, and then on your ubuntu server, you need to restart samba. "sudo service smbd stop && sudo service smbd start && sudo service nmbd stop && sudo service nmbd start" will take care of that.

    example share

    [monster-server]
    comment = NAS - FTB Monster Server
    path = /home/patrick/monster-server
    valid users = patrick
    browsable = yes
    read only = no
    writeable = yes
    write list = patrick
    create mask = 0755
     
    Last edited: May 3, 2016
  7. OP
    OP
    flu!d

    flu!d Never perfect, always genuine

    Joined:
    Jun 27, 2001
    Messages:
    19,988
    Yes, the Mac is able to see and connect to Windows shares just fine, it's only the Ubuntu Mate box that the Mac refuses to connect to - But everything else in the house connects just fine.

    I have no issue posting a my samba config similar to your example, I will do it tomorrow.

    One thing I have done before I call it a night is performed a port scan on the Ubuntu PC using nmap, i see TCP ports 139 and 445, I thought I was also supposed to have TCP 137 and 138 visible and listening? Is there any UDP ports I should be seeing?

    Screenshot below:

    [​IMG]

    This is very interesting and I must say I'm learning a lot troubleshooting the issue with everyone's help, thank you very much people.
     
    Last edited: May 3, 2016
  8. ex4n

    ex4n Member

    Joined:
    Oct 5, 2011
    Messages:
    2,223
    Location:
    Perth
    Sounds like the mac side of things is fine, if it can connect to windows shares no problem.

    I'm pretty sure they are the only ports you need to worry about, nothing missing.

    last suggestion from me is to try specifying a ports in your command, as they are both technically different protocols, i believe you can do this, although i don't recall ever having to. see if that helps. The -v is for verbose, it should (hopefully) give more data if it doesn't work. If the -v is causing issues just remove it.

    eg.

    mount -t smbfs -v //matt@192.168.0.13:139/Complete /Users/matt/test
    mount -t smbfs -v //matt@192.168.0.13:445/Complete /Users/matt/test

    edit: out of interest I checked my ubuntu file server, serving smb and nfs

    Code:
    nmap -sS -sU -p U:111,137,138,2049,T:111,139,445,2049 192.168.1.100
    
    Starting Nmap 6.40 ( http://nmap.org ) at 2016-05-03 20:44 AWST
    Nmap scan report for 192.168.1.100
    Host is up (0.00018s latency).
    PORT     STATE         SERVICE
    111/tcp  open          rpcbind
    139/tcp  open          netbios-ssn
    445/tcp  open          microsoft-ds
    2049/tcp open          nfs
    111/udp  open          rpcbind
    137/udp  open          netbios-ns
    138/udp  open|filtered netbios-dgm
    2049/udp open          nfs
    
    Nmap done: 1 IP address (1 host up) scanned in 3.48 seconds
     
    Last edited: May 3, 2016
  9. OP
    OP
    flu!d

    flu!d Never perfect, always genuine

    Joined:
    Jun 27, 2001
    Messages:
    19,988
    ex4n, are you running a straight standalone Samba fileserver or are you also running AD?
     
  10. ex4n

    ex4n Member

    Joined:
    Oct 5, 2011
    Messages:
    2,223
    Location:
    Perth
    just samba and nfs - no AD. this box is ubuntu 14.04 but should be very similar to your setup.
     
  11. OP
    OP
    flu!d

    flu!d Never perfect, always genuine

    Joined:
    Jun 27, 2001
    Messages:
    19,988
    Just a little update.

    Out of shear frustration I decided to bite the bullet and compleately remove and re install Samba on the Ubuntu Mate PC....

    ...Now, magically, everything is working fine, the share was picked up straight away and authenticated with no issue whatsoever.

    Got me stuffed.

    However, thank you so much to everyone that took the time to help me out, we have an awesome community here and it feels good to be a part of it.:thumbup:
     
  12. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    45,684
    Location:
    Brisbane
    Ah, too late now, but I reckon this was the problem.

    Note ex4n's nmap output, with udp 137 and 138 listening, as you've alluded to here. They're Netbios, aka "nmb", aka winbind.

    When you start Samba, there's two services you need to start - Server Message Block Daemon (smbd) and Name Message Block Daemon (nmbd).

    I'd put money on your previous install not running nmbd for whatever reason (whether it was missing from the config file by specifically disabling winbind/netbios, or if the service wasn't set to autostart).

    [edit] Although, you passed no arguments to nmap. So maybe not...
     
  13. OP
    OP
    flu!d

    flu!d Never perfect, always genuine

    Joined:
    Jun 27, 2001
    Messages:
    19,988
    You know Elvis, this is just a theory as TBH I didn't check, but I think I may have been running an outdated version of Samba. Although I'm not too sure how I could have been as I added the PPA, unless the PPA was disabled with the 16.04 update.
     
  14. ex4n

    ex4n Member

    Joined:
    Oct 5, 2011
    Messages:
    2,223
    Location:
    Perth
    Glad you managed to get it sorted, good chunk of info dumped into this thread now if anyone else has the same problem.

    I'm not sure what is the best way to install samba, but for me, I always use tasksel. I don't think any kind of ppa should be required for samba, maybe someone a bit more knowledgeable could confirm the best way.
     
  15. OP
    OP
    flu!d

    flu!d Never perfect, always genuine

    Joined:
    Jun 27, 2001
    Messages:
    19,988
    Come to think of it, I'm sure I downloaded it from the Ubuntu repositories using apt as Ubuntu MATE doesn't come with Samba by default - Neither does vanilla Ubuntu from memory, but the second you tick 'share this folder' Samba is automatically downloaded and installed under vanilla Ubuntu.

    But, it was so long ago who knows.
     
    Last edited: May 5, 2016
  16. syl_kn

    syl_kn New Member

    Joined:
    May 5, 2016
    Messages:
    1

    Hey,
    I have been experiencing the exact same problem as you (authentication) and have been following and trying out all the suggestions in this thread. But when I got to this one, it worked! My workgroup was called workgroup and it was already displayed in WINS, too....however, I selected it in from the dropdown anyway (you might notice its in lowercase when you select it) and then clicked ok. THEN I was able to connect to my samba share! I've had this problem for a week and I had tried nearly everything! I'm so happy now. I thought I'd share that with you in-case you haven't tried it.

    THANKS!
     
  17. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    45,684
    Location:
    Brisbane
    Shouldn't be an issue. We've got new Macs here that connect to Samba3 servers on CentOS6.
     

Share This Page

Advertisement: