r/linuxadmin • • Oct 26 '26

Is it worth replacing Windows Server and AD with Linux? Kinda got thrown into managing everything

/r/sysadmin/comments/1xfycna/is_it_worth_replacing_windows_server_and_ad_with/
35 Upvotes

28 comments sorted by

28

u/AKostur Oct 26 '26

Other than “don’t like it”: what’s broken?  Who’s gonna take the heat when something doesn’t work?  “Sales guy can’t access their desktop, why not?”  And it will be on -you-, not Microsoft.

-2

u/Ontological_Gap Oct 26 '26

There are several excellent organizations whose entire business is samba support

12

u/TheRealLazloFalconi Oct 26 '26

There are also many more excellent organizations (and even more still mediocre and bad organizations) whose entire business is Windows support. They're usually less expensive, too.

2

u/glotzerhotze Oct 26 '26

They are cheaper, because in general you need to buy a larger volume of their „product“ to fix your actual issue.

8

u/TheRealLazloFalconi Oct 26 '26

Not really. They're cheaper because they can hire less experienced techs to do the job.

1

u/Sir-Spork Nov 02 '26

Yeh, the problem is if people are set, if there is a problem (no matter how small) they will immediately jump to the “if you had just used MS this wouldn’t be happening”. Happens enough and everyone just blame you and say your bad decision making caused the problem.

55

u/oldlinuxguy Oct 26 '26

The answers you've already received over in /r/sysadmin are correct. You do not have the experience to do this successfully.

20

u/Minefoot Oct 26 '26

If you are already built around AD. Just keep AD. If I had a dollar for everytime someone suggested Linux as a AD replacement and it went horribly wrong I could retire early.

Windows Server isn't all that bad. Not that it is great. But AD/DS is stable enough if you limit your exposure to that. Linux integrates well enough into AD with sssd and other untilities.

1

u/xiaodown Oct 26 '26

No; and see my comment from a previous time this was discussed (in another but related sub).

1

u/lBifee Oct 26 '26

Thanks! It was very helpful

1

u/xiaodown Oct 26 '26

You're very welcome! Apologies for coming off gruff, I probably was just typing on my phone and in a hurry when i wrote that.

1

u/lBifee Oct 26 '26

Let me as you another question, i think i receive some answers on the topic but i am still a bit confuse. Can i use Windows active directory and use a linux for remote access?

2

u/xiaodown Oct 26 '26

Yes; assuming you mean you want your users to exist on AD, and then be able to log into a linux box that auths against the AD. Active directory is a full, standards compliant (... ish, depending on how pedantic you want to be) LDAP and Kerberos server. You can plug it in with PAM; tons of people have done so, it's a very very normal pattern.

For example, here's a reddit post that I found on google that's from 14 (!!!) years ago about doing this. There are some gotchas and caveats - you have to point your linux box's dns to the AD server and use it for DNS, you have to sync time because all the security stuff is really time dependent so make sure you have NTP set up etc - but it's not only doable, it's fairly easy. Especially if your job gives you a claude / codex account that you can use to guide you, but even without that, there are many guides on the internet for various linux distros and various configs.

It gets more complicated the more features you want to use. Simple username/password user management? Pretty easy. Using a samba / SMB share as a home dir on linux? Doable, might be kinda complicated. Setting up Kerberos tokens that can be forwarded and used as a single sign-on from your linux box? Doable but complicated and very fiddly. Etc.

.

UPDATE

Wow, this has gotten easier. Just out of curiosity, I asked my local LLM (qwen3.8 on my AI homelab) about this, and sheeeeeeesh, since the last time I did this, the tooling has gotten SOOO much better. When I did this, it was all manual, editing PAM configs and faffing about. Now, according to the LLM (so, grain of salt), basically the standard stack is realmd + SSSD. Effectively the process goes something like:

  • Install the required packages (realmd, sssd, adcli, oddjob-mkhomedir (creates local homedirs on first login), krb5-user)
  • Point DNS and NTP at the windows domain controller
  • Make sure the firewall has the appropriate ports open - 53 (DNS), 58 (kerberos), 135 (some windows thing), 389/639 (ldap[s]), 139/445 (samba).
  • join the domain with realm discover <domain.com> and realm join -u admin <domain.com>
  • If needed, tweak sssd for things like home directory layout and linux UID mapping, to taste.

realm apparently takes care of most of the wiring of the PAM and kerberos stuff now. If you do all of that stuff, you should be able to getent passwd <activedirectoryuser> and if that works id <aduser> and kinit aduser fairly quickly, and if all those work, you should be able to log in. Getting kinit to work used to be very touchy; if this works as qwen thinks it does, this is super doable.

2

u/lBifee Oct 26 '26

Thank you again, it's my first job and this responsability just dropped on my lap. U have no ideia how much this helped me haha

2

u/xiaodown Oct 26 '26

Oh, and the broader answer to your question: Even if your boss wants to move everything to Linux, I would strongly consider sticking with the Windows AD unless you have a compelling reason to do otherwise.

Now, let me put on my sysadmin hat for you just a little bit. If you are given a mandate to ditch windows, and your shop is going to be all linux, or all linux + mac, then I wouldn't replace AD with some other local LDAP + Kerberos box. I'd just swap it out with a cloud solution like Okta, which seems to be the most popular and the standard solution. I know your boss doesn't like it, but that's ... the reality we live in. Nearly all the web-based business apps these days have some sort of Okta auth plugin that you can opt in to, and also, you can use Okta for local logins on both mac and linux. Plus it provides MFA, both for local box logins and web-based apps. It doesn't do group policy objects, though, and might get expensive.

