Installing Samba Server in Mint 18

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
altair4
Level 18
Level 18
Posts: 8555
Joined: Tue Feb 03, 2009 10:27 am

Installing Samba Server in Mint 18

Postby altair4 » Thu Jun 30, 2016 6:44 am

Mint has decided not to install the samba server components in the final release of Mint 18. Here's what needs to be installed to restore it:

[1] The Mint way:

Code: Select all

sudo apt-get install samba

Which will install these packages in Cinnamon:
The following NEW packages will be installed:
python-dnspython samba

And these in MATE:
python-dnspython python-ldb python-samba python-tdb samba samba-common-bin

[2] You might want to take this opportunity to install it the Ubuntu way:

Code: Select all

sudo apt-get install samba --install-recommends

Which install this in Cinnamon:
The following NEW packages will be installed:
libaio1 python-dnspython samba samba-dsdb-modules samba-vfs-modules

And this in MATE:
libaio1 python-dnspython python-ldb python-samba python-tdb samba
samba-common-bin samba-dsdb-modules samba-vfs-modules

The reason for the difference is that when Mint installs a given application it doesn't always pull in all of the dependencies whereas Ubuntu does because it pulls in "recommends" dependencies by default.

BONUS INFO:

Ubuntu doesn't install the samba server components by default either but when the user goes into Nautilus > right click a folder > Local Network Share he is asked if he wants to install it:
Ubuntu-Installs-Samba.png


If you do the same thing in Mint Cinnamon you will get this crazy thing:
Mint-Does-Not.png


The package that Ubuntu uses is nautilus-share. In Mint it's called nemo-share and I'm guessing it's a fork of the ubuntu package. It looks like they pulled out the logic that checks to see if samba is installed and if it's not install it likely because samba was always installed by default in Mint. When they decided to remove samba they forgot about nemo-share. Using method [1] or [2] will get rid of the error message.

Special Note to all you MATE users: In order to create samba shares from your file manager you need to install this package:

Code: Select all

sudo apt install caja-share


BONUS INFO 2:

Some folks install a package: system-config-samba as a GUI to administer Samba. That package hasn't been updated in 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.


What prompted this mini howto was I have already seen things on the web for Mint 18 where people are suggesting installing a bunch of other stuff like winbind, or building your own interocitor, or launching your own personal communications satellite into low earth orbit. It doesn't have to be that involved.
Last edited by altair4 on Sat May 20, 2017 8:42 am, edited 6 times in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

altair4
Level 18
Level 18
Posts: 8555
Joined: Tue Feb 03, 2009 10:27 am

Re: Installing Samba Server in Mint 18

Postby altair4 » Thu Jun 30, 2016 2:11 pm

I just Installed the Mint18 MATE version this time and there's another problem.

In it's zeal to purge everything samba server related they went too far and actually removed a package required for the samba client. You will need to install the following:

Code: Select all

sudo apt-get install samba-common-bin

Folks, pretty much the only thing I do in this forum is answer samba questions but I gotta tell you Mint18 is becoming a very difficult version for me to continue supporting since it's not clear what else is missing or misconfigured.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
hinto
Level 8
Level 8
Posts: 2145
Joined: Thu Jul 09, 2009 7:32 pm
Location: Cary NC, USA

Re: Installing Samba Server in Mint 18

Postby hinto » Thu Jun 30, 2016 3:11 pm

Whack a Mole? ;)

Thanks for blazing the trail on this.
-H
"In God we trust, all others bring data."- W. Edwards Deming

Cosmo.
Level 21
Level 21
Posts: 14769
Joined: Sat Dec 06, 2014 7:34 am

Re: Installing Samba Server in Mint 18

Postby Cosmo. » Fri Jul 01, 2016 10:12 am

altair4:

