1

This is my third attempt to do a simple share of an external hard drive between two Ubuntu 18 computers. I have worked with half a dozen help documents on the web and none of them worked and they all had different instructions.

I would prefer to use the samba GUI and the option to right click on a folder and share it but even with samba users set I get nothing. Setting the share to allow all users does nothing.

I have uninstalled and reinstalled samba to get a clean version. The only thing that has happened so far is that the shares are visible on the second computer but get an error that it cannot log on to windows share.

Is there a tutorial available?

Loffler
  • 19
  • 1
  • 2
  • It is set up as a USB attached device. This is a simple home setup and I just want to be able to access the storage device on the main computer from a laptop. It is easy to set up so that I can access the files on my user shared folder, but that is not where I am storing my photos folder – Loffler Jun 30 '19 at 22:10
  • 4
    Possible duplicate of How to share files through the local network?. I'm assuming you want to keep the USB drive permanently attached to the desktop computer, in this case, the process is not different from sharing a folder on an internal drive. – Nmath Jul 01 '19 at 00:36

1 Answers1

3

It is likely not a samba issue but a Linux permissions issue.

When you attach an external USB storage device to your system it automounts to a mount point at /media/your-user-name/XXX. The problem is Linux sets /media/your-user-name with special permissions ( acl ) that prevents anyone other than "your-user-name" from traversing the folder to get to XXX.

If you set your share allowing guest access the client will never gain access.

THere are a number of ways around this but if this is a home network just edit /etc/samba/smb.conf and right under the workgroup = WORKGROUP line add this one using your local login user name:

force user = your-user-name

Then restart smbd:

sudo service smbd restart
Morbius1
  • 7,761
  • Thanks, I am going to be out of town this week but will try this when I get back. A permissions error seems very likely as the laptop can see the desktop folders but cannot get into them. – Loffler Jul 02 '19 at 04:02
  • That got it working. Double clicking on the folder from the laptop brings me right in. My preference would be to have some requirement for a log on but no one else is on this small network so just having access is okay for now, Thanks for your help. – Loffler Jul 06 '19 at 17:00
  • if this answers the question, please mark it as answer. – musicman1979 Sep 16 '23 at 14:45