On linux, like basically every other centralized auth system, by default if user bob logs into boxA, it will create him a home directory, but that home directory will be localized to boxA (this is the same as it would be with AD, fyi). If bob then logs into boxB, it will make him a separate home directory there. If you want to avoid this and have shared home directories, you can set up an NFS server and mount it as home or whatever, there's a bunch of well-trodden ground there and guides available. I would skip anything that's telling you that AFS is a good solution, though.

.

Anyway, if your boss doesn't want to do cloud and doesn't want to do Windows Server anymore, including not running AD, you still have options, though they're pretty limited. Basically, they fall into one of two categories: 1.) FreeIPA - run your own LDAP + Kerberos server. This is arguably tried and tested, but it's verrrrrrrry 2003-vibes. Or, 2.) look at something that does effectively what Okta or other modern web-based SSO / MFA solutions do, but is open source and hostable locally, like Keycloak + Teleport community edition (keycloak is a redhat product), or Authelia. Keycloak will do all of the things(tm), but is a bit heavy. Authelia is way lighter weight (just run a docker container), but also, doesn't natively support logging in to linux boxes over ssh, so you'd have to use it plus a PAM module that supports OpenID Connect (OIDC).

Hope this does help you out a bit. You have options. None of them are perfect, and IMO your boss' requirements tend to cut out some of the more standard solutions to this, but it's still doable - it's just a question of what you really want and need, and how much jank you want to put up with.

2

u/lBifee Oct 26 '26

<Hope this does help you out a bit> It sure does, Thank you again!

2

u/xiaodown Oct 26 '26

You're very welcome! Again, not intended as a full guide, but it should at least point you in the direction of some googling that you can do to get you up to speed.

2

u/xiaodown Oct 26 '26

Also, see ubuntu's official documentation for this: https://ubuntu.com/server/docs/how-to/sssd/with-active-directory/ and note that you might need a few more packages than the ones that I explicitly listed - treat that as a jumping-off point, not a full list of definitive actions. From doing some googling, I think you may also have to explicitly enable the thing that makes home directories when AD users ssh into a linux box (pam-auth-update --enable mkhomedir). And a couple more gotchas - use realm permit to restrict which AD accounts can log in (if desired), and also supposedly when installing realm the installer may prompt you to join the AD as part of the install script, but apparently that is buggy, so just do it after the tool is fully installed.

But hey, still, waaaay easier than the last time I did this like 12 years ago.

2

u/AgreeableIron811 Oct 27 '26

Freeipa for a centralized user store and sssd integration
Keycloak for sso to webapps
Smallstep for generating shortlived ssh/sso certs

Linux works good enough today for AD. Ofc you have to be careful with DNS and Ntp and other things. But no matter if you use AD windows and or Linux AD the biggest difficulty lies in maintaining it, documentation and troubleshooting when something goes wrong and design redundancy and fallback

3

u/RetroGrid_io Oct 26 '26 edited Oct 26 '26

No, you don't want to do this at work until you have the experience to do this, and that probably comes from using a homelab or Home Data Center to get the experience. Since your boss hates Windows I suggest doing a "homelab at work" and demonstrate with junk computers from the closet that you can do all the things your AD does successfully before going live with it.

Your boss will appreciate your candor, and you'll get paid to make your boss happy doing something you like without sticking your neck on a guillotine before you've had a chance to deflect a few blades. :)

You have everything you need: junk computers and laptops are everywhere and you probably have a 5-port switch on the back of your router. You might need to buy a power strip and/or ethernet cables. If you're Linux curious, you'll never regret doing this.

3

u/Ontological_Gap Oct 26 '26 edited Oct 26 '26

Samda ad is great nowadays, run it on rhel with the tranquil build.

Be aware: there is no ad web services, and no adcs

Also ignore what tranquil says about disabling SELinux, it works great, you only need to through together custom policy for chrony signatures and whatever sysvol replication workaround you're using

1

u/hortimech Oct 26 '26

Why bother with the tranquil build on rhel, why not just use Samba from backports on Debian ?

2

u/Ontological_Gap Oct 26 '26

Much harder to get SELinux going there

1

u/balakaus666 Oct 26 '26

This conversation I was having with a friend, before you go to Linux you must have the knowledge for that. Because in the end up spending more with consultant instead of saving.

1

u/Coffee_Ops Oct 26 '26

changing the Physical machine to Ubuntu server (This i know i can handle) and the remote do something like Mint. Is This a viable option?

  1. For a small site hyperv is going to be a lot less trouble
  2. Mixing linux distros is just asking for pain. If you were to go linux, pick a distro and stick with it
  3. Any replacement plan needs to figure out config management. On windows that's GPO. Do you know puppet / ansible? Will the guy who replaces you?

1

u/h9xq Oct 27 '26

Eh if you are already on AD and windows server I wouldn’t bother.

There are alternatives but depending on your current environment it is likely a massive pain to migrate.

1

u/northrupthebandgeek Nov 01 '26

If you have to ask, it ain't worth it.

And I say that as someone who's deployed Samba 4 as a domain controller in production and was quite happy with it.