nhanle

Bài: Thực Hành Centos 7 Join Domain

Jun 8th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. Bài: Thực Hành Centos 7 Join Domain
  2.  
  3. Mục tiêu
  4. + Thiết lập CENTOS 7 tham gia vào domain
  5. + Thiết lập VISUDO đăng nhập vào máy CENTOS 7 bằng tài khoản trong domain
  6.  
  7. 1. Chuẩn bị sơ đồ mạng
  8.  
  9. - Sơ đồ bài thực hành
  10. + Centos 7 - 192.168.1.160
  11. + Active Directory Domain Controller - 192.168.1.100
  12.  
  13. [root@localhost ~]# cat /etc/hostname
  14. samba.vmware.lab
  15.  
  16. [root@localhost ~]# cat /etc/sysconfig/selinux
  17. SELINUX=disabled
  18.  
  19. [root@localhost ~]# cat /etc/resolv.conf
  20. nameserver 192.168.1.100
  21.  
  22. [root@localhost ~]# cat /etc/hosts
  23. 192.168.1.100 srv-1.vmware.lab srv-1
  24. 192.168.1.160 samba.vmware.lab samba
  25.  
  26.  
  27. 2. Thực hiện cài đặt chương trình và tham gia domain
  28.  
  29. [root@localhost ~]# yum install sssd realmd oddjob oddjob-mkhomedir adcli samba-common samba-common-tools krb5-workstation openldap-clients policycoreutils-python -y
  30.  
  31. [root@samba ~]# yum install ntp
  32. [root@samba ~]# ntpdate -d 192.168.1.100
  33. [root@samba ~]# ntpdate -u 192.168.1.100
  34. 9 Jun 09:12:25 ntpdate[1437]: step time server 192.168.1.100 offset -25759.667899 sec
  35.  
  36. [root@localhost ~]# realm join --user=administrator vmware.lab
  37.  
  38. Các file này được tạo và cấu hình tự động trong khi thực hiện join domain
  39. + /etc/sssd/sssd.conf
  40. + /etc/krb.conf
  41. + /etc/krb5.keytab
  42.  
  43. [root@localhost ~]# realm list
  44.  
  45.  
  46. - Kiểm tra thông số user trong domain vmware.lab
  47.  
  48. [root@centos7 ~]# id administrator
  49.  
  50. [root@centos7 ~]# id administrator@vmware.lab
  51.  
  52. [root@centos7 ~]# vi /etc/sssd/sssd.conf
  53.  
  54. [sssd]
  55. domains = vmware.lab
  56. config_file_version = 2
  57. services = nss, pam
  58.  
  59. [domain/vmware.lab]
  60. ad_domain = vmware.lab
  61. krb5_realm = VMWARE.LAB
  62. realmd_tags = manages-system joined-with-samba
  63. cache_credentials = True
  64. id_provider = ad
  65. krb5_store_password_if_offline = True
  66. default_shell = /bin/bash
  67. ldap_id_mapping = True
  68. use_fully_qualified_names = False
  69. fallback_homedir = /home/%u
  70. access_provider = ad
  71.  
  72. [root@centos7 ~]# systemctl restart sssd
Add Comment
Please, Sign In to add comment