LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Samba 4 on Slackware 14 (http://www.linuxquestions.org/questions/slackware-14/samba-4-on-slackware-14-a-4175441321/)

zasavage 12-13-2012 10:36 AM

Samba 4 on Slackware 14
 
Anyone try the new release of samba 4 on slackware 14 yet ?

It was released yesterday .. I know that's living on the edge :redface:

I like the active directory feature for windoze machines

Lawrence

TommyC7 12-13-2012 03:42 PM

Hi zasavage, I actually did try building it today on my laptop (which I don't use as a samba server), but I do have a samba server back home for simple video and music sharing between my family.

I was feeling a bit lazy today so I didn't do two things:

1. I did try to build samba 3.6.8 with the source stuff that Pat provides, but did not bother to check out many differences.
2. I did not read the samba ChangeLogs and/or release notes.
3. I just blindly used the samba.SlackBuild script with the new tarball.

WARNING: The laptop I built samba-4.0.0 on doesn't have a full Slackware install, so your mileage may vary.

I) Samba doesn't seem to want to build with "--prefix=/usr" or "--prefix=/usr/local" unless "--enable-fhs" is appended to the configure line. Pat removed the "--with-fhs" in 3.6.8 (seems name was changed to "--enable-fhs") because it overwrote the lib directory, not sure if that problem still occurs with 4.0.0 ($PKG/usr/lib64 seemed fine unless there's something I'm missing).

II) According to configure's --help option, it uses some new "waf" stuff (not a typo). I personally have no clue what that stuff is. It doesn't seem to need a CFLAGS variable, so setting it doesn't seem to affect the build.

III) The --swat-dir option is also no longer used, so that can be removed (still builds with it, but the option isn't recognized).

IV) I personally (on a non-full install) did not get any man pages. /usr/man was empty, which reminds me, --mandir set to /usr/man actually creates /usr/man, not /usr/share/man, so the "mv $PKG/usr/share/man $PKG/usr/man" doesn't seem to be necessary (since $PKG/usr/share/man won't exist). Again, if man pages are created for anybody else and it is in /usr/share/man, don't remove the line I just mentioned.

V) A final note about /usr/man, the directory exists, it's just that I didn't get any man pages in it. Don't know what happened there. I tried "find $PKG -iname "*man*" but only "/usr/man" showed up.

sardinha 12-14-2012 11:12 AM

Installation successful, now testing...
 
Sharing my successful installation of samba 4.0.0 Active Directory on x64 Slackware 14 server with Windows AD clients:

Code:

./configure.developer \
--prefix=/usr \
--libdir=/usr/lib64 \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--mandir=/usr/man \
--sysconfdir=/etc/samba \
--with-piddir=/var/run \
--with-privatedir=/etc/samba/private \
--localstatedir=/var \
--with-lockdir=/var/cache/samba \
--enable-cups \
--enable-fhs \
--disable-gnutls \
--with-automount \
--with-quotas \
--with-syslog \
--with-utmp \
--with-ldap \
--abi-check-disable \
--build=x86_64-slackware-linux
make
make install

Then follow the intructions: http://wiki.samba.org/index.php/Samba4/HOWTO

The only issue in installation was related with GSSAPI if prefer using Bind for DNS. Slackware 14.0 fresh install don't have native support for gssapi Heimdal library and oficial Bind package wasn't compiled with gssapi. I just make the option to use internal Samba DNS.

Try it first in a test environment!

I'll continuing with the tests in next few days...

wildwizard 12-15-2012 06:26 PM

I've finally got around to doing some build tests (no testing of function) and have noticed the same problems as TommyC7.

To get man pages I added the following to the SlackBuild :-
Code:

# Install man pages (the samba scripts don't seem to see them)
mkdir -p \
        $PKG/usr/man/man1 \
        $PKG/usr/man/man5 \
        $PKG/usr/man/man7 \
        $PKG/usr/man/man8
( cd $TMP/samba-$VERSION/docs/manpages
  cp -a *.1 $PKG/usr/man/man1
  cp -a *.5 $PKG/usr/man/man5
  cp -a *.7 $PKG/usr/man/man7
  cp -a *.8 $PKG/usr/man/man8
)

To build AD support you'll need kerberos, fortunately we already have a SlackBuild for that on slackbuilds.org just note that you have to log out and back in again due to the way it is packaged.

Comparing the package in S14 and this one and while they broke the man pages they have cleaned up some of the other parts (the old one seems to drop language translations in the lib dir for one)

Also a lot of configure options listed in --help are not actually present and there are plenty that are not listed in --help that are.

Configure also does not summarize what is and is not enabled so working out a proper set of configure options is going to take some work.

EDIT

Just found a cd source3 in the SlackBuild which is probably the main problem.

