If you don't want to spend money buying windows server to manage your network or domain, then you can use Ubuntu server capability using Samba. Installing Samba on Ubuntu is like having a windows server that enables you to manage your windows computer/ clients. So this is much like you are having a windows server on your network and yet you are only using ubuntu with samba installed and act as an active directory.
One way to check if you have a bad hard drive is to use some tools or software for checking hard drive errors. If you have windows OS, you can scan for hard disk error in the system tools -> Disk Defragmenter. This is also useful but there are also software that you can use on checking your hdd errors or bad sectors. I shared a video bellow on checking hard disk failures or bad sectors.
I would like to share with you some tips or ideas on how you can repair your hard disk drive (HDD). Even though your HDD fails or not detected in your PC's BIOS or it process very slowly, there may be some ways on how you can make it work again or how you can recover your important data on it.