https://www.google.com/search?hl=en&as_q=linux+active+directory+server is you getting the idea and soaked with information about the usual Linux server for Windows machines.

After you get that running you have a lot of work ahead as no Windows Home versions use the login system. You get to upgrade all versions to Pro.

Once that sinks in on costs and your next year of work, why not install a NAS?