- The best cheap phones in 2024: Expert tested and reviewed
- Cloud analytics migration: how to exceed expectations
- The Segway Max G2 electric scooter for $600 off at Best Buy ahead of Black Friday
- This Nintendo Switch bundle is just $360 at Amazon ahead of Black Friday
- Kirk and Spock reunite: AI gives us the Star Trek farewell we always wanted
How to easily join an AlmaLinux server to an Active Directory Domain with Cockpit
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.socket
That’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.lan
If 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.