https://www.youtube.com/watch?v=KT6O-TfJ41g
Prerequisites
- Ubuntu Server (20.04/22.04)
- A user account with sudo privileges
- A Windows 10 PRO computer on the same network
- A Linux Desktop on the same server (Fedora or Ubuntu based)
In this example will be using Ubuntu 22.04 Server for the Active Directory. We will be connecting to it with a Windows 10 PRO client as well as Fedora as the Linux based client
DC Server Setup
Set the Server Hostname
For this demonstration we will be using the hostname dc1 for the Ubuntu server
Add Server to Hosts File
We will also need to modify the hosts file, add the following line to /etc/hosts
Verify Hostname
You can quickly verify everythign worked with the following command
Disable the DNS Resolver
Disable the DNS Resolver and unlink the config
Create our own Resolv.conf
Enter the following into /etc/resolv.conf
Make the file immutable
As we do not want anything to change this file automatically, we make it immutable so that it does not get modified
Installing Samba (packages)
Installing Samba (au.ldtp.com)
Enter the appropriate info
Disable Samba Services
Activate samba-ad-dc
Configuring Samba Active Directory
First backup the original smb.conf file
Provision the Active Directory
Enter the following info
- On Realm prompte – <Enter>
- On Domian Promp – <Enter>
- On Server Roll – <Enter>
- On DNS Backend – <Enter>
- DNS Forwarding IP – 9.9.9.9
- Enter an Admin Password
Backup and replace the Kerberos Config
Start samba-ad-dc
Set up Time Synchronization
Set permissions
Update Chrony
add the following to /etc/chrony/chrony.conf
Verifying Samba Active Directory
Run the following to verify
Then verify the Kerberos and ldap services
Then verify the Samba resources
Lastly KINIT
Create your first user (Optional)
The reason why this is optional, is you have more options when adding a user through the Remote Server Administration Tools (RSAT) on Windows.
Windows Setup
PreCheck
- Set Computer Name
- Set DNS/IP, The first DNS should be your Samba Server set up above
Verify DNS resolver
Add Server to Directory
Install RSAT to administer domain from Windows
Linux Setup
Precheck
- On Ubuntu, you may need to add the Universe repositories
Set Hostname
Modify Resolved info
On Fedora edit the Resolved config (This works on Ubuntu as well, old editions you may need to change the /etc/resolv.conf file)
Install required packages (Ubuntu Only)
For Ubuntu Only