Search
StarWind is a hyperconverged (HCI) vendor with focus on Enterprise ROBO, SMB & Edge

How to integrate a Linux system with Windows Active Directory

  • May 25, 2021
  • 7 min read
IT Engineer and Technical Author. Karim is specializing in Linux, he is a prolific blogger who writes for various websites.
IT Engineer and Technical Author. Karim is specializing in Linux, he is a prolific blogger who writes for various websites.

Windows AD (Active Directory) is a service used to manage users on a network. Windows AD makes the life of end-users and system administrators manage their users easy and securely. It provides a centralized management and control over a large number of users. There are many other benefits using Windows Active Directory but integrating it with a Linux Operating system is another challenge. So, in this article we are going to show you how you can integrate your Linux system with your Windows Active Directory domain.

Prerequisites:

The basic requirements for the task that we are going to achieve in this article is to have a Windows server with Active Directory role installed with a domain configured. On the other hand you need to have a Linux system either with RHEL/CentOS or Ubuntu Operating system running on with sudo rights.

Step 1: Installing required packages

In order to install the required packages, login to your system with root user or run the commands with ‘sudo’ on your Linux system.

First, update your system using the below command.

For RHEL/CentOS:

For Ubuntu:

Once your system is updated with latest packages, run the command below to install the packages required for domain joining.

For Ubuntu:

For RHEL/CentOS:

Step 1: Installing required packages

Type ‘y’ and hit enter to continue installing the packages along with their required dependencies.

Step 2: Domain Joining

After the packages are installed, run below the ‘realm’ commands to list and join your Linux system with the domain you want to integrate your system with.

You need to give your own username with sufficient domain admin rights and domain information.

To confirm that your system is joined with the domain, run again the same above command and check the status of ‘sssd’ status, which should be running.

Step 3: Domain User Login

As we have our system joined with domain, now lets login using your active directory user account.

Upon successful credentials, your new user’s home directory will be created.

You can check the identity rights of your user using below ‘id’ command.

If you want to give your AD users sudo rights on the Linux system, then make sure to allow that in sudoers.

The best convenient way is to create a new group on your AD, make it a member of domain users and add that into sudoers file.

Save and close the file, now every AD user which will be the member of ‘sudo_group’ will be able to gain sudo rights on the system.

Step 4: Domain Configurations Update

Active directory domain user’s behavior can be modified by making changes in its configuration parameters using the ‘sssd.conf’ file.

Open its configuration file using any of your editor to view and update as required.

After making your desired changes in the configuration file, make sure to reload the daemon and the ‘sssd’ service that can be done using below commands.

Step 4: Domain Configurations Update

Conclusion:

In this article we have discussed the steps to join a Linux system with Windows Active Directory. After performing these steps you will be able to login using your AD users, give them sudo rights and even update their domain login parameters as well.

Hey! Found Karim’s insights useful? Looking for a cost-effective, high-performance, and easy-to-use hyperconverged platform?
Taras Shved
Taras Shved StarWind HCI Appliance Product Manager
Look no further! StarWind HCI Appliance (HCA) is a plug-and-play solution that combines compute, storage, networking, and virtualization software into a single easy-to-use hyperconverged platform. It's designed to significantly trim your IT costs and save valuable time. Interested in learning more? Book your StarWind HCA demo now to see it in action!