VisionIncision 12-19-2012 09:10 AM

Where did you find the slackbuild? Also, what are the build dependencies?

Thanks

Alien Bob 12-19-2012 10:17 AM

I have sent a set of SlackBuild scripts and packages for the new samba 4.0.0, plus some convenient new deps (ldb, talloc, tdb and tevent) to Pat.
No need for a separate Kerberos package, because an internal heimdal implementation is enabled in the new samba package.

So far, I have successfully tested all the Samba3 functionality I have been using (filesharing from unauthenticated as well as authenticated shares, and printing from Windows clients through printers imported from CUPS) and that all worked. I did not test any of the Active Directory Server stuff since that requires a lot of initial reading for which I do not have the time at the moment.

I expect that these packages will find their way into Slackware-current eventually.

Eric

VisionIncision 12-19-2012 11:12 AM

Quote:

Originally Posted by Alien Bob (Post 4852955)
I have sent a set of SlackBuild scripts and packages for the new samba 4.0.0, plus some convenient new deps (ldb, talloc, tdb and tevent) to Pat.
No need for a separate Kerberos package, because an internal heimdal implementation is enabled in the new samba package.

So far, I have successfully tested all the Samba3 functionality I have been using (filesharing from unauthenticated as well as authenticated shares, and printing from Windows clients through printers imported from CUPS) and that all worked. I did not test any of the Active Directory Server stuff since that requires a lot of initial reading for which I do not have the time at the moment.

I expect that these packages will find their way into Slackware-current eventually.

Eric

Ah brilliant, that will be very useful in the future.

Alien Bob 12-19-2012 12:49 PM

I did some more tests (I could not leave this alone) on the Samba4-specific Active Directory Domain Controller (AD DC) part.
There were no issues at all. Well only a minor one - Samba 4 has a strict password strength checker which did not accept my administrator password at first...

Following the HOWTO at http://wiki.samba.org/index.php/Samb...ovision_Samba4 I provisioned the Samba AD DC. That is no more than answering a few simple questions in an interactive dialog (and after stopping any old-style Samba3 file-serving through smbd/nmbd/winbindd and removing my Samba configuration). I chose for a setup fully controlled by Samba (i.e. using its own internal bind nameserver).
You can still use an external existing bind DNS Server if you want (the post-configuration takes a bit more work then).
The process of configuring the AD DC is fully automatic from that point onwards, and at the end I simply ran "samba" to start the AC CD.

Of course Slackware has no Kerberos client binaries, so I could not do all of the testing as shown in the HOWTO. Therefore I built and installed Heimdal (the preferred Kerberos implementation according to the Samba devs) from SlackBuilds.org and installed the resulting package. Note: I d id not start the Heimdal KDC, I just used the Heimdal client to obtain a ticket from the Salba4 DC:
Code:

Credentials cache: FILE:/tmp/krb5cc_0
        Principal: administrator@VIRTSLACK64CURR.QEMU.LAN

  Issued                Expires              Principal
Dec 19 19:30:32 2012  Dec 20 05:30:32 2012  krbtgt/VIRTSLACK64CURR.QEMU.LAN@VIRTSLACK64CURR.QEMU.LAN

It looks like you do not need Heimdal installed if all you need is access to your Samba shares and printers from your Slackware box. Normal user credentials seem to be sufficient.

Mission accomplished, I hope.

The thing I did not touch was migrating a Samba3 Domain Controller configuration to a Samba4 AD DC - simply because I do not have such a Samba configuration. But the HOWTO covers this upgrade situation too.

Eric

wildwizard 12-19-2012 01:48 PM

Quote:

Originally Posted by Alien Bob (Post 4852955)
I have sent a set of SlackBuild scripts and packages for the new samba 4.0.0, plus some convenient new deps (ldb, talloc, tdb and tevent) to Pat.

You shouldn't need the other packages either they are all a part of the samba build.

The password thing is a throw over from Microsoft, if you ever try an install a MS server you'll hit the same annoying "feature"

Alien Bob 12-19-2012 02:34 PM

Quote:

Originally Posted by wildwizard (Post 4853091)
You shouldn't need the other packages either they are all a part of the samba build.

YEs you can use the internal implementation, but the Samba developers split all of those off the main Samba source and they are maintained in separate repositories now.
Since Slackware (some of its packages at least) depend on the existence of talloc and Samba refuses to install them to a public place, I decided to create separate packages and let Slackware profit from them.
The other internal stuff like LDAP, Kerberos, Bind servers, remain private to the Samba 4 package.

Eric

Alien Bob 12-19-2012 05:01 PM

Pat did not have issues with me uploading my packages and sources so here they are: http://www.slackware.com/~alien/samba4/

Eric


All times are GMT -5. The time now is 11:19 AM.