I just have installed my first 18 final (Cinnamon 64 bit, but that shouldn't make a difference here) release and the offered Samba-update attracted my attention. The details (and also a look inside synaptic) shows me, that samba-common-bin comes pre-installed.

Referring to this:
altair4 wrote:

Code: Select all

sudo apt-get install samba-common-bin

altair4
Level 18
Level 18
Posts: 8555
Joined: Tue Feb 03, 2009 10:27 am

Re: Installing Samba Server in Mint 18

Postby altair4 » Fri Jul 01, 2016 11:59 am

I just have installed my first 18 final (Cinnamon 64 bit, but that shouldn't make a difference here)

I agree that it shouldn't make a difference what DE you use and in Cinnamon it is installed but in MATE - at least after I installed and updated it - had samba-common-bin missing.

I'm thinking of editing my original post to just tell folks to install everything that Ubuntu installs for both client and server for samba:

Code: Select all

sudo apt-get install libsmbclient libwbclient0 python-dnspython python-samba python3-smbc samba samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules smbclient

Some of them may already be installed. Other’s are dependencies of other’s and would be brought in anyway. Still other’s would be dependencies and in Ubuntu would be brought in but in Mint would not.
Last edited by altair4 on Sat Jul 09, 2016 8:20 am, edited 1 time in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Cosmo.
Level 21
Level 21
Posts: 14769
Joined: Sat Dec 06, 2014 7:34 am

Re: Installing Samba Server in Mint 18

Postby Cosmo. » Fri Jul 01, 2016 4:57 pm

@altair4:

My first idea was, that it was an error on your side, but now I understand, that it was not.

If there are really differences in this regard between the Cinnamon and the Mate edition I wonder, if they are intentional or an mistake (aka bug).

Is your Mate system 32 or 64 bit?

altair4
Level 18
Level 18
Posts: 8555
Joined: Tue Feb 03, 2009 10:27 am

Re: Installing Samba Server in Mint 18

Postby altair4 » Fri Jul 01, 2016 5:57 pm

I installed the 64bit version.

Don't know if it's intentional or a bug but that's the nature of bugs. If it happens all the time to everyone it's either a bad design decision or someone didn't check it during testing. If it happens to only a few then it's a bug. If I were to install it again it may not happen but it doesn't matter to the user or users where it does happen.

Edit: I just booted into the install disk of Mate 18 and it's definitely not there:
mint@mint ~ $ testparm -s
The program 'testparm' is currently not installed. You can install it by typing:
sudo apt install samba-common-bin

Do the same thing with the Cinnamon install disk and the command runs:
mint@mint ~ $ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
....
....


The more I think about this the more I think the best thing to do is just install the whole default Ubuntu samba client and server package list as I outlined in my previous post. If it's already there then no harm will be done. If it's not there you have the same packages as Ubuntu.

This decision to remove samba server was made at the last minute so ......
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

CliveMcCarthy
Level 1
Level 1
Posts: 32
Joined: Mon Jul 29, 2013 1:05 pm
Location: San Francisco
Contact:

Re: Installing Samba Server in Mint 18

Postby CliveMcCarthy » Tue Jul 19, 2016 12:08 am

I've been cruising along with Mint 17.x and decided today to bring up Mint 18. :evil:

Whatever persuaded Clem to not install Samba? I right clicked on a folder and no sharing!!! I thought my finger had gone numb.

I've given up and gone back to 17.x

DeMus
Level 6
Level 6
Posts: 1024
Joined: Sat Aug 15, 2009 5:11 pm

Re: Installing Samba Server in Mint 18

Postby DeMus » Tue Jul 19, 2016 12:18 am

CliveMcCarthy wrote:I've been cruising along with Mint 17.x and decided today to bring up Mint 18. :evil:

Whatever persuaded Clem to not install Samba? I right clicked on a folder and no sharing!!! I thought my finger had gone numb.

I've given up and gone back to 17.x


Why not do what altair wrote? He is the expert on samba.

nursoda
Level 1
Level 1
Posts: 17
Joined: Sat Dec 20, 2014 7:52 am

Re: Installing Samba Server in Mint 18

Postby nursoda » Sat Jul 30, 2016 7:39 am

I also ran into this but installing package samba did not solve my issue since it yields an error during installation:

Code: Select all

$ sudo apt-get install samba --install-recommends
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
»samba« ist bereits die neuste Version (2:4.3.9+dfsg-0ubuntu0.16.04.2).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
1 nicht vollständig installiert oder entfernt.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n]
samba (2:4.3.9+dfsg-0ubuntu0.16.04.2) wird eingerichtet ...
Job for smbd.service failed because the control process exited with error code. See "systemctl status smbd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript smbd, action "start" failed.
dpkg: Fehler beim Bearbeiten des Paketes samba (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
Trigger für libc-bin (2.23-0ubuntu3) werden verarbeitet ...
Fehler traten auf beim Bearbeiten von:
 samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

$ systemctl status smbd.service
● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
   Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sa 2016-07-30 13:25:09 CEST; 1min 13s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 7204 ExecStart=/etc/init.d/smbd start (code=exited, status=1/FAILURE)

Jul 30 13:25:09 pc systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (smbd)...
Jul 30 13:25:09 pc smbd[7204]:  * Starting SMB/CIFS daemon smbd
Jul 30 13:25:09 pc smbd[7204]:    ...fail!
Jul 30 13:25:09 pc systemd[1]: smbd.service: Control process exited, code=exited status=1
Jul 30 13:25:09 pc systemd[1]: Failed to start LSB: start Samba SMB/CIFS daemon (smbd).
Jul 30 13:25:09 pc systemd[1]: smbd.service: Unit entered failed state.
Jul 30 13:25:09 pc systemd[1]: smbd.service: Failed with result 'exit-code'.

/var/log/samba/log.smbd is empty. The important part seems to be

Code: Select all

/etc/init.d/smbd; bad; vendor preset: enabled

smb.conf seems OK, no idea where/what to look for and what to do now.

altair4
Level 18
Level 18
Posts: 8555
Joined: Tue Feb 03, 2009 10:27 am

Re: Installing Samba Server in Mint 18

Postby altair4 » Sat Jul 30, 2016 8:01 am

I can reproduce that error message quick enough.

** I edited /etc/samba/smb.conf and added an entry towards the top on the file in the [global] section:

Code: Select all

security = share

** Then I restarted smbd and checked the status:
tester@vmint180cinn ~ $ systemctl status smbd.service
● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2016-07-30 07:51:00 EDT; 2min 16s ago
Docs: man:systemd-sysv-generator(8)
Process: 2768 ExecStop=/etc/init.d/smbd stop (code=exited, status=0/SUCCESS)
Process: 2778 ExecStart=/etc/init.d/smbd start (code=exited, status=1/FAILURE)

Jul 30 07:51:00 vmint180cinn systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (smbd)...
Jul 30 07:51:00 vmint180cinn smbd[2778]: * Starting SMB/CIFS daemon smbd
Jul 30 07:51:00 vmint180cinn smbd[2778]: ...fail!
Jul 30 07:51:00 vmint180cinn systemd[1]: smbd.service: Control process exited, code=exited status=1
Jul 30 07:51:00 vmint180cinn systemd[1]: Failed to start LSB: start Samba SMB/CIFS daemon (smbd).
Jul 30 07:51:00 vmint180cinn systemd[1]: smbd.service: Unit entered failed state.
Jul 30 07:51:00 vmint180cinn systemd[1]: smbd.service: Failed with result 'exit-code'.

Samba will start the process and look for the "security" setting in smb.conf. If it finds values that no longer exist - like share or server - it will abort the starting of the service.

If you are using system-config-samba set "Authentication Mode" to user.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

nursoda
Level 1
Level 1
Posts: 17
Joined: Sat Dec 20, 2014 7:52 am

Re: Installing Samba Server in Mint 18

Postby nursoda » Sat Jul 30, 2016 8:20 am

Thanks a lot! Meanwhile I purged samba-common and installed samba (and the packages that were installed on my system and were removed by the first command):

Code: Select all

apt purge samba-common
apt install mint-meta-cinnamon samba nemo-share smbclient cifs-utils casper lupin-casper


I opened a bug: https://bugs.launchpad.net/linuxmint/+bug/1608061

altair4
Level 18
Level 18
Posts: 8555
Joined: Tue Feb 03, 2009 10:27 am

Re: Installing Samba Server in Mint 18

Postby altair4 » Sat Jul 30, 2016 9:33 am

Looked at the "Sidenote" of your bug report and one statement is incorrect:
It seems the failure was caused by a missing line "security = share" in [Global] section of /etc/samba/smb.conf (which is required by one of the post-install scripts.

Setting "security = share" will guarantee that smbd will not run. There is no such thing as "security = share" in version 4 of Samba. It didn't exist in later releases of Version 3 either but since 4.3.9 of samba instead of simply ignoring an unrecognised value it aborts the starting of the service.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

nursoda
Level 1
Level 1
Posts: 17
Joined: Sat Dec 20, 2014 7:52 am

Re: Installing Samba Server in Mint 18

Postby nursoda » Sun Jul 31, 2016 11:17 am

Setting "security = share" will guarantee that smbd will not run. There is no such thing as "security = share" in version 4 of Samba. It didn't exist in later releases of Version 3 either but since 4.3.9 of samba instead of simply ignoring an unrecognised value it aborts the starting of the service.

Huh? Wasn't that what you wrote yourself?
Samba will start the process and look for the "security" setting in smb.conf. If it finds values that no longer exist - like share or server - it will abort the starting of the service.

No matter what: There's no line security=* in my smb.conf now - and it's working (as usershare). Thanks for the hint, I delete the sidenote.

altair4
Level 18
Level 18
Posts: 8555
Joined: Tue Feb 03, 2009 10:27 am

Re: Installing Samba Server in Mint 18

Postby altair4 » Sun Jul 31, 2016 11:42 am

nursoda wrote:
Setting "security = share" will guarantee that smbd will not run. There is no such thing as "security = share" in version 4 of Samba. It didn't exist in later releases of Version 3 either but since 4.3.9 of samba instead of simply ignoring an unrecognised value it aborts the starting of the service.

Huh? Wasn't that what you wrote yourself?
Samba will start the process and look for the "security" setting in smb.conf. If it finds values that no longer exist - like share or server - it will abort the starting of the service.

No matter what: There's no line security=* in my smb.conf now - and it's working (as usershare). Thanks for the hint, I delete the sidenote.

Yes, that is exactly what I said. :) Your original sidenote suggested that things were failing because it was missing "security = share".

EDIT: I just added my "me too" to your bug report.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

CliveMcCarthy
Level 1
Level 1
Posts: 32
Joined: Mon Jul 29, 2013 1:05 pm
Location: San Francisco
Contact:

Re: Installing Samba Server in Mint 18 [SOLVED]

Postby CliveMcCarthy » Tue Aug 23, 2016 7:15 pm

found this:
http://askubuntu.com/questions/318361/why-there-is-no-sharing-options-on-cinnamon-on-ubuntu-12-04

So I tried sudo apt-get install caja-share and lo and behold the share option on a right click is back. It seems caja-share, for Mint, is not installed by default. :(

User avatar
orion2014
Level 1
Level 1
Posts: 21
Joined: Tue Dec 31, 2013 4:52 am
Location: New York, New York

Re: Installing Samba Server in Mint 18

Postby orion2014 » Wed Oct 05, 2016 5:54 am

Wish I would've found this post before I setup Samba on Sarah. Nothing seemed to work, configuration tool wouldn't load, and I spent hours re-installing, I decided to install from source, and now I manage server from Webmin, a very handy tool.
Linux Mint 17.3 Cinnamon 64bit
Cinnamon Version 2.0.14
3.19.0-32-generic
Intel Pentium CPU B980 2.40GHz x 2
Mem 5.7 GiB
HDD 1271.2 GB
Intel Corporation 2nd Generation Core Processor



Image

User avatar
soundchaser59
Level 2
Level 2
Posts: 65
Joined: Tue Sep 20, 2016 1:36 am

Re: Installing Samba Server in Mint 18

Postby soundchaser59 » Thu Oct 20, 2016 10:18 pm

altair4 wrote:Mint has decided not to install the samba server components in the final release of Mint 18. Here's what needs to be installed to restore it:

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.



Thank You! This tip got my samba gui running. I'm learning how to share slowly but surely.....

ostracized
Level 4
Level 4
Posts: 230
Joined: Tue Jun 14, 2016 11:46 pm

Re: Installing Samba Server in Mint 18 [SOLVED]

Postby ostracized » Sat Oct 22, 2016 9:32 pm

CliveMcCarthy wrote:found this:
http://askubuntu.com/questions/318361/why-there-is-no-sharing-options-on-cinnamon-on-ubuntu-12-04

So I tried sudo apt-get install caja-share and lo and behold the share option on a right click is back. It seems caja-share, for Mint, is not installed by default. :(


Thanks Clive, this was the case for me as well on mate. @altair4, you may want to add this info to the mate section in your first post. I've got a few other q's but I'll post them over in your other simple file-sharing thread.

gbvoris
Level 3
Level 3
Posts: 115
Joined: Mon Oct 14, 2013 10:07 pm

Re: Installing Samba Server in Mint 18

Postby gbvoris » Thu Nov 17, 2016 10:50 am

Postby altair4 » Sat Jul 30, 2016 8:01 am
I can reproduce that error message quick enough.

** I edited /etc/samba/smb.conf and added an entry towards the top on the file in the [global] section:

Code: Select all
security = share

So how do I remove or change the entry? The file is read only.

And if it means anything in reference to this, Bluetooth file sharing is one way from my Mint 18 devices to my S6. To transfer from laptop to tower I have to use a thumb drive. Audio moves freely from S6 to laptop.


Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 2 guests