Hacker News new | ask | show | jobs
by oneplane 14 days ago
If you need an isolated (so no Entra and no Intune) built-in management option, then AD is probably the best fit. It will work with Samba or just plain LDAP and Kerberos (without GPOs), but that's probably not what you are after.

If you need to manage Windows clients, you should probably not use ADDS either way, and use their cloud offering (which is, of course, a subscription game). No server required for that.

The true use cases for greenfield ADDS installations are getting smaller and smaller every day.

1 comments

samba can be stood up as a domain controller since who knows how long at this point. There's a lot of janky setup and I'm surprised it even works with how complex (to me) the DNS records are in a Windows environment. But for very simple environments, it works. If I recall you can also utilize GPOs and templates. I don't know how straight forward it is to make or provision GPOs on a samba only domain, but it shouldn't be a problem.

Of course, there's having a working network, 'managing' Windows clients, vs software deployment of Windows clients.

The problem with Samba is that it can't do full HA. Yes, it's possible to do something like NFS re-sharing but that messes up permissions, you can't reliably spoof SMB and NTFS intrinsics that way. DFS-R isn't really viable with Samba. The reason this is important is that 'real' AD uses the SYSVOL over DFS to make sure every SYSVOL has the same data on it, and if any client talks to any advertised DC it gets the same interaction.

There is some irony to this: the vast majority of currently janky AD setups tend to be the yolo-single-instance windows server installation on physical hardware (usually with no backup, a tape backup or a crappy external USB HDD that will fail the first time it has to power down and back up again). Those could easily be replaced with Samba since it does exactly the same thing. It's usually paired with perhaps 4 to 10 workstations where 5 to 7 are actually used by multiple users with roaming profiles etc.

In bigger setups you wouldn't do any of that either way, and you'd either already be stuck in the horror that is legacy AD, hybrid AD or offline AD.

There tend to be excuses like "yeah but this user/admin will already be familiar with windows", which doesn't really make sense, because if that were the case it would be patched, well-configured, and have some piece of paper with minimal disaster planning written out. Most of those will even come with whatever you buy, as well as with most of the built-in docs and wizards and clickops stuff you go through in those systems, but they tend to be ignored all the same.

re: DFS-R, i always under the impression you could just use your standard linux utils/functionality to sync from machine to machine and then update/restore permissions:

https://samba.tranquil.it/doc/en/samba_advanced_methods-samb...

That's correct, but it won't behave the way people expect their GPEdit changes to propagate, even just a delay or inconsistency depending on which DC you happened to hit is going to sting a little. It's using something like unison or syncthing under the hood which doesn't handle it the same way as the whole "if the file isn't here yet we'll refer to where it actually is" mechanism in DFS.

It's similar to multiple instances of the editors being open and then having conflicting saves on a non-shared filesystem. You can do some of this with Ceph etc. but you always run into the assumptions that the MS tools make vs. what is actually implemented when you run a non-MS backend.

For a use case where you don't really use it that way and thus don't really care about that, you'll usually also get away with just a single node and solving HA with snapshots and virtualisation (or containers). If you can make a backing store for the SYSVOL that can be consistently re-used (instead of replicated/re-shared) a crash or failover can practically rely on block storage or object storage anywhere that supports extended attributes. Even if it's a single-writer system (hosting solo DCs on Kubernetes works great that way as long as you release the PVC quickly when a pod gets removed).

Does anyone seriously use that in production? I can’t imagine forking out for Windows licenses but then turning around and running Samba DCs.
Yes, it's used a ton in isolated systems where some manufacturer delivers a Windows client that you run in kiosk-mode but doesn't require anything else. Instead of paying double and having a bad time doing maintenance, you can emit as many fleets of that type as you need using generic DevOps practises.

I wouldn't run it in the classic way (server in the backroom of an office with a couple employees using it to log in and deal with files), but that's not because it's Samba, that's because I wouldn't do it with Windows Server either, that stuff gets yeeted into a cloud unless there is an actual budget to do it right.

What?

It can be stood up as a domain without Windows or an existing domain...

I've heard of people doing things like this, but it is usually extremely small teams and environments, like a library or a small startup that will remain less than 50 users as a non-profit or some such. People don't necessarily openly talk about it as much as I'd like but you also see people use it in the sysadmin sub-reddit. It's somehow still not as painfree to set up as you would on Windows but I imagine that's going to change more and more with people getting up to speed faster with AI type coding and tooling.

It's great for CI/CD too, just have a ready to do AD DC in a container, test your applications against that, nuke it all at the end of the run. Fast, cheap, dependable.

For the classic "have users use different workstations" that doesn't really matter as much any more, you can get a laptop and just take it with you. No network/directory login needed. If it were about GPOs, you could do that, but Ansible etc. can do that too, as well as Intune. GPOs also still work (albeit non-replicated/HA), but if you're doing that kind of management, you could also consider Chromebooks at that point.

Realistically, a lot of the 'work' that used to be done like that would be done on an iPad. There are of course still the special windows-only apps, but that's the sort of thing you'd want to box in and isolate as it doesn't tend to be the best quality software that is built like that (think: CnC controllers, planning software, thick clients, general enterprise software at large).

In the extremely fun and interesting Windows land you pay for Windows server licenses and then pay for users to access the Windows server.