It does the job. We use samba4 in a mixed environment. W10/Ubuntu20. It worked well until a libpam-sssd update on ubuntu worksfations totally broke the kerberos auth. We'll migrate to Fedora very soon. Fedora works like a charm with samba4 even if rhel told it doens't officially support samba4. W10 workstations works well. GPO works. Our needs are not well elaborated for the moment so i cannot tell unless you have specific questions. Answer from Disruption0 on reddit.com
🌐
SambaWiki
wiki.samba.org › index.php › Setting_up_Samba_as_an_Active_Directory_Domain_Controller
Setting up Samba as an Active Directory Domain Controller - SambaWiki
June 1, 2026 - # samba-tool domain provision --use-rfc2307 --interactive Realm [SAMDOM.EXAMPLE.COM]: SAMDOM.EXAMPLE.COM Domain [SAMDOM]: SAMDOM Server Role (dc, member, standalone) [dc]: dc DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE) [SAMBA_INTERNAL]: SAMBA_INTERNAL DNS forwarder IP address (write 'none' to disable forwarding) [10.99.0.1]: 8.8.8.8 Administrator password: Passw0rd Retype password: Passw0rd Looking up IPv4 addresses Looking up IPv6 addresses No IPv6 address will be assigned Setting up share.ldb Setting up secrets.ldb Setting up the registry Setting up the privileges database
🌐
BostonCube
bostoncube.com › tech-life › ubuntu-2404-deployment › 250209-u2404-sambadc1
Samba 4 Domain Controller - part 1
February 9, 2025 - Both "real" and Samba 4 domain controllers replicate Active Directory between themselves, so rather than trying to upgrade Ubuntu I can build new hosts, install Samba 4 on them and join them to the domain.
🌐
Reddit
reddit.com › r/linuxadmin › samba server as active directory - domain controller
r/linuxadmin on Reddit: Samba Server as Active directory - Domain Controller
August 19, 2024 -

Hi,

Is there an actuall Guide how to create an samba-ad/dc Server?

The guids i have found are either outdated, for Ubuntu, or both.

Packages Arnt found anymore. Daemons are renamed. Commands dosnt work anymore.

  • even Copilot dosnt Help.

🌐
Medium
medium.com › meetcyber › full-guide-deploying-samba-active-directory-on-fedora-and-rocky-with-hybrid-dns-and-gpo-support-30f47fab1e90
📚 COMPLETE AND DETAILED TUTORIAL: Installing Samba 4 Active Directory Domain Controller on Fedora 42+/Rocky Linux 9+ | by Euripedes Batista | MeetCyber
February 4, 2026 - Place these lines in the [global] section of /etc/samba/smb.conf. Keep them after the generated provisioning block. Use testparm -s after editing. # Identity and role (should be present by provisioning) netbios name = DC1 realm = FEDORA.LAN workgroup = FEDORA server role = active directory domain controller
🌐
Reddit
reddit.com › r/linuxadmin › samba 4 ad - feature parity with windows ad?
r/linuxadmin on Reddit: Samba 4 AD - feature parity with Windows AD?
May 25, 2022 -

Hi

Has the samba 4AD the same features than the windows ad?

I know it's missing some replication features and some other things non important things but my question is:

  • is it generally useable for real world?

What works? What does not work yet?

Thanks

