Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Bài: Thực Hành Centos 7 Join Domain
- Mục tiêu
- + Thiết lập CENTOS 7 tham gia vào domain
- + Thiết lập VISUDO đăng nhập vào máy CENTOS 7 bằng tài khoản trong domain
- 1. Chuẩn bị sơ đồ mạng
- - Sơ đồ bài thực hành
- + Centos 7 - 192.168.1.160
- + Active Directory Domain Controller - 192.168.1.100
- [root@localhost ~]# cat /etc/hostname
- samba.vmware.lab
- [root@localhost ~]# cat /etc/sysconfig/selinux
- SELINUX=disabled
- [root@localhost ~]# cat /etc/resolv.conf
- nameserver 192.168.1.100
- [root@localhost ~]# cat /etc/hosts
- 192.168.1.100 srv-1.vmware.lab srv-1
- 192.168.1.160 samba.vmware.lab samba
- 2. Thực hiện cài đặt chương trình và tham gia domain
- [root@localhost ~]# yum install sssd realmd oddjob oddjob-mkhomedir adcli samba-common samba-common-tools krb5-workstation openldap-clients policycoreutils-python -y
- [root@samba ~]# yum install ntp
- [root@samba ~]# ntpdate -d 192.168.1.100
- [root@samba ~]# ntpdate -u 192.168.1.100
- 9 Jun 09:12:25 ntpdate[1437]: step time server 192.168.1.100 offset -25759.667899 sec
- [root@localhost ~]# realm join --user=administrator vmware.lab
- Các file này được tạo và cấu hình tự động trong khi thực hiện join domain
- + /etc/sssd/sssd.conf
- + /etc/krb.conf
- + /etc/krb5.keytab
- [root@localhost ~]# realm list
- - Kiểm tra thông số user trong domain vmware.lab
- [root@centos7 ~]# id administrator
- [root@centos7 ~]# id administrator@vmware.lab
- [root@centos7 ~]# vi /etc/sssd/sssd.conf
- [sssd]
- domains = vmware.lab
- config_file_version = 2
- services = nss, pam
- [domain/vmware.lab]
- ad_domain = vmware.lab
- krb5_realm = VMWARE.LAB
- realmd_tags = manages-system joined-with-samba
- cache_credentials = True
- id_provider = ad
- krb5_store_password_if_offline = True
- default_shell = /bin/bash
- ldap_id_mapping = True
- use_fully_qualified_names = False
- fallback_homedir = /home/%u
- access_provider = ad
- [root@centos7 ~]# systemctl restart sssd
Add Comment
Please, Sign In to add comment