I’m curious as to why someone would need to do that short of having a bunch of users and a small office at home. Or maybe managing the family’s computers is easier that way?

I was considering a domain controller (biased towards linux since most servers/VMs are linux) but right now, for the homelab, it just seems like a shiny new toy to play with rather than something that can make life easier/more secure. There’s also the problem of HA and being locked out of your computer if the DC is down.

Tell me why you’re running it and the setup you’ve got that makes having a DC worth it.

Thanks!

  • h3ndrik@feddit.de
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    edit-2
    10 months ago

    Uh, why use a Microsoft product that doesn’t even tie into the rest of the selfhosted services very well? There are easier and way better solutions for SSO and web services. And I don’t have a pool of 30 windows laptops that’d need to share a set of login credentials and software rollout, at home.

    I’d rather use the time I’d put into such a project that is just work and little to no benefit for something else. For example doing backups, deleting the Windows on those laptops and replacing it with free software.

    • MigratingtoLemmy@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      The main idea was to see if AD will bring any benefit to my homelab. The idea of running a domain controller is very intriguing, and it doesn’t need to be AD specifically, although I’d like to get some hands-on time with it too.

    • RedFox@infosec.pub
      link
      fedilink
      English
      arrow-up
      2
      ·
      10 months ago

      Sometimes it’s for career progression or familiarity.

      Just for SSO, might be easier ways, sure.

  • Treczoks@lemmy.world
    link
    fedilink
    English
    arrow-up
    10
    ·
    10 months ago

    Keep in mind that AD, Office, and Exchange is he holy trinity of getting hacked in the last years.

  • cm0002@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    ·
    10 months ago

    I do, for a multitude of reasons

    • Easier management of family computers
    • an authoritative source for Authentik SSO
    • Learning experience, I’m also heavy Linux, but I try to maintain an OS agnostic philosophy with my skill set so I can have options in my career
    • I was bored
    • Again, since I like to maintain an OS agnostic philosophy I have a healthy mix of Windows, Linux and MacOS devices, and you CAN in fact join Linux (w/ SSSD) and MacOS to a domain too

    In addition to what others have said with roaming profiles and such:

    DO NOT SET YOUR AD DOMAIN AS THE SAME DOMAIN OF A WEB ADDRESS YOU USE

    I…er…someone… Found themselves in this situation and have been in a mess since lmao

    • OCT0PUSCRIME@lemmy.moorenet.casa
      link
      fedilink
      English
      arrow-up
      2
      ·
      10 months ago

      Can you explain your disclaimer? You suggest not setting your AD domain to a web address you use, like one for self hosted sites? So you buy 2 domains, one for AD and one for sites? Or you use an internal domain for AD?

      • RedFox@infosec.pub
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        All the descriptions are right and techniques. Microsoft sometimes refers to this is split-brain and their documentation.

        Organizations that choose not to do that use an active directory specific subdomain like some of the other comments mentioned. Example: adds. Company.tld.

        Computer1.adds.company.tld. Dc1.adds.cimoany.tld.

        Others doing split domain are

        Adds.company.internal

      • cm0002@lemmy.world
        link
        fedilink
        English
        arrow-up
        6
        ·
        10 months ago

        AD is heavily reliant on the DNS protocol, so heavily in fact that a large component of an AD deployment is a DNS server.

        So basically, when the AD DNS server takes over on your network It’ll do DNS things as you’d expect, when it gets a DNS call with the AD domain it will answer with the AD server every time

        If your AD domain and your web address domain are domain.com then whenever the AD DNS server gets theh call it won’t answer with the IP address of the web server, it’ll answer with the AD server, even when you are trying to access a web service like domain.com/Plex or something.

        You can change the DNS server used on the host, but then you’ll be borkin domain functionality in weird ways

        Yea, you’d want an entirely different domain or an internal like domain.lan or in my case what I should have done is made it a subdomain like ad.domain.com

        And also it’s a bitch to change the AD domain once you get it all setup hence I’ve been procrastinating with hosts file workarounds lmfao

          • Xakuterie@dormi.zone
            link
            fedilink
            English
            arrow-up
            2
            ·
            10 months ago

            If I remember correctly that is best practise, no? It was something.local or *.intern for years, until TLDs could be whatever you wanted them to be.

            • taladar@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              1
              ·
              10 months ago

              Do not use made up domains for anything these days. It will make it a pain if you ever need a certificate for that domain that isn’t self-signed.

            • nottelling@lemmy.world
              link
              fedilink
              English
              arrow-up
              1
              ·
              edit-2
              10 months ago

              .local is reserved for mDNS responses, don’t use that.

              It’s more than best practice. Your active directory controllers want to be the resolvers for their members, separate from other zones such as external MX records or the like. Your AD domain should always be a separate zone, aka a subdomain. “ad.example.com”.

              If your DCs are controlling members at the top level, you’ll eventually run into problems with Internet facing services and public NS records.

              Also per below. You can’t get commercially signed certificates for fake domains. Self hosting certificate authorities is a massive pain in the ass. Don’t try unless you have a real need, like work-related learning.

      • jemikwa@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        10 months ago

        In shorter terms to what the other comment said, your website won’t work in networks that use DNS served by your DC. The website is fine on the Internet, but less so at home or at an office/on a VPN if you’re an enterprise.
        “I can’t go to example.com on the VPN!” was a semi common ticket at my last company 🙃

    • MigratingtoLemmy@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      10 months ago

      Thank you for the wonderful comment.

      Indeed, I was hoping to have a good SSO setup alongside learning about AD and domain services (also looking at the *nix alternatives like 389DS and FreeIPA).

      Could you tell me more about the DNS setup with regards to AD? I’d like to use my own DNS and not have AD be the DNS provider in my network. The idea to put it in its own subdomain is excellent and I’ll remember that.

      People here also mention an increase in attack surface and security vulnerabilities in running AD/domain services on a network. Now, I agree that letting free access to the domain server and having rogue accounts causing havoc on the network is not great, but I’d like to know more. What has been your experience?

      • huskypenguin@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        0
        ·
        10 months ago

        Not the original commenter, but I don’t understand how that would increase your attack surface. The AD is inside the network, and if an attacker is already in, you’re compromised. There might be way to refrence a DNS server with a windows server, but then you’re running windows and your life is now much more difficult.

        As per DNS, the AD server must be the DNS provider. If you run something like nethserver in a VM you can use it as a dns & ad server.

        The domain thing, the AD server is the authorative for its domain. So if you set it as top level, like myhouse.c()m, it will refrence all dns requests to itself, and any subdomains will not appear. The reccomended way to get around this is to use a subdomain, like ad.myhouse.c()m. Or, maybe you have a domain name to burn and you just want to use that?

        • MigratingtoLemmy@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          0
          ·
          10 months ago

          Thanks, you’re the second person who spoke about Neth server to me. I’ll take a look.

          I was planning to create a subdomain for it anyway, it’s just that I was misled that if I didn’t give it control over DNS for the network it wouldn’t function properly. That doesn’t seem to be case (which I’m glad for).

          I do not quite understand how the attack surface is increased other than running Windows on my network. I will have to look deeper into it myself.

          Thanks

          • huskypenguin@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            2
            ·
            10 months ago

            It may have been me both times. I went down a deep AD hole recently, and was trying to find an easy open source way to do it.

            My advice is to put whatever you choose into a vm and snapshot it right before you configure the AD. I think I reconfigured mine 8 times before I was happy.

  • Monkey With A Shell@lemmy.socdojo.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    Not AD proper but a compatible controller Linux distro to tie the desktops to, plus common credentials across several services. Just simplifies things not having a dozen different logins.

    • w2tpmf@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      What is that controller distro you use?

      I used to use a Linux based AD replacement years ago but they turned that one into a pay model and if I’m going to pay for something I’ll just use Windows Server

      • Monkey With A Shell@lemmy.socdojo.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        10 months ago

        https://www.univention.com/

        It has all the needed parts plus an interesting plug in app ecosystem if you like that kind of thing. My only real gripe with it though is a pile of high sev vulnerabilities that are picked up by a scanning engine that haven’t been fixed for a long time, so I’m reluctant to recommend it unless you have a solid security/segmentation setup in place.

  • Nollij@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    19
    ·
    10 months ago

    You’re overlooking a very common reason that people setup a homelab - practice for their careers. Many colleges offer a more legitimate setup for the same purpose, and a similar design. But if you’re choosing to learn AD from a free/cheap book instead of a multi-thousand dollar course, you still need a lab to absorb the information and really understand it.

    Granted, AD is of limited value to learn these days, but it’s still a backbone for countless other tools that are highly relevant.

  • alomsimoy@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    I’m running truenas scale with truecharts and I manage all users and groups with the LLDAP chart, which is an stripped down version of ldap. I’m considering deploying another server and running 389ds with replication to increase the features and to learn more about ldap, but overall lldap covers all my necessities regarding user and group managment in all my homelab apps

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    10 months ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    DNS Domain Name Service/System
    Git Popular version control system, primarily for code
    IP Internet Protocol
    Plex Brand of media server package
    SSH Secure Shell for remote terminal access
    SSO Single Sign-On
    VNC Virtual Network Computing for remote desktop access
    VPN Virtual Private Network
    VPS Virtual Private Server (opposed to shared hosting)

    9 acronyms in this thread; the most compressed thread commented on today has 10 acronyms.

    [Thread #507 for this sub, first seen 13th Feb 2024, 02:55] [FAQ] [Full list] [Contact] [Source code]

  • computergeek125@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    10 months ago
    1. Yes I do - MS AD DC

    2. I don’t have a ton of users, but I have a ton of computers. AD keeps them in sync. Plus I can point services like gitea and vCenter at it for even more. Guacamole highly benefits from this arrangement since I can set the password to match the AD password, and all users on all devices subsequently auto-login, even after a password change.

    3. Used to run single domain controller, now I have two (leftover free forever licenses from college). I plan to upgrade them as a tick/tock so I’m not spending a fortune on licensing frequently

    4. With native Windows clients and I believe sssd realmd joins, the default config is to cache the last hash you used to log in. So if you log in regularly to a server it should have an up to date cache should your DC cluster become unavailable. This feature is also used on corporate laptops that need to roam from the building without an always-on VPN. Enterprises will generally also ensure a backup local account is set up (and optionally auto-rotated) in case the domain becomes unavailable in a bad way so that IT can recover your computer.

    5. I used to run in homemade a Free IPA and a MS AD in a cross forest trust when I started ~5-6y ago on the directory stuff. Windows and Mac were joined to AD, Linux was joined to IPA. (I tried to join Mac to IPA but there was only a limited LDAP connector and AD was more painless and less maintenance). One user to rule them all still. IPA has loads of great features - I especially enjoyed setting my shell, sudoers rules, and ssh keys from the directory to be available everywhere instantly.

    But, I had some reliability problems (which may be resolved, I have not followed up) with the update system of IPA at the time, so I ended up burning it down and rejoining all the Linux servers to AD. Since then, the only feature I’ve lost is centralized sudo and ssh keys (shell can be set in AD if you’re clever). sssd handles six key MS group policies using libini, mapping them into relevant PAM policies so you even have some authorization that can be pushed from the DC like in Windows, with some relatively sane defaults.

    I will warn - some MS group policies violate Linux INI spec (especially service definitions and firewall rules) can coredump libini, so you should put your Linux servers in a dedicated OU with their own group policies and limited settings in the default domain policy.

  • mikyopii@programming.dev
    link
    fedilink
    English
    arrow-up
    5
    ·
    10 months ago

    I ran it previously because I came from that world and I just thought that’s what you did. I was less Linux-y then. It’s really overkill for such a small network but if you want to learn AD then it might be worth it. Personally I hope to never look at AD again but alas I need moneyz.

    If you do decide to run it make sure you enable profile caching in group policy, it will prevent you from being locked out when your DC is down. Also if you have laptops you can safely bring them outside your network and they will still be able to log in.

  • Unforeseen@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    5
    ·
    10 months ago

    You could look at freeIPA or something similar to stay on Linux.

    I’m an AD specialist, starting when it came out with server 2000, and can tell you it’s a waste of time for a home network unless you are doing this just because you want to learn it.

    It will definitly not make your life any easier, and will increase attack vectors, especially if you don’t know how to secure and protect it.

    • Godort@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      I agree that for this size of network AD is definitely not something you want to deal with unless you want to learn how it works.

      However, I’m not sure it really increases attack vectors to have it running, outside of the fact that it’s a new network service on the LAN. The out of the box default configuration is not bad these days, security-wise

      • Unforeseen@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        2
        ·
        10 months ago

        The attack vectors I’m thinking of just come from the inherent complexity and centralization. I’m just considering the amount of damage that can be done with a compromised DA account for example vs a non directory environment.

        It’s complicated. Done right it can be more secure, not done right it’s less secure.

        I also only get brought in for problems for the last however many years, so I’m probaby a bit biased at this point haha.

        I have had to tell companies they are going to have to rebuild thier AD from scratch because they didn’t know what thier DSRM password was (usually after a ransomware attack). These are the sort of hassles I think about vs non AD.

  • kylian0087@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    I in fact run a AD domain controller *and *a rhel IDM controller. For me other then it is fun to play with, makes it a load more simple to manage the user accounts of my famalie. Also auto mounting network shares and setting a few policys for updates and security is great to from a central location. having SSO for many if my services also makes it more easy to use for the fam. The rhel IDM controller I use to manage a few user accounts. I also use it to manage the ssh keys and set sudo rules on all my servers.

  • conorab@lemmy.conorab.com
    link
    fedilink
    English
    arrow-up
    4
    ·
    10 months ago

    Run at home/lab to learn AD and also gives you a place to test out ideas before pushing to production. You may be able to run a legit AD server with licensing on AWS or similar if they have a free tier.

  • azl@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    I do. 4 or 5 users and several computers plus virtual server members. I still use Linux for DNS which works surprisingly well after the initial setup.

    I did it half for practice and half for fun, but having the authentication backend makes it good enough to keep around.

    • MigratingtoLemmy@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      10 months ago

      Could you tell me how you use your own DNS server with AD? I was under the impression that AD wanted to control DNS in the network.

      • azl@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        There are some SRV and other records which you add for the AD-provided services (kerberos, gc, ldap). This allows your Windows clients to find the domain controllers for authentication via your non-Windows DNS. I think I might have followed a Microsoft or other article when doing the initial setup, but once getting those items in place I haven’t had many issues.