Windows Server is a comprehensive system through which we can manage various objects such as Users, groups and printers, but one of its great benefits is that it will be possible to manage computers from other systems such as Ubuntu.
This is key because in the organization not all computers are always Windows and we cannot leave out users of Ubuntu (or other distributions). Therefore, if you are an administrator and you need to register an Ubuntu computer on your Windows Server 2016 or 2019 server network , TechnoWikis will explain the step by step on how to add an Ubuntu client to Windows Server.
1. How to configure Windows Server
Step 1
In this case we use Windows Server 2019 which has the following configuration:
- Static IP address 192.168.0.19
Step 2
We go to "Active Directory Users and Groups" to list the local users who are Administrator and TechnoWikis:
2. How to configure Ubuntu on Windows Server
Step 1
For this case we use Ubuntu 20.04 and the first thing we will do is check that there is communication between both systems (both must be on the same crazy network), we achieve this by pinging the server:
ping 192.168.0.19
Step 2
As we see, all the packets have been received with which both systems have connectivity, it is also possible to ping the server directly:
Step 3
Once this is verified, we update the Ubuntu team with the following command:
sudo apt update
Step 4
When the updates have been installed, we will run the following command:
sudo apt-get -y install realmd sssd sssd-tools samba-common krb5-user packagekit samba-common-bin samba-libs adcli ntp
This command allows us to install the Samba and NTP packages with which the synchronization between both systems must be completed.
Step 5
During this process we enter the Kerberos authentication where we enter the name of the domain to which we are going to connect:
Step 6
We click OK and after that we enter the name of the Kerberos server in the selected domain:
Step 7
We click OK and then enter the name of the administrative server:
Step 8
Again we click OK and now the configuration process will end:
Step 9
Again we check the connectivity between the Ubuntu client and the Windows Server with the ping command:
ping 192.168.0.19
Step 10
It is time to join the computer to the domain, for this we enter the following in this case:
sudo realm join technowikis.com -U 'Administrator' -v
Press Enter and the domain administrator password will be requested:
The real command is responsible for managing the registration in realms (domains) in Linux, it can be used in kerberos domains, Active Directory domains or IPA domains
Step 11
We can see that the organizational unit is established where the Ubuntu team will be linked and at the end of this process we will see the following:
As we can see, the team has been correctly enrolled in the domain technowikis.com.
Step 12
In Windows Server we will go to Tools - Active Directory Users and Computers and in the "Computers" section we will find the Ubuntu team that we have linked:
Step 13
Next we are going to configure realmd which allows us to detect new domains, for this we will use the desired editor with the following command:
sudo nano /etc/realmd.conf
In this file we enter the following:
[users] default-home = / home /% D /% U default-shell = / bin / bash [active-directory] default-client = sssd os-name = Ubuntu Desktop Linux os-version = 20.04 [service] automatic-install = no [technowikis.com] fully-qualified-names = no automatic-id-mapping = yes user-principal = yes manage-system = no
We save the changes with the Ctrl + O keys and exit the editor with the Ctrl + X keys.
Note
Remember to enter the correct domain name.
Step 14
Now we are going to configure the directory that will be created for each new user, we enter the following with the desired editor:
sudo nano /etc/pam.d/common-session
In this file we enter the following:
session required pam_unix.so session optional pam_winbind.so session optional pam_sss.so session optional pam_systemd.so session required pam_mkhomedir.so skel = / etc / skel / umask = 0077
We save the changes and exit the editor.
Step 15
We restart the Ubuntu client and at login we login with a new user with the following syntax:
Domain \ user
Step 16
We enter the password:
Step 17
When accessing Ubuntu we can see that the directory linked to the domain has been created:
With these steps we can add Ubuntu clients to the domain to take detailed control of these in the management tasks.