Top answer
1 of 5
17
It does the job. We use samba4 in a mixed environment. W10/Ubuntu20. It worked well until a libpam-sssd update on ubuntu worksfations totally broke the kerberos auth. We'll migrate to Fedora very soon. Fedora works like a charm with samba4 even if rhel told it doens't officially support samba4. W10 workstations works well. GPO works. Our needs are not well elaborated for the moment so i cannot tell unless you have specific questions.
2 of 5
12
I have two clients that each have their own Samba AD domain, for a total of about 200 computers/users. Here are my thoughts on the questions you've asked: -Generally usable for real world: Yes, I'd say generally usable. There are going to be use cases where something won't be compatible with it, but those cases are likely rare anyway. -Replication features. These can be overcome. The users/computers are relatively easy to replicate between two domain controllers, once they've been set up. You can query the DCs to see how the replication is going. As for GPOs and things involving Sysvol, I think you still have to set this up outside of Samba (rsync in a cronjob or something similar), but again, this can be overcome. -Login and Home Dirs: We've not used it for setting home directories/remove profiles, so I can't speak to that. -Sync with Azure: I have no idea. I'd like to know this, as well. -Single Sign-On: I haven't used it personally. I think it depends on the implementation of your service. I've worked with someone who uses Samba AD to act as authentication to their Zimbra email as well as RADIUS, so it should be possible so long as your service can talk to the domain controller properly (or use some kind of compatible client on a Windows workstation) -Network shares. As long as your fileshare is properly joined to the domain (you don't want your network shares to run on the domain controller itself), this works well. I recommend that you use a Windows client and RSAT to configure your users and groups, as well as set your permissions. The question I have for you - is the share also going to be Samba-based? Edit: One limitation is that the latest schema supported by Samba AD is Windows Server 2012R2. I've not had any issue with this, but it's something to be aware of. Edit 2: Does anyone happen to know if a proper Windows domain controller lets you easily dump the hashes for all your domain users? Samba does, in the same way you can view the /etc/shadow file. I don't think this an issue (if a bad guy can get to your domain hashes, you have bigger issues), but it's interesting.
🌐
AWS
aws.amazon.com › blogs › modernizing-with-aws › integrating-samba-4-active-directory-with-aws-iam-identity-center
Integrating SAMBA 4 Active Directory with AWS IAM Identity Center | Microsoft Workloads on AWS
May 13, 2025 - In this blog post, we will show you how to integrate an LDAP open-source solution with AWS IAM Identity Center leveraging either AWS Managed Active Directory or Active Directory Connector. Introduction Microsoft Active Directory has been a widely used identity management solution in Windows ...
🌐
OneUptime
oneuptime.com › home › blog › how to set up samba as an active directory domain controller on ipv4
How to Set Up Samba as an Active Directory Domain Controller on IPv4
March 20, 2026 - # /etc/samba/smb.conf (excerpt with IPv4 binding) [global] workgroup = EXAMPLE realm = EXAMPLE.COM netbios name = DC1 server role = active directory domain controller # Bind to the IPv4 address of this DC interfaces = lo 192.168.1.10/24 bind interfaces only = yes dns forwarder = 8.8.8.8
🌐
GitHub
github.com › conankiz › Ubuntu-20.04 › blob › main › AD › Create an Active Directory Infrastructure with Samba4 on Ubuntu.md
Ubuntu-20.04/AD/Create an Active Directory Infrastructure with Samba4 on Ubuntu.md at main · conankiz/Ubuntu-20.04
... In order to transform your server into an Active Directory Domain Controller, install Samba and all the required packages on your machine by issuing the below command with root privileges in a console.
Author   conankiz
Find elsewhere
🌐
openSUSE Forums
forums.opensuse.org › english › network/internet
Configuring Samba 4 as Active Directory Domain Controller - Network/Internet - openSUSE Forums
March 12, 2016 - Hello, I’d like to configure Samba 4 on my Linux box to act as an AD DC for my NAS (QNAP TS-451+). So far, the NAS does not find the domain controller. Is there a good step-by-step guide on how to setup Samba 4 as a do…
Top answer
1 of 1
4

At this time, Samba 4.15 only supports Server 2008 functional level, so you most likely won't be able to add Samba DCs to your existing domain. You also won't be able to add a new domain to the forest.

