Jack Wallen shows you just how easy it is to join an existing AlmaLinux server to an Active Directory domain via a web-based GUI.
If you've begun deploying AlmaLinux into your data center or your cloud-hosted services, you might have a reason to join those servers to your existing Active Directory domain. At first blush, you might think that process is a drawn-out exercise in command-line marathons. It's not. Believe it or not, thanks to the Cockpit web-based GUI, the process is incredibly simple.
And I'm going to show you how it's done.
SEE: Security incident response policy (TechRepublic Premium)
What you'll need
To make this work, you'll need an instance of AlmaLinux, a running Active Directory Domain Controller, and a user with sudo privileges (or the root user itself).
How to enable Cockpit
The first thing you must do is enable Cockpit since it's not enabled out of the box. Do this, log in to your AlmaLinux server and issue the command:
sudo systemctl enable --now cockpit.socketThat's all there is to enabling Cockpit. You can now point a web browser to https://SERVER:9090 (where SERVER is either the IP address or domain of the AlmaLinux server).
How to set the hostname
Before you can join the domain, you must first set the computer's hostname. Let's say, for example, the domain you'll be joining is example.lan. You might want to set your domain to almalinux.example.lan. For that, you could either use the command line or do it through Cockpit. From the terminal, that command would be:
sudo hostnamectl set-hostname almalinux.example.lanIf you'd rather do this through Cockpit, click Edit next to the hostname and then, when prompted (Figure A), type a Pretty Host Name (such as almalinux) and the full hostname (such as almalinux.example.lan). Click Change when finished.
Figure A
How to connect AlmaLinux to the domain
You're now ready to connect AlmaLinux to the domain. Click Join Domain, in the Configuration section (Figure B).
Figure B
In the resulting window, you'll first type the address of your Domain Controller. As soon as AlmaLinux finds the controller (Figure C), you can then select the authentication type, add the Administrator Name and Administrator password.
Figure C
At this point, AlmaLinux is now connected to the domain (Figure D).
Figure D
Congratulations, you've just joined your AlmaLinux server to an Active Directory domain, via the web-based GUI, Cockpit.
Subscribe to TechRepublic's How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.
Cybersecurity Insider Newsletter
Strengthen your organization's IT security defenses by keeping abreast of the latest cybersecurity news, solutions, and best practices. Delivered Tuesdays and Thursdays
Sign up todayAlso see
How to enable SSH 2FA on AlmaLinux for more secure logins (TechRepublic)
How to install cPanel/WHM alternative, DirectAdmin, on AlmaLinux (TechRepublic)
How to become a cybersecurity pro: A cheat sheet (TechRepublic)
Security threats on the horizon: What IT pro's need to know (free PDF) (TechRepublic)
Checklist: Securing digital information (TechRepublic Premium)
Online security 101: Tips for protecting your privacy from hackers and spies (ZDNet)
Cybersecurity and cyberwar: More must-read coverage (TechRepublic on Flipboard)