Page 1 of 2

[SOLVED] Samba won't run in 18.1?

Posted: Mon Feb 13, 2017 3:16 pm
by Banzai Beagle
Hi,
I am still a Linux newb...

I have installed Samba via the Software Manager (including system-config-samba)

When I click on Samba in the Menu button, I get the popup asking for my password and after I enter that nothing happens.

All I want to do is to be able to see folders on my other computer (Windows 10) and vice versa and move files around and change them.

I've searched through lots of threads and cannot find a way to do that.

SOS!

Re: Samba won't run in 18.1?

Posted: Mon Feb 13, 2017 3:41 pm
by Banzai Beagle
Okay, so I am trying to follow the tutorial at https://community.linuxmint.com/tutorial/view/1861

Mint won't let me copy the smb.conf so I did that manually.

When I try to edit the file I get an error message "gedit: command not found"

When I open the smb.conf file with a text editor I cannot save it back in the samba folder Mint won't let me

When I try to change the permissions Mint won't let me - "you are not the owner so you cannot change the permissions."

Okay, since I am the only one who uses this stupid computer, why am I not the owner?

Re: Samba won't run in 18.1?

Posted: Mon Feb 13, 2017 3:54 pm
by altair4
BONUS INFO 2:

Some folks install a package: system-config-samba as a GUI to administer Samba. That package hasn't been updated for years so it will not run until you do this first:

Code: Select all

sudo touch /etc/libuser.conf
Because of it's age system-config-samba allows the user to set certain parameters that were current in Version 2 or 3 of Samba but in Samba 4 will actually disable samba from running. So for example, if you are used to setting the "Security Authentication Mode" to "Share" or "Server" samba will not run so be careful with this thing.
For more on installing samba: viewtopic.php?f=42&t=224391

For a checklist - if you need it: viewtopic.php?f=42&t=88146

And when you edit files in Mint18 that are owned by root you have to edit them as root:

Code: Select all

gksu xed /etc/samba/smb.conf
xed replaced gedit in Mint18. Not all Howto's have made the change to reference xed including most of mine.

Re: Samba won't run in 18.1?

Posted: Mon Feb 13, 2017 4:07 pm
by Banzai Beagle
Thanks I'll try that.

Okay, I discovered this Nautilus thing and can share individual folders one at a time using the Local Network Share function - great! So now I can see the LInux box from my Windows box.

But not vice versa. I can't see the Windows box from the Linux box - when I try to open the homegroup (named "HOMEGROUP") from Nautilus I get the famous "failed to retrieve share list from server: connection timed out"

I cannot change the Linux box's Workgroup to "Homegroup" but remember Mint won't let me edit the smb.conf file.

Why is this so hard?

Re: Samba won't run in 18.1?

Posted: Mon Feb 13, 2017 4:14 pm
by altair4
There is no such thing as a Homegroup in Linux, macOS, or even earlier versions of Windows.

The "failed to retrieve share list..." thing sounds like a name resolution problem and is covered in the checklist I referenced above.

Mint will allow you to edit smb.conf as long as you are permitted to do so by using gksu and providing the correct credentials.

Re: Samba won't run in 18.1?

Posted: Mon Feb 13, 2017 6:17 pm
by Banzai Beagle
Okay, I was able to share individual folders on the Linux box using Nautilus and I was able to change the WORKGROUP to "HOMEGROUP" (which is merely the name of my MSHOME group or whatever that is called) and I can now see the Linux box folders from the Windows box but not vice versa.

I also get an error message when I boot up Linux

"User’s $HOME/.drmc file is being ignored. This prevents the default session and language from being saved. File should be owned by the user and have 644 permissions. User’s $HOME directory must be owned by the user and not writable by other users." which I see from viewtopic.php?f=46&t=230157&p=1217468&h ... e#p1217468 is some sort of permissions error/problem."

So I uninstalled Nautilus and the error message on bootup remains but the good news is I can still see the Linux folders from the Windows box. So the error message is being caused by changing the WORKGROUP in the smb.conf file. Assuming nothing else is broken by this change I'll just ignore it.

So Nautilus appears to be superfluous. Changing the Workgroup on the Linux box is what shared the folders apparently.

I have attempted to work through the HowTo: Samba Server in Mint 18 and the Installing Samba Server in Mint 18 posts to no avail.

So until somebody comes up with a solution to this mess I'll just post whatever files I need on my Linux box from the Windows box and use sneakernet for whatever else I need...

Re: Samba won't run in 18.1?

