!! WARNING !!
I am not an expert in this field. I have got this working successfully. My AD DC Server is NOT a Windows Server and you WILL/MIGHT have to modify properties to get it working as you may wish. I am using a Samba AD DC (4), replicate this if you fail using Windows Server.
Thanks for reading this!
Background Data:
- Running on PiMox (Raspberry Pi Equivalent of Proxmox)
- Raspberry Pi 4b, 8 GB Edition
- The OpenMediaVault is ran as a VM
- The Active Directory is also ran as a VM on Debian 12
- My nr.01 Domain Server is dc01.home.local, manages DNS, you will have to modify /etc/hosts (may not be needed but incase)
- My Domain "forst" is home.local and for short I use "home". Anything including about the domain or short hand means YOU WILL have to modify this to get it working.
- In my AD DC server for some reason the Workgroup is HOME so you may also want to change that.
Setup:
1. I installed debian 12 (1 core, 2 GB Ram). Default, config is fine, just set ur hostname as I won't mention that (hostnamectl set-hostname <FQDN e.g nas02.home.local>
2. Ran the Install Script:
sudo wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
- Github: https://github.com/OpenMediaVa…-Developers/installScript
3. Go to server at http://[YOUR SERVER IP]/
4. Login as admin:openmediavault
5. Network > Interfaces, select your main interface and press the Edit (Crayon like icon)
6. Set the IPv4 to Static (Netmask is usually 255.255.255.0)
7. At advanced settings put your DNS Server (That also handles your AD DC Server)
8. At "Search domains" put your forest domain for me its home.local
9. Wait for "Pending configuration" and save.
=== EXTRA NOTE ( Forgot to add ) ====
Go to your DNS Server and add the new IP and the full FQDN of the server. This is to prevent some errors from happening when connecting the server via net ads join!
======================================
10. Go to http://[NEW IP ADDRESS]/
11. Login, change admin password ( safety reason)
12. System > Date & Time change "Time servers" to your AD DC Server address (dc01.home.local, home.local)
13. Wait for "Pending confiuration" and apply changes.
14. System > Plugins and look for "openmediavault-hosts" and download it. ( Thanks to the author, I don't need to use dnsmasq )
15. Network > Hosts and add the following line(s) for each DC server (change as required):
192.168.0.112 dc01.home.local home.local home
16. Save. Wait for "Pending configuration" and apply and save changes.
17. Go to /etc/krb5.conf and change and paste the following:
[libdefaults]
default_realm = HOME.LOCAL
dns_lookup_realm = false
dns_lookup_kdc = true
19. Go to /etc/security/pam_winbind.conf and just paste the following:
[global]
krb5_auth = yes
krb5_ccache_type = FILE
20. Do the following commands as sudo:
sudo apt install acl attr samba winbind libpam-winbind libnss-winbind krb5-config krb5-user dnsutils python3-setproctitle
21. Go to OMV then Services > SMB > Settings and change the workgroup as required. Then go down to extra options and paste and modify the follwoing ( LEAVE THE CAPITALS, CAPITALISED
security = ads
kerberos method = secrets and keytab
realm = HOME.LOCAL
winbind enum users = yes
winbind enum groups = yes
idmap config * : backend = tdb
idmap config * : range = 3000-7999
idmap config HOME : backend = rid
idmap config HOME : range = 10000-9999999
winbind use default domain = yes
username map = /usr/local/samba/etc/user.map
Alles anzeigen
22. Go to /usr/local/samba/etc/user.map ( you might need to make some directories, mkdir ) and paste and MODIFY the following (Change Administrator to admin or someone idk):
!root = HOME\Administrator
23. Do the following command change Administrator to ur domain admin or someone who can join computers to domain
sudo net ads join -U Administrator
24. Go to /etc/nsswitch.conf and edit passwd and group from:
files systemd (winbind) to just "files winbind" e.g:
passwd: files winbind
group: files winbind
shadow: files systemd
gshadow: files systemd
25. You can start Samba. You may have to restart the server for users and groups to work. Also make sure everything was completed as one little mistake can break it.
Sources:
- Samba Wiki Page (https://wiki.samba.org/index.p…_Samba_as_a_Domain_Member)
- "donh" from openmediavault forum (OMV 6.X AD Form helped some of this )
- Me, i researched this.
Thank you!
- yew2362
I do not plan on giving support for this as I am not a big person in Long Term Support, so ask gpt or sm idk.