+3 votes
1.3k views
How to Add Ubuntu to Windows Server 2019 and Server 2016 domain

in WindowsServer by (552k points)
reopened | 1.3k views

1 Answer

+4 votes
Best answer

1. How to configure Windows Server
2. How to configure Ubuntu on Windows Server

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
  • TechnoWikis.com domain

image

Step 2


We go to "Active Directory Users and Groups" to list the local users who are Administrator and TechnoWikis:

image

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 

image

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:

image

Step 3


Once this is verified, we update the Ubuntu team with the following command:

 sudo apt update 

image

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 

image

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:

image

Step 6


We click OK and after that we enter the name of the Kerberos server in the selected domain:

image

Step 7


We click OK and then enter the name of the administrative server:

image

Step 8


Again we click OK and now the configuration process will end:

image

Step 9


Again we check the connectivity between the Ubuntu client and the Windows Server with the ping command:

 ping 192.168.0.19 

image

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:

image

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:

image

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:

image

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 

image

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 

image

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 

image

Step 16


We enter the password:

image

Step 17


When accessing Ubuntu we can see that the directory linked to the domain has been created:

image

With these steps we can add Ubuntu clients to the domain to take detailed control of these in the management tasks.


by (3.5m points)

Related questions

+5 votes
1 answer
+5 votes
1 answer
+4 votes
1 answer
+5 votes
1 answer
+3 votes
1 answer
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users