Accessing Samba Shares Linux Mint 17 Cinnamon [Solved]

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
dschaf

Accessing Samba Shares Linux Mint 17 Cinnamon [Solved]

Post by dschaf »

I see a lot of questions in regards to Samba shares being set up, but I'm trying to access them. Here is my situation:

I am in an office environment where we are moving to a Linux environment. We are trying to keep everything in the same family, so Zentyal as our server, Mint or Ubuntu as our desktops since they're all Debian-based (Zentyal is actually derived from Ubuntu). On the Zentyal server I have set up a Samba share folder with guest access. I can see this share from a windows machine. When I click on the "Network" icon in Mint I can see our company's windows domain, but not the new test domain for Zentyal (using the default zentyal-domain.lan). However when I type in smb://198.1.1.8 I can see the shares on our Zentyal server.

When I click on these shares however, I am getting a pop-up error that says: "Failed to mount Windows share: Permission denied". It is not asking for a password or anything, just going straight to that error message. Interestingly enough I was able to access the shares fine when I was booting from the LiveCD, it was only after installing Mint to the hard drive that I starting getting this error message. I have tried to install smbclient and was told I have the latest version.

Some additional information if it helps:

Zentyal 4.0 uses Samba 4 for it's Samba shares.


Thank you,
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Accessing Samba Shares Linux Mint 17 Cinnamon

Post by altair4 »

"Failed to mount Windows share: Permission denied"
That is usually not a samba error but a Linux permissions error.

The share may allow guest access but the Linux permissions on the folder being shared do no allow "other" access to the folder so I would check that on the server.

There is one peculiar bug that happens from time to time when samba is installed in Mint / Ubuntu. One of it's parameters in smb.conf is set incorrectly which also impacts the client. To find out run this in Mint:

Code: Select all

testparm -sv | grep "encrypt passwords"
It should be set to Yes or True.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
dschaf

Re: Accessing Samba Shares Linux Mint 17 Cinnamon

Post by dschaf »

Thank you for the quick reply. I ran the

Code: Select all

testparm -sv | grep "encrypt password"
on both my Linux Mint machine and the Zentyal server, both have encrypt passwords = Yes so then from the server I did an ls -l on my samba folder. The "shares" folder was drwxrwx---, but the "scans1" folder (the one I'm trying to access) which is inside of shares was drwxrwxrwx+, just to make sure I did change the shares folder with chmod 777 but this still did not fix the problem.


I am able to connect to the shares if I open the file manager and go to File -> connect to server... , put in the information and then a username and password. However, these connections are then lost on reboot which wouldn't work for the less computer savvy employees who would just want to be able to access their shares. Perhaps the easiest way to fix the problem would be to auto-mount those directories on bootup, and pass them the username and password at that time, but I am not sure if that is possible/how to do that.
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Accessing Samba Shares Linux Mint 17 Cinnamon

Post by altair4 »

dschaf wrote:I am able to connect to the shares if I open the file manager and go to File -> connect to server... , put in the information and then a username and password. However, these connections are then lost on reboot which wouldn't work for the less computer savvy employees who would just want to be able to access their shares. Perhaps the easiest way to fix the problem would be to auto-mount those directories on bootup, and pass them the username and password at that time, but I am not sure if that is possible/how to do that.
Well if it works via the "Connect to Server" mechanism you could create a bookmark in Nemo. Just go through the Connect To Server routine then when nemo opens to the share: Bookmarks > Add Bookmark. It will sort of look like a mapped drive does in Windows.

You can also use Gigolo which will automate this whole thing: HowTo: Using Gigolo to Mount Remote Samba Shares

It's basically Connect to Server with the option to automount on login - the whole thing is a GUI.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
dschaf

Re: Accessing Samba Shares Linux Mint 17 Cinnamon

Post by dschaf »

Thank you again for the quick reply.

I was doing some research, and found the following right before I saw your reply. This also worked so I'm adding it here in case other people have the problem.

Linux Mint 17 comes with cifs, so in Terminal I did

Code: Select all

sudo vi /etc/fstab
and entered the following line at the end:

Code: Select all

//198.1.1.8/scans1 /home/administrator/scans1 cifs guest,users
This creates a scans1 folder under network and a shortcut to the desktop. On our laptops that would be traveling away from the office I would probably append ,noauto after users so that it didn't automatically mount the folder when they were away from the office.
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Accessing Samba Shares Linux Mint 17 Cinnamon [Solved]

Post by altair4 »

That is one advantage of Gigolo. It scans the network to make sure the server exists and only then does it mount the share.

BTW, I'm pretty sure cifs is not installed by default but needs to be added:

Code: Select all

sudo apt-get install cifs-utils
EDIT: Nope, you're right. Just ran the LiveDVD and it's there by default.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Locked

Return to “Networking”