Thomas's picture

I am using File Server v15.0. Samba version installed is Version 4.5.12-Debian. How do I update it to the latest version 4.9.4?

I am new to Linux so any extra help is appreciated. I was able to complete Installing Samba (download and build samba from source) but checking samba version "samba -V" still shows version 4.5.12. 

Jeremy Davis's picture

I suspect that you'll need to remove the default Samba if you want your source built Samba to work.

Also, I'm curious why you are installing from source? Is there some specific functionality that you require that isn't in the pre-installed version?

I ask because as a general rule you are much better off sticking with the installed version. That is for a few reasons:

  1. The packaged version will get automatically installed (backported) security updates (nightly). If you use a source install, you'll need to watch for security issues and rebuild from source everytime there are security updates.
  2. When installing from source, security updates are generally not backported to the version you have installed. So you will likely need to update to the (new) fixed version every time there is a security update. That may require configuration changes and adjustments for each new version you rebuild (related to #1).
  3. New source installed versions may include new features, but also may include new bugs. This applies everytime that you update/rebuild from source. The packaged version will almost always stay the same (security fixes backported to the version installed). This means that no additional work should be required by you, even when security updates occur.

So I would argue, that unless you really love maintaining software and/or have a genuine and specific need to have a newer version, then installing from source is generally not a great idea.

If you have hit a bug, or there is a feature that you are missing, please share and perhaps there is another (better?) way to resolve it?!

Thomas's picture

Like I said, I am somewhat new to the world of Linux. Thank you for your detailed insight. When I was thinking of doing an update of Samba v4.5 to v4.9, I was thinking more of a Windows application upgrade. lol

The issue and where this came about is I got everything working in Samba except "getent passwd" and "getent group" only returning local users. I have gone through many sites and troubleshooting to wits end. I see on, they mention before Samba v4.6.0 and from Samba version 4.6.0 in the "ldmap config ad" page. I thought it was worth a try to update Samba.

Does TurnKey alter default Samba settings in anyway in File Server?


Jeremy Davis's picture

The TurnKey Fileserver default config is Samba3 style "standalone" config, primarily aimed at standalone file sharing via SMB/CIFs. FWIW, other than a few minor modifications (about 3 years ago) much of the default config we provide is nearly 7 years old! (Thus predating Samba4 by a significant margin).

From the release testing I do and the feedback that we get, it continues to work well as a "Samba based standalone fileserver", but clearly there may well be some missing config and/or packages in the context of using it as an AD domain member fileserver.

Ideally we'd like to make it super easy to do what you're trying to do. But none of us have much experience with Samba (we're all everyday Linux users, who don't use other OS much/at all - so not much use for Samba). But I'd really love to see you get this up and working as desired as it will be a huge help to others who wish to also do what you're doing. If we can work out exactly what needs to be adjusted to make it work as you want OOTB, then we can make sure that we include configuration scripts to support that usage. Then other users trying to join our Fileserver to an AD domain don't experience the same pain you are...

The authoritative documentation on adding a Samba server to an AD domain, is here (in the Samba wiki). IIRC though, you have already read through that and that's what got you to where you are right? If you haven't read it completely, it might be worth reading through start to finish.

Following a bit of research, I also discovered a thread on the Samba mailing list, starting here which may be of value? It suggests that you will need to have the 'libnss-winbind' and 'libpam-winbind' packages installed (and possibly 'libpam-krb5'; although I don't think you'll need that last one; source). There is also some discussion of additional config that is required in this post, although I note that is quite old, so may not be completely relevant.

There is another (still old, but more recent) thread starting here, that sounds similar to your issues. In the end, it appears that the OP's smb.conf wasn't quite right (see this posts).

I also found quite a few other potentially useful resources when I googled for "getent passwd samba users", but everything else I found either didn't have a clear answer, or didn't seem completely relevant. FWIW, if you keep in mind that under the hood, TurnKey v15.x is Debian 9/Stretch, that may assist your research/problem solving efforts?! It's also worth keeping in mind that Ubuntu is also based on Debian, so instructions for Ubuntu can often be relevant (be careful though, as Ubuntu isn't binary compatible, so ideally you shouldn't install Ubuntu software on TurnKey/Debian).

Whilst TurnKey does come with some custom default config and a few bits of custom software, for your purposes, v15.x is essentially a minimalist Debian Stretch server with a select few additional samba related packages (plus what\ever new ones you may have installed).

So to round up my long winded post, probably the best thing to do first, is to go through the relevant Samba doc page (again?). If you're still stuck after that, then I suggest that the best way to ensure that you are getting the right advice on this, is to sign yourself up to the Samba mailing list and ask there?! I suggest that you note you are using a Debian 9/Stretch base and post your full samba config. It may also be worth noting the packages that you have installed?

Regardless, if you can work it, it'd be super awesome if you can post back with any info that you discover. It'd be great to know a bit more about this and others will also no doubt find it useful. Good luck and sorry that I can't provide more explicit answer to your issue.

Thomas's picture

Hi Jeremy,

FINALLY WORKS!! I am celebrating. woo hoo.

First, thanks for your long winded post. I find it informative. I will post back (maybe in another thread) with a more appropriate title like Getting File Server Setup as a Samba Domain Member so other users can find the information. I am not sure of the exact part as I for the nth time blew away my LXC and started from scratch. Also, followed the Setting up Samba as a Domain Member from begin to end again. I will try to find out by reviewing my command history.

Jeremy Davis's picture

Awesome news! Glad to hear that you got it working.

Thanks too for your kind words. I really look forward to hearing more about what was needed to get it all working. As I say, I'd really love to make that config easy for other users.

Add new comment