9

I have an old dell desktop running ubuntu 11.04, I also have samba installed on it. I'm trying to access the shared folders on the Ubuntu machine from my Mac, so I go into 'Finder', click on 'Go' and 'Connect to Server'.

I type in the ip address of the ubuntu machine smb://xxx.xxx.x.xx and click connect, I can then see the list of shared folders from the ubuntu machine so I know its making a connection. But when I access the 'Music' folder I get an error message stating:

There was an error connecting to the server "xxx.xxx.x.xx". Check the server name or IP address, and try again.

Any thoughts anyone ?

EDIT I have a external hard drive attached to the server, and the folders I'm trying to access are located on that external hard drive.

The location of the folder is /media/HD-CELU2/test, so I think the path from Finder should be smb://xxx.xxx.x.xx/media/HD-CELU2/test, but having tested this, I'm still not getting in.

P.S. I'm using Samba as I have a Windows machine on my home network as well.

fossfreedom
  • 174,526
Stephen
  • 161

3 Answers3

7

I would go on the Mac to the net info then to machines and search for Ubuntu PC's name, copy that name, and use it instead of the IP address. In Finder do: Go -> Connect To and then smb://name/user or smb://` and type in your credentials.

Make sure the samba server (your Ubuntu server) is configured correctly:

Type the following:

 sudo gedit /etc/samba/smb.conf

Rename MSHOME to WORKGROUP or whatever your workgroup's name is.

Then go to the line where the security is defined and add ; at the beginning of the line.

Scroll to the bottom of the file and add/edit your shared folders as follows:

[<folder_name>]
path = /home/<user_name>/<folder_name>
available = yes
valid users = <user_name>
read only = no
browseable = yes
public = yes
writable = yes

Save and restart samba with:

sudo /etc/init.d/samba restart

or

sudo service smbd restart

depending on the version of Linux you're using.

If you haven't already done so, create a user with:

sudo smbpasswd -a yourname

Now go to the network settings and give your Server IP, subnet mask and gateway. You can then connect on the Mac as previously stated (Go -> Connect To -> smb://)

On the Linux box, you need to right-click whatever folder you want to share and go to Network Share or Properties and then click Sharing and click Share This Folder.

To test that your share is working correctly, type

testparm

and you'll see output similar to the following:

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Processing section "[<folder_name>]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Lifted from instructions here and originally found here.

This worked on MacOS Sierra Version 10.12.

3

I suggest that you use sshfs. You need to have a ssh server (ssh-server package) and the sshfs package installed your Ubuntu server and a ssh client installed on your Mac.

sshfs on Ubuntu Server: https://help.ubuntu.com/community/SSHFS

ssh on Mac OS X: http://www.panix.com/help/sw.macosx-ssh.html

Then on your Mac, go to Finder --> Connect to server. Enter the ip address of the server and the port number on which the ssh server is listening (default 22), your username and password of your account on the Ubuntu server and the folder to access (/media/HD-CELU2/test).

Once you are connected, I suggest that you setup a ssh key-pair between your Mac and your Ubuntu server, so that you do not need to enter your username or password next time that you connect.

rigved
  • 2,377
1

Click the Desktop go to GoNetwork (Command + Shift + K if it's not there, it's months since I've used a Mac!), the Mac will then hunt down all network shares on the LAN.

If that doesn't pick it up try smb://hostname where hostname is the name of the sharing computer. I don't know why, but typing smb://ipaddress has never worked for me on any OS.

Octavian Helm
  • 14,515
John
  • 11