Posted: Mon Feb 13, 2017 6:30 pm
by altair4
** It seems kind of confusing to call a workgroup homegroup since a homegroup is a thing but if it works ....

**
I also get an error message when I boot up Linux

"User’s $HOME/.drmc file is being ignored. This prevents the default session and language from being saved. File should be owned by the user and have 644 permissions. User’s $HOME directory must be owned by the user and not writable by other users." ...
So I uninstalled Nautilus and the error message on bootup remains but the good news is I can still see the Linux folders from the Windows box. So the error message is being caused by changing the WORKGROUP in the smb.conf file.
** I don't know why you are using Nautilus in Cinnamon since Cinnamon has it's own file manager.
** The assumption that the dmrc error message is caused by changing the workgroup name is most likely not correct.

What is more likely is that you created a usershare ( Local Network Share function ) of your home directory or you set permissions to 777 manually. You can't set your home directory to be writeable to "others" just as the complete error message says.

Why not access the WIn10 box with an ip address. Open a terminal and run:

Code: Select all

nemo smb://the.windows.ip.address/share-name

Re: Samba won't run in 18.1?

Posted: Mon Feb 13, 2017 6:50 pm
by Banzai Beagle
Thanks for your patience. When I type in nemo smb://the.windows.ip.address/share-name I get this error message:

"Could not display "smb://the.windows.ip.address/share-name/".
Error: Failed to mount Windows share: Invalid argument
Please select another viewer and try again."

Also, when I type in smbtree the Windows box shows up - so now I suppose the question is how to view those files?

I suspect the error message was caused by following the command on this thread https://community.linuxmint.com/tutorial/view/1861 to add these lines at the bottom of the smb.conf file -
path = /home//
available = yes
valid users =
read only = no
browseable = yes
public = yes
writable = yes

So I deleted all that mess.

Re: Samba won't run in 18.1?

Posted: Mon Feb 13, 2017 6:52 pm
by altair4
Um ... how about using an actual ip address and an actual share name.

Re: Samba won't run in 18.1?

Posted: Mon Feb 13, 2017 7:01 pm
by altair4
suspect the error message was caused by following the command on this thread https://community.linuxmint.com/tutorial/view/1861 to add these lines at the bottom of the smb.conf file -
Although that is a terrible share definition it not the cause of the error message. Check the permissions of your home directory:

Code: Select all

ls -dl $HOME
If it comes back with this:
drwxrwxrwx ... ... ...
You will get the dmrc error.

Re: Samba won't run in 18.1?

Posted: Mon Feb 13, 2017 7:52 pm
by Banzai Beagle
Thanks!

I get this when I type in ls -dl $HOME:
drwxr-xr-x 34 dave dave 4096 Feb 13 15:34 /home/dave

So how do I fix the error message? (Assuming that it is a bad thing....)

How do I use the actual ip address and actual user name? I tried the nemo smb://the.windows.ip.address/share-name but got another error message...

Re: Samba won't run in 18.1?

Posted: Mon Feb 13, 2017 7:58 pm
by Banzai Beagle
And just to complicate matters, something has screwed up my desktop - it is completely black and all the icons are on top of each other...

Re: Samba won't run in 18.1?

Posted: Mon Feb 13, 2017 9:46 pm
by Banzai Beagle
Desktop has fixed itself somehow.... I just turned the computer off and let it rest for about an hour and the desktop was fine when I turned it back on.

Okay, I've reset smb.conf to its original condiction, removed Samba, Nautilus, the Nemo-samba extension, and am still getting the .drmc error message on bootup. As near as I can figure nothing is being shared so why am I getting an error message??

Re: Samba won't run in 18.1?

Posted: Mon Feb 13, 2017 10:21 pm
by jsb
altair4 wrote: ** I don't know why you are using Nautilus in Cinnamon since Cinnamon has it's own file manager.
I don't know about the OP, but I was unsuccessful setting up sharing using Cinnamon with Nemo. Not that this means it can't be done, but a dummy like me could not get it to work easily.

I also was unsuccessful with XFCE and Thunar. What did work was installing Nautilus and Nautilus-share. With that file manager in XFCE, I just right click a file and follow the obvious choices that appear...choose "local network share" and then it asks to install samba (the first time) and you're done.

Re: Samba won't run in 18.1?

Posted: Tue Feb 14, 2017 8:16 am
by altair4
Wow.

@Banzai Beagle

