Sharing Network Connection

I set up a shared network using Caja. I have no issue connecting if I enable Guest Access. But if not enabled, I am unable to establish a connection. I am using the u/p as set up on the host machine. If I leave u/p blank, I am not even prompted for one when trying to make a connection. I would prefer not to allow anonymous connections. Any suggestions?

Update:Still no luck. I tried Nautilus (because it worked setting up shares in 12.04) but the same results as Caja. I also noticed that the drive with root is the only HD that a share can be made. Even Gust Access did not work with additional HDs. I went to the Mate chat group, all were against a GUI setup for file sharing. I am not sure why Mate claims Caja as a tool to establish a share.

Hi @jaybo,

see “Tips” here (I don’t know how to do shares as I don’t bother myself!):

http://wiki.mate-desktop.org/applications:caja

That was a big help in the right direction. I now have shares working on the root drive. Still need to figure out how to get shares on the other HDs. I can now see the other shares, but get a permission denied when trying to access, even with proper credentials.

1 Like

I’m pretty sure caja works off of samba i haven’t tried sharing with caja but i do use samba. You may try in a terminal sudo smbpasswd -a user user being who you want to be able to access files i use the same user and passwd that i use to log in which gives me access to the home folder and all folders inside i choose to share.

More progress, I am now able to un-click Guest Access and access share on root drive. But I am still unable to share out anything on the other hard drives. I get an error “Unable to mount location, Failed to mount Windows share: Permission denied”

I have not touched smb.conf yet. Looking at it I do not see any changes being made as I modify shares or run the sudo smbpasswd. Is there another configuration file? Also, I can’t find any log files.

It is interesting, regardless if I have Guest Access checked or not, the Ubuntu guest client is required to provide a u/p. The Android client does not require u/p with Guest Access. There have been many changes in setting up a share since Ubuntu 12.04.

Hi @jaybo,

are the target folders also free to share?. :smiley:

The target folders are free to share. I even created am account and granted permissions to the visiting users for each folder.

Even from the host PC as an administrator, I am unable to connect to a network share of any of the non-root hard drives.

Where is this info stored? There are no modifications being made to /etc/samba/smb.conf. Is there another smb.conf?

Caja creates user shares. You can find them in /var/lib/samba/usershares
A normal user has access to this folder. Not only root.
To connect to a share you need a samba user. This is not your os user.
To add a samba user use
sudo smbpasswd -a [username]
You will be asked for a password.
Restart the samba service
sudo systemctl restart smbd

Perhaps this can help. See post three:

http://ubuntuforums.org/showthread.php?t=2250379

Regards.

Using smbpasswd made it possible to un-check Guest Access for the share. But I still have the problem sharing other hard drives. My OS is on sdb. I now have no problem creating shares on SDB. But I want to create shares on sda &sdc. When connecting, it appears the u/p is accepted, but I get the error “Unable to mount location, Failed to mount Windows share: Permission denied”

I tried running “gksu system-config-samba”. After entering password, there was some delay, then the command prompt returned. No GUI or configuration file popped up.

Just curious if there is a different Samba configuration with Ubuntu-Mate 16.04 than previous Ubuntu versions? Most guides I have read seem to refer to older Ubutu (14 or 15) and most commands provided do not work such as “gksu system-config-samba”.

I see all desired shares, all configured similarly, even those that are not working yet (on sda & sdc)

Update: I have successfully connected to sda & sdc. Not sure if it makes a difference or not, but I provided permissions to sambauser for sda & sdc. I still cannot browse to the share, but if I manually enter smb//ip#/share, all seemed to work. All was achieved without manually editing any configuration file. I appreciate all the input I received in this thread. Thanks.

1 Like

system-config-samba is editing the smb.conf, not the user shares in /var.
The gui problem is a well known bug for years.
sudo touch /etc/libuser.conf
After creating this file system-config-samba will start.
I have had problems with connecting from the AndSMB android app. I have seen the share, but the authentication failed.
I found out, that this problem is based on some routers. It’s a dhcp problem. After connecting with the IP (i.e. 192.168.2.20) and not with the computer name it was working fine.
My preferred way to setup samba shares is to edit the smb.conf manually. It takes perhaps two minutes and you will find a working editor on any system with any distribution. :relaxed:

Hi!!

Yes, that’s it. Open a terminal and:

sudo apt install system-config-samba
gksu system-config-samba

And, effectively, to solve the bug:

sudo touch /etc/libuser.conf
gksu system-config-samba

After that then you could use System Config Samba.

Regards!!

1 Like

Now that I am configured properly, I am hesitant to make further changes. However, system-config-samba seems to be a useful tool. I assume this tool will also add or modify users created by “smbpasswd -a user”? I will try later after my next round of backups.

2 Likes