Cannot Connect to Samba Shares

Discussion in 'macOS' started by joevslc, May 27, 2008.

  1. joevslc macrumors newbie

    Joined:
    May 27, 2008
    #1
    Aloha

    I have a linux server running samba. When I try to connect from my mac 10.4.11 using smb //ipaddress/folder I receive:

    The Finder cannot complete the operation because some data in "smb //ipaddress/folder" could not be read or written. (Error code -36).

    Can see the shares from the command line:

    joevs-Computer:~ joev$ smbclient -L ipaddress
    Password:
    Domain=[HTPC] OS=[Unix] Server=[Samba 3.0.9-2.3-SUSE]

    Sharename Type Comment
    --------- ---- -------
    data Disk
    joev Disk
    IPC$ IPC IPC Service (Samba 3.0.9-2.3-SUSE)
    ADMIN$ IPC IPC Service (Samba 3.0.9-2.3-SUSE)
    Domain=[HTPC] OS=[Unix] Server=[Samba 3.0.9-2.3-SUSE]

    Server Comment
    --------- -------
    LINUX Samba 3.0.9-2.3-SUSE

    Workgroup Master
    --------- -------
    HTPC

    When I try to connect from the command line I time out and have to ctrl C to exit:

    joevs-Computer:~ joev$ smbclient //192.186.2.10/data
    timeout connecting to ipaddress:445
    ^C

    I have googled and found the problem but no clear cut solutions. Not sure where to go from here.

    Any help is appreciated.

    Aloha
    Joe
     
  2. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #2
    Have you tried including the credentials in your connect string?

    Command+K in finder, then
    Code:
    smb://username:password@ipaddress/sharename
     
  3. joevslc thread starter macrumors newbie

    Joined:
    May 27, 2008
    #3
    Same results from the finder (command K) and a fail to connect from the command line using smbclient //username:password@ipaddress/sharename.
     
  4. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #4
    From command line you should try

    smbclient //192.186.2.10/data "password" -U username

    Or perhaps you need to pass the domain somehow. Look at the smbclient manual (man smbclient) and explore the -A option
     
  5. joevslc thread starter macrumors newbie

    Joined:
    May 27, 2008
    #5
    According to the docs, if the password is not supplied it will prompt you for a password. Which is what happens. The -A option refers to a file that I am not sure if I have, what it would be named, or where it would be.

    In my smb.conf (auto generated from YAST on a Suse distro) there is a map to users file named sambausers in/etc/samba. I added joev = joev. reverted back to the YAST smb.conf and still get the same error when connecting from the Finder and now get:

    joevs-Computer:~ joev$ smbclient //192.168.2.10/joev -U joev
    Password:
    Domain=[HTPC] OS=[Unix] Server=[Samba 3.0.9-2.3-SUSE]
    tree connect failed: NT_STATUS_ACCESS_DENIED

    from the command line. This error is the same whether or not I use the -U option or domain name verses ip address.
     
  6. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #6
    You would create it in the format it desires and pass that filepath as the argument to the -A option. I was referring to the user domain, not the host name.

    So your file would look like (without the angle brackets)
    Code:
    username = <username>
    password = <password>
    domain   = HTPC
    I'd also suggest you review the permissions of what you are sharing, maybe you got something in there that you don't have access to using the user that you are logging in as...

    Other than that, I am out of ideas. Good Luck.
     
  7. joevslc thread starter macrumors newbie

    Joined:
    May 27, 2008
    #7
    Mahalo kingjr3 for the suggestions and help.

    I am now up and running and not quite sure why. I noticed in my smb.conf there was some validation taking place in a file named smbpassd. When I looked at that file I noticed there was only one entry, root.

    So, I did smbclient -U root, entered the password when prompted, and a connection. Next went to command K, entered //ipaddress/share, was prompted for a user and password, and mounted both share volumes.

    I can now access the necessary files I need to complete a project for a client.

    I know some will balk about using root as a user. This is OK for me because I am the only one who uses this server.

    Moral of the story: when the computer has you frazzled, a couple of hours kite surfing gives you a new perspective. :D

    Aloha
    Joe
     

Share This Page