0

I'm trying to set up a shared folder so that only a specific user (steve) can access. Steve is the only user on my machine and the share is set up using Steve's account.

The share is set up like

enter image description here

On my local Ubuntu Desktop 21.04 machine, when I navigate to Other Locations, double click on my local machine's name under Networks, and double click the Test folder, it says Authentication Required.

I click Registered User, type Steve's password in, and it just re-opens the Authentication Required required window as if I wasn't authenticated.

ls -la says the permissions for the folder are:

drwxrwxrwx  1 steve    steve     0 Aug 28 19:02  Test

Have I missed something when setting up the folder share?


Not sure if it makes any difference, but Test is on an external HDD. Also, I presume it uses Samba but I'm not sure.

When trying to access the shared network folder using a Windows machine, I also get the authentication window. I type in Steve's details, and it says authentication failed.

Dan
  • 155

1 Answers1

3

Turns out there was quite a lot I hadn't done. It wasn't as simple as installing Samba and setting up the folder share by right clicking on it.

I also had to:

  1. Create a samba user account for Steve: sudo smbpasswd -a steve

  2. Configure the smb.conf to set the security mode to user. Ran sudo gedit /etc/samba/smb.conf and added security = user under workgroup = WORKGROUP under the [global] section.

  3. Added a section to the smb.conf defining the information about the folder I wanted to share.

    [Test]
        path = "/media/steve/external drive/Test"
        read only = no
        writeable = yes
        browseable = yes
        valid users = steve
        create mask = 0777
        directory mask = 0777
    
  4. Restarted the smb service by running sudo service smbd restart

I can now access the shared folder both locally through the Networks section and on other machines.


For each folder you want to share, you need to define a section like the 3rd point shows and then restart the service like the 4th point shows

Dan
  • 155