Building a Samba4 Domain Controller on OpenSUSE 12.3

Firstly build an OpenSUSE 12.3 machine

Install required packages.

zypper install make gcc binutils autogen krb5-devel krb5-client nano libacl-devel acl attr python python-devel

When prompted select option 1 to deinstall patterns-openSUSE-minimal_base-conflicts-12.3-7.10.1.x86_64



samba-dc1 @ 2013-06-24 08:29:17

Press y and then enter to confirm installation of the packages.



samba-dc1 @ 2013-06-24 08:29:24

Reboot the machine now to ensure the filesystem is mounted with ACL support.

Download samba from samba.org (Check samba.org for the current version / url )

wget http://ftp.samba.org/pub/samba/samba-4.0.6.tar.gz



samba-dc1 @ 2013-06-24 08:40:50

Extract samba source code.

tar -xvf samba-4.0.6.tar.gz

configure, compile and install samba

./configure && make && make install



samba-dc1 @ 2013-06-24 08:48:56

Create the /usr/lib/systemd/system/samba.service file

nano /usr/lib/systemd/system/samba.service

Enter the following content.

[Unit]
Description=Samba AD Daemon
After=syslog.target network.target

[Service]
Type=forking
PIDFile=/usr/local/samba/var/run/samba.pid
LimitNOFILE=16384
EnvironmentFile=-/etc/sysconfig/samba
ExecStart=/usr/local/samba/sbin/samba $SAMBAOPTIONS
ExecReload=/usr/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target

Press Ctrl + X then Y to save and exit.



samba-dc1 @ 2013-06-24 09:10:55

Create a symlink from /usr/lib/systemd/system/samba.service to /etc/systemd/system/samba.service

ln -s /usr/lib/systemd/system/samba.service /etc/systemd/system/samba.service



samba-dc1 @ 2013-06-24 09:26:37

Now it’s time to provision the domain, in this case we are creating a new domain called mydomain.com.

This is equivalent to the dcpromo tool on windows.

/usr/local/samba/bin/samba-tool domain provision

samba-dc1 @ 2013-06-24 10:07:44

You should ensure samba runs when the system boots.

systemctl enable samba

At this point if everything has gone to plan you should be able to join a windows machine to this domain (ensuring that you point the windows machine at the samba dc for its dns).

Then you can install the windows rsat tools and manage the samba domain using familar windows tools such as active directory users and computers and the dns manager.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: