bamed.org | chown -R bamed. ~/base

Samba 4 Review

Technical Preview 5 of Samba 4 recently came out. So I’ve downloaded it and will try to install it on an Ubuntu virtual machine running on VMWare. And because I’m such a nice guy, I’ll let you share the experience with me.

I’m starting with a basic Ubuntu Server 7.04 Feisty Faun configured as a LAMP server. It’s a standard VM I carry around on my laptop. Before I can compile Samba, I need to download and install some dependencies:

# sudo apt-get install autoconf make gcc gettext libreadline5-dev libgnutls-dev libacl1-dev attr

Now download the source from Samba and untar it:

# wget http://us1.samba.org/samba/ftp/samba4/samba-4.0.0tp5.tar.gz
# tar xvzpf samba-4.0.0tp5.tar.gz

Be sure to read the README and the howto.txt which most of what follows is based on. For tp5 you will need to generate the configure script. So do the following:

# cd samba4/source
# ./autogen.sh

Now we have a configure script, so run it:

# ./configure

And then we make stuff. (Note: adding proto to ‘make all’ will make samba4 compile about 5x faster if you have a recent version of gcc, 3.4 or higher, which you should have if you’re following this tutorial)

# make proto all

Now make sure you’re root and:

# make install

If you’ve EVER compiled anything in *nix this should all be familiar. If you’ve never compiled anything before, and perhaps don’t even know what compile means, then why are you trying to install a technical preview of ANYTHING? Let’s continue…

Now we must use the ‘provision’ command to set up a basic user database. I’m assuming you’re following along and still in the samba4/source directory. You will need to make sure ‘smbscript’ is in your path. I did this by:

# PATH=$PATH:/usr/local/samba/bin

You should also add the above to your .profile so it stays in your PATH. Before you’re finished you’ll need /usr/local/samba/sbin in your PATH as well.

Now you can:

# ./setup/provision –realm-YOUR.REALM –domain=YOURDOM ==adminpass=SOMEPASSWORD

Now you’re about ready to go, but we need to setup a share in /usr/local/samba/etc/smb.conf. Edit smb.conf and add something like:

[test]
path = /data/test
read only = no

Now that we’re all setup all you need to do is start samba:

# smbd

There you go. It’s up and running. You can share files and there should be some AD functionality. I was able to access the ‘Test’ share we setup earlier. I was also able to access SWAT by browsing to http://localhost:901. From SWAT I can currently add new users, provision the database, and import users from Samba3 or Windows. There’s also a link to run some ESP tests and a link to preview the NEW SWAT, but neither one of these work after following the above steps.

One last thing you’ll want to do that’s in the howto.txt document. You’ll want to make certain the partition hosting your shares is mounted with the user_xattr option by editing your /etc/fstab file. I changed the appropriate line in mine like so:

# /dev/sda1 / ext3 user_xattr

Then reboot:

# mount -o remount

[thanks to Matt for pointing out the original error here, you don't have to reboot]

You’ll need to do this to be certain you can support the new features of Samba4. There are some other things listed you might want to do in the howto.txt document, but the above seemed to be enough to pass all the tests listed.

I’m afraid that’s as far as I go tonight. Over the next couple weeks, when I have time, I’ll try to test out some of the functionality and I’ll get back to you. According to all the documentation I’ve read the features that work are stable, but it’s still just a technical preview, so there’s several features that simply haven’t been coded yet. I’ll see what kind of tests I can come up with, and I’ll get back to you.

Comment Pages

There are 1 Comments to "Samba 4 Review"

Write a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

Essentials