Can I create a domain using SAMBA and set up Active Directory with SAMBA on it? And by this I mean no windows servers involved. I would also like to be able to log in from a Windows machine. Preferably on OpenSuSE.

My objective is to have a domain with centralized authentication just like AD. I want to be able to log in using both Windows and Linux computers.

  • How can I do that in SAMBA?

  • What other solution you guys recommend if Samba4 is not a viable one?

  • It works with at least Windows 2K8 R2 + Ubuntu 12.04 server, just done recently, google is your friend.
    – daisy
    Sep 2 '12 at 15:15
  • If Samba4 is not viable, earlier versions of Samba can still act as an NT4 domain controller. It's not a full AD implementation but it does allow for centralized authentication.
    – Sean C.
    Feb 12 '13 at 14:30

You should be able to do this with Samba 4.

  • This is the correct answer. You can easily set-up a Forest of Samba4 Domain-Controllers on any recent Linux-Distro, and use the GUI-tools from Microsoft to configure Account, DNS, Group-Policies, etc. For Debian (8,x in 2016), you apt-get install samba, and follow the easy How-To from samba.org, or any of the zillion guiden available on the Internets. Jun 30 '16 at 16:20

Well, I am doing something similar now and best source of information I found so far is - Samba by Example - its most valuable chapters (ch. 1-5, 11, 15) describe some aspects of the mechanics of domain functioning. There's also a samba-HOWTO, but I bet you won't like it - too bland, too abstract.

What's pretty sure is that you can use Linux machine as a Domain Controller and Windows machines can login with accounts, stored on it. Also, http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/winbind.html states that

"Winbind uses a UNIX implementation of Microsoft RPC calls, Pluggable  Authentication Modules (PAMs), and the name service switch (NSS) to allow Windows NT domain users to appear and operate as UNIX users on a UNIX machine."

This can indeed be done with Samba 4 provisioned as an Active Directory server. You should follow the official Samba HowTo in the first instance.

You can use WinBind + PAM on the server for SSO authentication into SSH for example, so you have one unified set of users. You can extend this SSO to the Linux clients too by installing Samba 3 (for better client support at the moment) and using WinBind again, as if the Domain Controller is a Microsoft one. I have this setup working in a mixed environment of Windows & Linux machines.

I have been writing a HowTo for Debian here: http://davestidbits.blogspot.co.uk/p/blog-page.html


The now defunct Resara organization created Resara Server. Resara Server is a functional Active Directory implementation using Samba4. The complete package is in the Ubuntu 12.04 (Precise Pangolin) repositories under the package name rds.

A simple apt-get install rds should resolve all dependencies and give you a working Domain Controller to which you can join Windows-based computers, OSX computers and perform any LDAP/AD based authentication.

Group Policy is possible and is managed through the Windows RSAT tools.

The server can be managed from the rdsconsole application.

  • Answer no longer useful. Resara is defunct, and the package, if you can still find it, is outdated/insecure. Anyway, you don't need a special distribution. Just "apt-get install samba` on any recent Distribution in 2016, configure it according to guides from samba.org and you get a fantastic Domain-Controller. Jun 30 '16 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.