0

This is my first attempt at setting up a network, so I apologize if some of this should be obvious.

I'm attempting to share a directory between my Ubuntu 18.04 desktop and my MacOS High Sierra 10.13.5 MacBook Pro using Samba.

Here's what I've done thus far:

I've done the following on my Ubuntu Desktop:

$ sudo apt install tasksel  
$ sudo tasksel install samba-server  
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup  
$ sudo bash -c 'grep -v -E "^#|^;" /etc/samba/smb.conf_backup | grep . > /etc/samba/smb.conf'  
$ sudo smbpasswd -a <username>  
$ sudo nano /etc/samba/smb.conf  

Then I added the following lines to /etc/samba/smb.conf, before saving it

[Shared File Name]
    comment = Ubuntu File Share
    create mask = 0777
    guest ok = Yes
    path = path/to/shared/file
    read only = No

And

$ sudo service smbd restart  
$ sudo chmod 0777 path/to/shared/file

Then I determined the IP address of the Ubuntu desktop using this site: https://whatismyipaddress.com/?u=TRUE

Then on the mac, I did the following:
1) Disabled the FireWall
2) Opened Finder
3) Menu Go -> Connect to server (command-k)
4) entered smb://UBUNTU-IP-ADDRESS in the “Server Address” text box
5) Pressed Connect

At this point I get the following error:

There was a problem connecting to the server "UBUNTU-IP-ADDRESS" The server may not exist or it is unavailable at this time. Check the server name or IP address, check your network connection, and then try again.

Other Info:

I'm trying to network these computers with WiFi rather than through ethernet cables, so I can use the Mac Laptop anywhere.

On my Ubuntu system I have a mounted file (icon of an ethernet port overlays the file) that appeared on my desktop labeled: "Shared File Name" on user-desktop.local

This mounted file contains the folders and files of the desired directory I'd like to share across the network. However, some of the folders have been renamed with names like _9GP6I~F.18 or _13ZOZ~B.18 while others have kept their original name.

At this point my questions are:
1) What mistakes have a made that don't allow me to mount the folder on my Mac?

2) Are there other things I need to do with the Mac, to get it to connect to a Network. Online tutorials have hinted at this but I couldn't find any concrete steps.

3) Are there naming conventions for folders and files that must be followed to avoid the renaming that occurs in the file mounted on the Ubuntu Desktop?

Thank you for taking the time to read this, I appreciate any input.

cmak.fr
  • 8,976
Osuynonma
  • 119

1 Answers1

0

What this question really is about is creating an ad-hock wireless network between an Ubuntu machine and a MacBook and using samba to share files.

Part of this is already been answered here specifically for Ubuntu 18.04: How to setup an Access Point mode Wi-Fi Hotspot?

It goes into more detail than I would have but it comes with screenshots. One thing I would point out is that after you create the HotSpot is will tell you what the network name is and what password your macbook has to use to gain access.

WHat's missing is what to do on the Mac. If you click on the network icon on the upper taskbar you will eventually see the Ubuntu "network name" that you created by creating the HotSpot. It will ask for the password that I mentioned above.

After that Finder will show the Ubuntu host name under Shared.

About the only thing I would change is your share definition. I would change it to this so that you avoid any permissions issues:

[Shared File Name]
    comment = Ubuntu File Share
    create mask = 0777
    guest ok = Yes
    path = path/to/shared/file
    read only = No
    force user = albert

Change albert to your ubuntu login user name.

Morbius1
  • 8,437