Other than that, there might be some compatibility problems depending on the Samba version – I would very strongly recommend 4.12 or later. Here's the overall status around Samba 4.15:

  • Samba does support joining an existing domain as a DC and replicating data, but even if you start fresh with a Samba-only domain you'll want a recent version with all the replication-related fixes.

  • Samba does not implement AD Web Services, which means PowerShell AD cmdlets will not work. However, RSAT does work as it only needs traditional MS-RPC and LDAP. (PowerShell's [adsi] interface is also LDAP-based, so it works too.)

    • (I seem to remember that promoting Server2012+ as a DC appears to require AD Web Services for some reason, so that won't work either... so if you want to migrate from Samba to Windows Server, you might need to use Server2008 as an intermediary.)
  • File ACLs will work fine, as do registry ACLs, printer ACLs, GPO ACLs, etc. All of them are enforced by file servers themselves, not by the DCs (the DC just has to report your group memberships correctly).

  • AD Certificate Services will work, but it's not a DC feature and not included as part of Samba – you will still need Windows Server to actually host the certification authority.

    • Also note that older Samba DC versions (up to 4.12) had a bug which prevented computers from being automatically granted "Domain Computer" SID, which affected all types of ACLs. Most importantly it meant AD Certificate Services auto-enrolment wouldn't work, because many standard certificate template ACLs require "Domain Computer". (This bug was fixed in 4.13+ so ADCS now works correctly, as do all other ACL types.)
  • Group Policies will work. However, the GPO data won't automatically sync across multiple DCs (because Samba lacks DFS-R support), so you'll need to manually robocopy your Sysvol after every change. (But note the "Domain Computer" ACL bug.)

  • Azure AD Connect probably won't work.

  • I'm not sure whether Kerberos constrained delegation is implemented fully, which may be relevant to Hyper-V clusters.

  • Standalone Hyper-V works. Replication works. Live migration almost works – there's a small bug (all the way to 4.16) that prevents Samba DCs from correctly issuing Kerberos tickets if the SPN contains spaces.

    (Fortunately, Hyper-V live migration is the only service that thought it would be a good idea to put spaces in its SPNs. There is a manual workaround, though, and there is a patch on Bugzilla as well, but it hasn't been applied yet.)

  • No idea whether Hyper-V clustering works or not – it might be affected by the "spaces in SPN" bug, as well as lack of constrained delegation.

🌐
ArchWiki
wiki.archlinux.org › title › Samba › Active_Directory_domain_controller
Samba/Active Directory domain controller - ArchWiki
April 9, 2026 - This article explains how to setup an Active Directory domain controller using Samba. It is assumed that all configuration files are in their unmodified, post-installation state. This article was written and tested on a fresh installation, with no modifications other than setting up a static IPv4 network connection (required).
🌐
Lawrence Systems
forums.lawrencesystems.com › software & web applications
Windows 2022 joined to Samba 4.20 - Software & Web Applications - Lawrence Systems Forums
May 2, 2024 - I joined Windows Server 2022 to Samba 4.20. For those who are familiar with Samba based Active Directory, you might be a little surprised. Historically this would of not been possible as Samba AD is only at a 2008 functional level. However, starting with Samba 4.19 there is a new smb.conf option called ad dc functional level.
🌐
Ubuntu
ubuntu.com › server › docs › how-to › samba › provision-samba-ad-controller
Provisioning a Samba Active Directory Domain Controller - Ubuntu Server documentation
1 week ago - This Samba AD/DC server can be treated as an Active Directory server for Window and Linux systems. Typically next steps would be to create users and groups, and join member servers and workstations to this domain.
🌐
SlideShare
slideshare.net › slideshow › samba-4-41997570 › 41997570
Samba 4 | PDF
JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
🌐
Gentoo Wiki
wiki.gentoo.org › wiki › Samba › Active_Directory_Guide
Samba/Active Directory Guide - Gentoo wiki
September 25, 2024 - Else you would have 2 server. Windows Client using Samba 4 AD and Linux client using an LDAP Server from another which is no longer centralized and defeated the purpose.
🌐
Ordinoscope
ordinoscope.net › index.php › Informatique › Softwares › Samba › Samba_4.x_-_comme_DC
Informatique/Softwares/Samba/Samba 4.x - comme DC — Ordinoscope.net
Avant de démarrer sur l'introduction, il est nécessaire de bien comprendre ce signifie le mode DC. Il s'agit d'un serveur AD, avec les services LDAP, Kerberos et DNS, et ayant une copie locale des bases de données de l'AD. Contrairement au mode Samba 3.x-4.x comme membre AD, une erreur de ...
🌐
YouTube
m.youtube.com › watch
Creating a Windows AD using Samba 4 on Ubuntu 22.04
Share your videos with friends, family, and the world
Published   November 10, 2022
Top answer
1 of 2
4

Active directory knows the concept of multiple DCs replicating in a multi-master fashion. That means that you can add additional DCs to your existing domain. See the full instructions on the Samba Wiki.

In this setup, all DCs for the domain will be active simultaneously, and clients will use all of them. If one DC fails, the clients will simply continue to use the other DC(s). If a DC should be taken out of the domain, the process is called demotion of the DC. There are also notes for that on the Samba Wiki.

Note that the replication that is currently impemented with Samba only treats the directory data, not file share data. While there are file replication mechanisms in Windows, these are not fully implemented in Samba yet. If you want to do serious file sharing, you may want to do that not on the DCs but on additional Samba servers that are members of the domain. You would then make the file server highly available by establishing a backup of the data to a different server that is configured to take over the file server role if the productive file server fails. (Alternatively, a clustered/distributed file system could be used to store the file server data and samba could be clustered with CTDB, but that might be an overkill for your purposes.)

2 of 2
2

When you set up your first DC with Samba4, the term used is that you "provision" the domain. Among other things, provisioning creates the databases Samba uses.

Then when you add another DC (and you should have at least 2) you install Samba on it, configure it to use the first DC as its nameserver, and then join the domain. This will replicate the databases to the new DC and allow it to validate logins, etc. As mentioned in the other answer, the Samba wiki has instructions for joining another DC.

When you add another DC, be sure to follow the step labelled "GID mappings of built-in groups." One of the tricky things with Samba4 is getting all the mapping of UIDs/GIDs to work properly and with DCs you really want to do that step.

Unlike Windows Servers, Samba doesn't replicated the contents of the sysvol folder among DCs. If you want to use GPOs (which are stored under sysvol), you'll have to set up something to sync them yourself.

Finally a warning: demoting your first DC - which will hold the 5 (or 7, depending on how you count) FSMO roles - is problematic.