This is not a criticism just a suggestion on how to approach Linux. It's not Windows. You don't start adding and removing software when something doesn't work. You don't install Nautilus on a Cinnamon system which has a fork of Nautilus ( nemo ) already present. Nautilus and nemo both interact with the desktop itself and adding Nautilus introduces instability.

Look at the dmrc file itself:

Code: Select all

ls -l $HOME/.dmrc
It should look like this:
-rw-------
If it's not that - make it that:

Code: Select all

chmod 600 $HOME/.dmrc
@jsb
but I was unsuccessful setting up sharing using Cinnamon with Nemo.
Nemo is a fork of Nautilus but it's not faithful to some of the backend things that Nautilus does. It was made worse when Mint decided at the last minute to remove samba from the base install without considering the consequences to things like Nemo. When you use the "sharing options" in a newly installed Mint 18 Cinnamon machine you will get this:
nemo-share.png
The reason for that is because samba is not installed: Installing Samba Server in Mint 18
I also was unsuccessful with XFCE and Thunar.
Thunar can create samba shares you just have to know how: Create Samba Shares Directly from Thunar
But once again you need to install the samba server package first.

Re: Samba won't run in 18.1?

Posted: Tue Feb 14, 2017 9:29 am
by jsb
altair4 wrote:@jsb
Thunar can create samba shares you just have to know how:
Yep, that's the problem...I don't really know what I'm doing :) . I've been using linux for 3.5 years, but only tried network stuff for the first time less than a month ago.

I saw some things like your link and blindly tried a few things with Thunar and installed various software that I thought might help. As you warned the OP, I did end up with a mess and broken system. It was a machine running Xubuntu and I was planning to replace that with Mint, so it was a good time to try "risky" experiments.

I don't remember exactly what issues I had with cinnamon or if I installed samba. But when I could not get it to work pretty much right away I gave up as I prefer XFCE, so if it was going to require some work to get it to function I figured I'd rather get it working in XFCE.

My first success with file sharing was actually with Peppermint 7. They are using Nemo also, but setting up file sharing was simple and intuitive. Peppermint 4 had been my Linux gateway drug in 2013 8) , so I'd gone back to see the latest from them, when I struggled with sharing in Mint XFCE.

Once I knew I could make this work, I researched file managers and distros to try to find out which made it easy...that ultimately led me to try adding Nautilus to Mint XFCE.

Don't mean to hijack the thread, but thought maybe my history as a neophyte might help in some way.

Re: Samba won't run in 18.1?

Posted: Thu Feb 16, 2017 3:00 pm
by Banzai Beagle
Thanks for all the info. My brain is full. I need to take a nap.

Okay, I restaged my computer by doing a new clean install of cinnamon 18.1.
.dmrc error message of course is gone.

So how do I share a folder on my LAN? Samba? Nautilus? Nemo? Thunar?

As I said in my original post, all I want to do is to be able to view folders on my two computers, move files around and modify the odd document.

Re: Samba won't run in 18.1?

Posted: Thu Feb 16, 2017 3:55 pm
by altair4
[1] Install samba this way:

Code: Select all

sudo apt-get install samba --install-recommends
[2] Go through the checklist: Samba Browsing Problems Checklist

Note: Wherever that HowTo mentions "gedit" use "xed" instead.

[3] From here on you share a folder in Mint Cinnamon exactly the same way you would do it on Windows XP:

Open your file manager.
Right click a folder you own like ... Public ... for starters.
Select "Sharing Options"

Note: Do not attempt to share your entire home folder or else you will end up with a dmrc error again.

Check all the boxes.
Click on "Create Share"
It will ask you if you want it to modify permissions ..... You do.

You just created a samba share that allows guest access to your Public folder.

Should you run into any problems post the output of the following commands:

Code: Select all

testparm -s

Code: Select all

net usershare info --long

Re: Samba won't run in 18.1?

Posted: Thu Feb 16, 2017 4:22 pm
by altair4
Wouldn't you know it I had the wrong link to the checklist. It's: Samba Browsing Problems Checklist

Re: Samba won't run in 18.1?

Posted: Thu Feb 16, 2017 5:06 pm
by Banzai Beagle
Many thanks for the patient responses Altair4 -

I am almost there... I can now see the Linux box folders from the Windows box, and I can now see the Windows XP box but not the Windows 10 box.

I can now modify documents on the XP box from the Linux box, and vice versa.

I can see Windows 10 box from the XP box so I know it is shared correctly on the network.

Any idea why I cannot see the 10 box from the Linux box?