Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to join the CentOS 7 desktop system into the Samba4 AD domain environment

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to join the CentOS 7 desktop system into the Samba4 AD domain environment, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

Request

1. Use Samba4 to create active directory architecture in Ubuntu system

2. CentOS 7.3installation Guide

* * step: configure Samba4 AD DC in CentOS system

1. Before joining CentOS 7 to the Samba4 domain environment, you have to configure the network environment of the CentOS system to ensure that the domain name can be resolved through DNS in the CentOS system.

Turn on the network settings and close the wired network card. Open the settings button below and manually edit the network settings to specify that the IP address of DNS is the IP address of the Samba4 AD DC server.

After the setup is complete, apply the configuration and open the wired network card.

Network Settin

Configure the network

2. Next, open the network configuration file and add a line of domain name information at the end of the file. This ensures that the DNS parser automatically adds the domain name when you only use the hostname to query the DNS records in the domain.

$sudo vi / etc/sysconfig/network-scripts/ifcfg-eno16777736

Add the following line:

SEARCH= "your_domain_name"

Network card configuration

3. *, restart the Nic service to apply the changes, and verify that the parser configuration file is configured correctly. We verify that DNS resolution is working properly by using the ping command plus the hostname or domain name of the DC server.

$sudo systemctl restart network $cat / etc/resolv.conf $ping-C1 adc1 $ping-C1 adc2 $ping tecmint.lan

Verify that the network configuration is normal

4. At the same time, use the following command to configure your hostname, and then restart your computer to apply the changes:

$sudo hostnamectl set-hostname your_hostname $sudo init 6

Use the following command to verify that the hostname is configured correctly:

$cat / etc/hostname $hostname

5. * * one-step configuration is to use the following command to ensure that the system time is synchronized with the time of the Samba4 AD DC server:

$sudo yum install ntpdate $sudo ntpdate-ud domain.tld

Step 2: install the necessary software packages to join Samba4 AD DC

6. In order to join CentOS 7 to the active Directory domain, you need to install the relevant software package using the following command:

$sudo yum install samba samba samba-winbind krb5-workstation

7, * *, install the graphical interface package provided in the CentOS software library: Authconfig-gtk. The software is used to integrate CentOS system into domain environment.

$sudo yum install authconfig-gtk

Step 3: integrate the CentOS 7 desktop into the Samba4 AD DC domain environment

8. The process of joining CentOS to a domain is very simple. Open the Authconfig-gtk program under the command line using an account with root permission, and then modify the relevant configuration as shown in the following figure:

$sudo authconfig-gtk

Open the identity or authentication configuration page:

User account database: select Winbind

Winbind domain: your domain name

Safe mode: ADS

Winbind ADS domain: your domain name .TLD

Domain controller: full domain name of the domain control server

Default Shell: / bin/bash

Check allow offline login

Domain authentication configuration

Open the advanced options configuration page:

Local authentication option: supports fingerprint recognition

Other authentication options: user * log in to create home directory

Advanced authentication configuration

9. After modifying the above configuration, return to the identity or authentication configuration page, click the join Domain button, and save it at the pop-up prompt.

Identity and authentication

Save authentication configuration

10. After saving the configuration, you will be prompted to provide domain administrator information to join the CentOS system to the domain. Enter the domain administrator account number and password and click the OK button to join the domain.

Join the Winbind domain environment

11. After joining the domain, click the apply button to make the configuration take effect, select all windows and restart the machine.

Apply authentication configuration

12. To verify that CentOS has been successfully joined to Samba4 AD DC, you can open AD user and computer tools on the windows machine where RSAT tools are installed, and click the computer in the domain.

You will see the CentOS host information on the right.

Active Directory users and computers

Step 4: log in to the CentOS desktop system using your Samba4 AD DC account

13. Select another account, and then enter the domain account number and password to log in, as shown in the following figure:

Domain\ domain_account or Domain_user@domain.tld

Use other accounts

Enter domain user name

14. On the command line of the CentOS system, you can also use any of the following ways to switch to the domain account to log in:

$su-domain\ domain_user $su-domain_user@domain.tld

Log in using the domain account

Log in using the domain account mailbox

15. To add root permissions for domain users or groups, open the sudoers configuration file using the root permission account under the command line and add the following line:

YOUR_DOMAIN\\ domain_username ALL= (ALL:ALL) ALL # For domain users% YOUR_DOMAIN\\ your_domain\ group ALL= (ALL:ALL) ALL # For domain groups

Specify user and user group permissions

16. Use the following command to view domain controller information:

$sudo net ads info

View domain controller information

17. You can use the following command on the machine where the Winbind client is installed to verify whether the trust relationship between CentOS and Samba4 AD DC is normal:

$sudo yum install samba-winbind-clients

Then, execute some of the following commands to view information about Samba4 AD DC:

$wbinfo-p # Ping domain name $wbinfo-t # check the trust relationship $wbinfo-u # list the domain user account $wbinfo-g # list the domain user group $wbinfo-n domain_account # View the SID information of the domain account

View Samba4 AD DC information

18. If you want the CentOS system to exit the domain environment, use an account with administrator permissions to execute the following command, followed by the domain name and domain administrator account, as shown below:

$sudo net ads leave your_domain-U domain_admin_username

Exit the Samba4 AD domain

The above is how to join the CentOS 7 desktop system into the Samba4 AD domain environment. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report