Submitted by Deajan on

 

Windows 7 is comming. And for sure you'd like to connect it to you Samba domain controller. But How ?

 

Well the devs at Samba have their idea. You actually need two things:

  1. Modifiy the Windows Seven registry
  2. Have at least Samba 3.3.7 or Samba 3.4.0

 

For the registry mod, just navigate to the following key:

HKLM\System\CurrentControlSet\Services\LanmanWorkstation\Parameters

and add the following entries:

DWORD DomainCompatibilityMode = 1
DWORD DNSNameResolutionRequired = 0

 

For those who can't be bothered, the registry mod file is attached at the end of this article. 

 

About the samba version, it'll be a bit hard to get a distribution that includes one of those versions. While writing this article, only four distribs (CDLinux, Chakra, NuTyX, Vine Linux) included v3.3.7 and only a couple of bleeding edge (Sidux 2009-02, PLD Linux 3.0) and beta distribs (Ubuntu 9.10 beta, Fedora rawhide 12) included v3.4.0.

If you want to keep your distrib, you'll need to uninstall your current samba release and compile Samba sources or find a nice repo with non official packages. This will eventually break your 'official' distribution support. You may also get some dependencies errors or simply other errors.

The best thing to do is installing a fresh linux, without samba, and then compile it from sources (see below).

 

[Update from 17-10-2009]

Redhat RHEL and CentOS have a package named samba3x which holds version 3.3.5 of the Samba server. This package is avaiable as 'Technology Preview'. You might check for this to get updated to v3.3.7.

You may also compile your own Samba on RHEL 5 / CentOS 5.

If not already installed, fetch the packages needed to compile Samba:

$ yum install rpm-build pam-devel readline-devel libacl-devel openldap-devel krb5-devel cups-devel keyutils-libs-devel gcc autoconf

You're now pretty much ready to compile:

$ cd /root

$ wget http://samba.org/ftp/samba/stable/samba-3.3.7.tar.gz

$ tar -xzf samba-3.3.7.tar.gz

$ cd samba-3.3.7/packaging/RHEL

$ perl -pi -e 's/keyutils-devel/keyutils-libs-devel/' samba.spec

$ sh makerpms.sh

Now that Samba is compiled, we'll only need to install it:

$ cd /usr/src/redhat/RPMS/i386

(change the i386 directory to whatever architecture you have)

$ rpm -Uvh samba*

(swap -Uvh with -ivh if you don't have samba already installed)

That's it! Your fresh samba should be installed. You can check it by typing:

$ smbd -V

[/Update]

 

Once you'll try to join a domain, Windows will give you a nice error message telling you that your domain cannot be found. Ignore it and reboot.

 

If you still want to try Win7/Samba, leave a commentary in case of success (or not). Good luck.

 

A part of this article is based on the samba.org wiki avaiable here.

Download ModRegistryWin7Samba.zip