En este tutorial, le mostraré cómo configurar un controlador de dominio adicional, que es una de las características clave de SAMBA 4. Usaré el servidor Samba 4 existente de mi tutorial anterior como controlador de dominio principal. Esta configuración proporciona un grado de equilibrio de carga y conmutación por error para los servicios de AD (esquemas Ldap y dns) y configurarlo es realmente fácil. También podemos usar esta función para ampliar el entorno.
Usaré un servidor Samba4 AD existente y un nuevo servidor adicional.
Nota:en mi artículo anterior utilicé 192.168.1.190 como controlador de dominio principal debido a un conflicto en ipaddress en mi entorno de laboratorio lo he cambiado a 192.168.1.180.
Servidores
- 192.168.1.180, samba4.sunil.cc - Controlador de dominio primario Centos7 AD1
- 192.168.1.170,dc.sunil.cc:controlador de dominio secundario o controlador de dominio adicional Centos7 AD2
En el tutorial, siempre que indique que AD1 se refiere al servidor AD principal y AD2 se refiere al servidor secundario, consulte este enlace.
Configurar controlador de dominio principal
Consulte este enlace
Samba 4 con Active Directory en instalación basada en CentOS 7 rpm con soporte para compartir
Configurar controlador de dominio secundario
AD2
En el servidor 192.168.1.170,dc.sunil.cc - (Controlador de dominio secundario o Controlador de dominio adicional) haga:
Usaremos Centos 7 como base, SELinux está habilitado.
[[email protected] ~]# yum -y update
Selinux está habilitado.
[[email protected] ~]# sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: enforcing Mode from config file: enforcing Policy MLS status: enabled Policy deny_unknown status: allowed Max kernel policy version: 28 [[email protected] ~]#
Haga una entrada en el archivo de host:
Asegúrese de agregar tanto el AD principal como el AD secundario en /etc/hosts
AD1
[[email protected] ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.1.180 samba4.sunil.cc samba4 192.168.1.170 dc.sunil.cc dc [[email protected] ~]#
AD2
[[email protected] ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.1.180 samba4.sunil.cc samba4 192.168.1.170 dc.sunil.cc dc [[email protected] ~]#
Habilite el repositorio de epel.
[[email protected] ~]# yum install epel-release -y
Instalar paquetes básicos.
[[email protected] ~]# yum install vim wget authconfig krb5-workstation -y
Instale el repositorio de ala para samba4 rpm.
[[email protected] ~]# cd /etc/yum.repos.d/ [[email protected] yum.repos.d]# wget http://wing-net.ddo.jp/wing/7/EL7.wing.repo [[email protected] yum.repos.d]# sed -i '[email protected][email protected][email protected]' /etc/yum.repos.d/EL7.wing.repo [[email protected] yum.repos.d]# yum clean all Loaded plugins: fastestmirror Cleaning repos: base extras updates wing wing-source Cleaning up everything Cleaning up list of fastest mirrors [[email protected] yum.repos.d]#
Ahora instalando paquetes samba4.
[[email protected] yum.repos.d]# yum install -y samba45 samba45-winbind-clients samba45-winbind samba45-client\ samba45-dc samba45-pidl samba45-python samba45-winbind-krb5-locator perl-Parse-Yapp\ perl-Test-Base python2-crypto samba45-common-tools
Modifique resolv.conf, asegúrese de que el servidor de nombres apunte al controlador de dominio principal, aquí usamos 192.168.1.180.
[[email protected] ~]# cat /etc/resolv.conf # Generated by NetworkManager search sunil.cc nameserver 192.168.1.180 [[email protected] ~]#
Ahora eliminamos estos archivos, ya que los crearemos más tarde.
[[email protected] ~]# rm -rf /etc/krb5.conf [[email protected] ~]# rm -rf /etc/samba/smb.conf
Ahora agregue el siguiente contenido en krb5.conf, aquí nuestro nombre de dominio es sunil.cc, el nombre de dominio es SUNIL.CC.
[[email protected] ~]# cat /etc/krb5.conf [libdefaults] dns_lookup_realm = false dns_lookup_kdc = true default_realm = SUNIL.CC [[email protected] ~]#
Compruebe si podemos obtener la clave kerberos del servidor samba4.
[[email protected] ~]# kinit [email protected] Password for [email protected]: Warning: Your password will expire in 42 days on Sat 15 Jul 2017 10:54:19 PM CEST [[email protected] ~]# klist Ticket cache: FILE:/tmp/krb5cc_0 Default principal: [email protected] Valid starting Expires Service principal 06/03/2017 20:33:08 06/04/2017 06:33:08 krbtgt/[email protected] renew until 06/04/2017 20:33:04 [[email protected] ~]#
Si no obtiene la clave, asegúrese de que la hora esté sincronizada y verifique resolv.conf.
Ahora agregue el servidor al dominio existente.
[[email protected] yum.repos.d]# samba-tool domain join sunil.cc DC -U"SUNIL\administrator" --dns-backend=SAMBA_INTERNAL Finding a writeable DC for domain 'sunil.cc' Found DC samba4.sunil.cc Password for [SUNIL\administrator]: workgroup is SUNIL realm is sunil.cc Adding CN=DC,OU=Domain Controllers,DC=sunil,DC=cc Adding CN=DC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=sunil,DC=cc Adding CN=NTDS Settings,CN=DC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=sunil,DC=cc Adding SPNs to CN=DC,OU=Domain Controllers,DC=sunil,DC=cc Setting account password for DC$ Enabling account Calling bare provision Looking up IPv4 addresses Looking up IPv6 addresses No IPv6 address will be assigned Setting up share.ldb Setting up secrets.ldb Setting up the registry Setting up the privileges database Setting up idmap db Setting up SAM db Setting up sam.ldb partitions and settings Setting up sam.ldb rootDSE Pre-loading the Samba 4 and AD schema A Kerberos configuration suitable for Samba 4 has been generated at /var/lib/samba/private/krb5.conf Provision OK for domain DN DC=sunil,DC=cc Starting replication Schema-DN[CN=Schema,CN=Configuration,DC=sunil,DC=cc] objects[402/1550] linked_values[0/0] Schema-DN[CN=Schema,CN=Configuration,DC=sunil,DC=cc] objects[804/1550] linked_values[0/0] Schema-DN[CN=Schema,CN=Configuration,DC=sunil,DC=cc] objects[1206/1550] linked_values[0/0] Schema-DN[CN=Schema,CN=Configuration,DC=sunil,DC=cc] objects[1550/1550] linked_values[0/0] Analyze and apply schema objects Partition[CN=Configuration,DC=sunil,DC=cc] objects[402/1614] linked_values[0/0] Partition[CN=Configuration,DC=sunil,DC=cc] objects[804/1614] linked_values[0/0] Partition[CN=Configuration,DC=sunil,DC=cc] objects[1206/1614] linked_values[0/0] Partition[CN=Configuration,DC=sunil,DC=cc] objects[1608/1614] linked_values[0/0] Partition[CN=Configuration,DC=sunil,DC=cc] objects[1614/1614] linked_values[30/0] Replicating critical objects from the base DN of the domain Partition[DC=sunil,DC=cc] objects[97/97] linked_values[23/0] Partition[DC=sunil,DC=cc] objects[360/263] linked_values[23/0] Done with always replicated NC (base, config, schema) Replicating DC=DomainDnsZones,DC=sunil,DC=cc Partition[DC=DomainDnsZones,DC=sunil,DC=cc] objects[40/40] linked_values[0/0] Replicating DC=ForestDnsZones,DC=sunil,DC=cc Partition[DC=ForestDnsZones,DC=sunil,DC=cc] objects[18/18] linked_values[0/0] Committing SAM database Sending DsReplicaUpdateRefs for all the replicated partitions Setting isSynchronized and dsServiceName Setting up secrets database Joined domain SUNIL (SID S-1-5-21-2550466525-3862778800-1252273829) as a DC [[email protected] yum.repos.d]#
Agregue las reglas de firewall.
[[email protected] ~]# firewall-cmd --add-port=53/tcp --permanent;firewall-cmd --add-port=53/udp --permanent;firewall-cmd --add-port=88/tcp --permanent;firewall-cmd --add-port=88/udp --permanent; \ firewall-cmd --add-port=135/tcp --permanent;firewall-cmd --add-port=137-138/udp --permanent;firewall-cmd --add-port=139/tcp --permanent; \ firewall-cmd --add-port=389/tcp --permanent;firewall-cmd --add-port=389/udp --permanent;firewall-cmd --add-port=445/tcp --permanent; \ firewall-cmd --add-port=464/tcp --permanent;firewall-cmd --add-port=464/udp --permanent;firewall-cmd --add-port=636/tcp --permanent; \ firewall-cmd --add-port=1024-3500/tcp --permanent;firewall-cmd --add-port=3268-3269/tcp --permanent [[email protected] ~]# firewall-cmd --reload
Ahora agregue el script de inicio ya que el samba4 rpm de wing no lo tiene.
[[email protected] ~]# cat /etc/systemd/system/samba.service [Unit] Description= Samba 4 Active Directory After=syslog.target After=network.target [Service] Type=forking PIDFile=/var/run/samba.pid ExecStart=/usr/sbin/samba [Install] WantedBy=multi-user.target [[email protected] ~]#
Samba 4 actualmente no es compatible con la replicación sysvol, esto es necesario para las asignaciones de GID de grupos, esta es la solución para solucionarlo:
Necesita tomar la copia de seguridad de idmap.ldb y restaurar.
Instale el paquete.
[[email protected] ~]#yum install tdb-tools
Haciendo una copia de seguridad en caliente.
[[email protected] ~]# tdbbackup -s .bak /var/lib/samba/private/idmap.ldb
Copie el archivo de copia de seguridad en DC2.
[[email protected] ~]# ls -l /var/lib/samba/private/idmap.ldb.bak -rw-------. 1 root root 61440 Jun 3 09:52 /var/lib/samba/private/idmap.ldb.bak [[email protected] ~]# scp -r /var/lib/samba/private/idmap.ldb.bak [email protected]:/var/lib/samba/private/idmap.ldb
Ahora iniciando el servicio samba.
[[email protected] ~]# systemctl enable samba Created symlink from /etc/systemd/system/multi-user.target.wants/samba.service to /etc/systemd/system/samba.service. [[email protected] ~]# systemctl start samba
Cambie el archivo resolv.conf para que apunte a 192.168.1.180.
[[email protected] ~]# cat /etc/resolv.conf # Generated by NetworkManager search sunil.cc nameserver 192.168.1.180 [[email protected] ~]#
Creando un enlace.
[[email protected] ~]# ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf [[email protected] ~]# cat /etc/krb5.conf [libdefaults] default_realm = SUNIL.CC dns_lookup_realm = false dns_lookup_kdc = true [[email protected] ~]#
Comprobando el ticket de Kerberos ahora.
[[email protected] ~]# kinit [email protected] Password for [email protected]: Warning: Your password will expire in 42 days on Sat 15 Jul 2017 10:54:19 PM CEST [[email protected] ~]# klist Ticket cache: FILE:/tmp/krb5cc_0 Default principal: [email protected] Valid starting Expires Service principal 06/03/2017 22:03:07 06/04/2017 08:03:07 krbtgt/[email protected] renew until 06/04/2017 22:03:03 [[email protected] ~]#
Ahora nuestro controlador de dominio adicional está listo. Verifiquemos la replicación.
[[email protected] ~]# samba-tool drs showrepl Default-First-Site-Name\DC DSA Options: 0x00000001 DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c DSA invocationId: e3f76609-f5f0-421d-99ad-38e1fba10b08 ==== INBOUND NEIGHBORS ==== CN=Schema,CN=Configuration,DC=sunil,DC=cc Default-First-Site-Name\SAMBA4 via RPC DSA object GUID: cc0b412e-3bdc-4af7-95e8-90145425d40d Last attempt @ Sat Jun 3 22:37:24 2017 CEST was successful 0 consecutive failure(s). Last success @ Sat Jun 3 22:37:24 2017 CEST DC=DomainDnsZones,DC=sunil,DC=cc Default-First-Site-Name\SAMBA4 via RPC DSA object GUID: cc0b412e-3bdc-4af7-95e8-90145425d40d Last attempt @ Sat Jun 3 22:37:24 2017 CEST was successful 0 consecutive failure(s). Last success @ Sat Jun 3 22:37:24 2017 CEST DC=ForestDnsZones,DC=sunil,DC=cc Default-First-Site-Name\SAMBA4 via RPC DSA object GUID: cc0b412e-3bdc-4af7-95e8-90145425d40d Last attempt @ Sat Jun 3 22:37:24 2017 CEST was successful 0 consecutive failure(s). Last success @ Sat Jun 3 22:37:24 2017 CEST DC=sunil,DC=cc Default-First-Site-Name\SAMBA4 via RPC DSA object GUID: cc0b412e-3bdc-4af7-95e8-90145425d40d Last attempt @ Sat Jun 3 22:37:24 2017 CEST was successful 0 consecutive failure(s). Last success @ Sat Jun 3 22:37:24 2017 CEST CN=Configuration,DC=sunil,DC=cc Default-First-Site-Name\SAMBA4 via RPC DSA object GUID: cc0b412e-3bdc-4af7-95e8-90145425d40d Last attempt @ Sat Jun 3 22:37:24 2017 CEST was successful 0 consecutive failure(s). Last success @ Sat Jun 3 22:37:24 2017 CEST ==== OUTBOUND NEIGHBORS ==== CN=Schema,CN=Configuration,DC=sunil,DC=cc Default-First-Site-Name\SAMBA4 via RPC DSA object GUID: cc0b412e-3bdc-4af7-95e8-90145425d40d Last attempt @ NTTIME(0) was successful 0 consecutive failure(s). Last success @ NTTIME(0) DC=DomainDnsZones,DC=sunil,DC=cc Default-First-Site-Name\SAMBA4 via RPC DSA object GUID: cc0b412e-3bdc-4af7-95e8-90145425d40d Last attempt @ NTTIME(0) was successful 0 consecutive failure(s). Last success @ NTTIME(0) DC=ForestDnsZones,DC=sunil,DC=cc Default-First-Site-Name\SAMBA4 via RPC DSA object GUID: cc0b412e-3bdc-4af7-95e8-90145425d40d Last attempt @ NTTIME(0) was successful 0 consecutive failure(s). Last success @ NTTIME(0) DC=sunil,DC=cc Default-First-Site-Name\SAMBA4 via RPC DSA object GUID: cc0b412e-3bdc-4af7-95e8-90145425d40d Last attempt @ NTTIME(0) was successful 0 consecutive failure(s). Last success @ NTTIME(0) CN=Configuration,DC=sunil,DC=cc Default-First-Site-Name\SAMBA4 via RPC DSA object GUID: cc0b412e-3bdc-4af7-95e8-90145425d40d Last attempt @ NTTIME(0) was successful 0 consecutive failure(s). Last success @ NTTIME(0) ==== KCC CONNECTION OBJECTS ==== Connection -- Connection name: 9a2b9a9c-064d-4de1-8c38-20072735de1c Enabled : TRUE Server DNS name : samba4.sunil.cc Server DN name : CN=NTDS Settings,CN=SAMBA4,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=sunil,DC=cc TransportType: RPC options: 0x00000001 Warning: No NC replicated for Connection! [[email protected] ~]#
Ejecutando el mismo comando.
[[email protected] private]# samba-tool drs showrepl Default-First-Site-Name\SAMBA4 DSA Options: 0x00000001 DSA object GUID: cc0b412e-3bdc-4af7-95e8-90145425d40d DSA invocationId: 745838cd-21e5-4bea-aa28-400a21d59a83 ==== INBOUND NEIGHBORS ==== DC=ForestDnsZones,DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ Sat Jun 3 09:53:48 2017 CEST failed, result 2 (WERR_BADFILE) 1 consecutive failure(s). Last success @ NTTIME(0) DC=DomainDnsZones,DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ Sat Jun 3 09:53:49 2017 CEST failed, result 2 (WERR_BADFILE) 1 consecutive failure(s). Last success @ NTTIME(0) DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ Sat Jun 3 09:53:49 2017 CEST failed, result 2 (WERR_BADFILE) 1 consecutive failure(s). Last success @ NTTIME(0) CN=Schema,CN=Configuration,DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ Sat Jun 3 09:53:49 2017 CEST failed, result 2 (WERR_BADFILE) 1 consecutive failure(s). Last success @ NTTIME(0) CN=Configuration,DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ Sat Jun 3 09:53:49 2017 CEST failed, result 2 (WERR_BADFILE) 1 consecutive failure(s). Last success @ NTTIME(0) ==== OUTBOUND NEIGHBORS ==== DC=ForestDnsZones,DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ Sat Jun 3 09:57:06 2017 CEST failed, result 2 (WERR_BADFILE) 3 consecutive failure(s). Last success @ NTTIME(0) DC=DomainDnsZones,DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ Sat Jun 3 09:57:06 2017 CEST failed, result 2 (WERR_BADFILE) 3 consecutive failure(s). Last success @ NTTIME(0) DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ Sat Jun 3 09:57:06 2017 CEST failed, result 2 (WERR_BADFILE) 3 consecutive failure(s). Last success @ NTTIME(0) CN=Schema,CN=Configuration,DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ Sat Jun 3 09:57:02 2017 CEST failed, result 2 (WERR_BADFILE) 2 consecutive failure(s). Last success @ NTTIME(0) CN=Configuration,DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ Sat Jun 3 09:57:02 2017 CEST failed, result 2 (WERR_BADFILE) 2 consecutive failure(s). Last success @ NTTIME(0) ==== KCC CONNECTION OBJECTS ==== Connection -- Connection name: 9c5f7fe2-3cb7-4bb4-9f46-d2922a7a7ab4 Enabled : TRUE Server DNS name : dc.sunil.cc Server DN name : CN=NTDS Settings,CN=DC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=sunil,DC=cc TransportType: RPC options: 0x00000001 Warning: No NC replicated for Connection! [[email protected] private]#
Si ve este error, entonces hay un problema con la replicación, tendremos que reiniciar la replicación nuevamente.
[[email protected] private]# samba-tool drs replicate samba4.sunil.cc dc.sunil.cc DC=sunil,DC=cc Replicate from dc.sunil.cc to samba4.sunil.cc was successful. [[email protected] private]#
Ahora la replicación debería funcionar bien.
[[email protected] private]# samba-tool drs showrepl Default-First-Site-Name\SAMBA4 DSA Options: 0x00000001 DSA object GUID: cc0b412e-3bdc-4af7-95e8-90145425d40d DSA invocationId: 745838cd-21e5-4bea-aa28-400a21d59a83 ==== INBOUND NEIGHBORS ==== DC=ForestDnsZones,DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ Sat Jun 3 10:42:04 2017 CEST was successful 0 consecutive failure(s). Last success @ Sat Jun 3 10:42:04 2017 CEST DC=DomainDnsZones,DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ Sat Jun 3 10:42:04 2017 CEST was successful 0 consecutive failure(s). Last success @ Sat Jun 3 10:42:04 2017 CEST DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ Sat Jun 3 10:42:04 2017 CEST was successful 0 consecutive failure(s). Last success @ Sat Jun 3 10:42:04 2017 CEST CN=Schema,CN=Configuration,DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ Sat Jun 3 10:42:04 2017 CEST was successful 0 consecutive failure(s). Last success @ Sat Jun 3 10:42:04 2017 CEST CN=Configuration,DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ Sat Jun 3 10:42:04 2017 CEST was successful 0 consecutive failure(s). Last success @ Sat Jun 3 10:42:04 2017 CEST ==== OUTBOUND NEIGHBORS ==== DC=ForestDnsZones,DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ NTTIME(0) was successful 0 consecutive failure(s). Last success @ NTTIME(0) DC=DomainDnsZones,DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ NTTIME(0) was successful 0 consecutive failure(s). Last success @ NTTIME(0) DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ NTTIME(0) was successful 0 consecutive failure(s). Last success @ NTTIME(0) CN=Schema,CN=Configuration,DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ NTTIME(0) was successful 0 consecutive failure(s). Last success @ NTTIME(0) CN=Configuration,DC=sunil,DC=cc Default-First-Site-Name\DC via RPC DSA object GUID: 0b7607ae-0edc-4667-80f0-4c50bbdf742c Last attempt @ NTTIME(0) was successful 0 consecutive failure(s). Last success @ NTTIME(0) ==== KCC CONNECTION OBJECTS ==== Connection -- Connection name: 9c5f7fe2-3cb7-4bb4-9f46-d2922a7a7ab4 Enabled : TRUE Server DNS name : dc.sunil.cc Server DN name : CN=NTDS Settings,CN=DC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=sunil,DC=cc TransportType: RPC options: 0x00000001 Warning: No NC replicated for Connection! [[email protected] private]#
Ahora probando si los objetos se replican entre DC1 y DC2.
Primero crearemos un usuario de prueba en DC2 y veremos si el usuario se ve en DC1.
[[email protected] ~]# samba-tool user create howtoforge New Password: Retype Password: User 'howtoforge' created successfully [[email protected] ~]# samba-tool user list Administrator howtoforge test_user1 test_user krbtgt Guest [[email protected] ~]#
Ahora verificando lo mismo desde DC1.
[[email protected] ~]# samba-tool user list Administrator howtoforge test_user1 test_user krbtgt Guest [[email protected] ~]#
Ahora vamos a comprobar la replicación de DNS.
Usaré el mismo cliente de Windows 10 que usé en mi tutorial anterior Instalación del controlador de dominio Samba4 desde la fuente.
192.168.1.191 gestión remota Win 10.
Agregará el servidor AD2 como el DNS secundario.
Probando la replicación de DNS.
Compruebe la resolución de nombres.
[[email protected] ~]# nslookup test.sunil.cc 192.168.1.170 Server: 192.168.1.170 Address: 192.168.1.170#53 Name: test.sunil.cc Address: 192.168.1.200 [[email protected] ~]# nslookup test.sunil.cc 192.168.1.180 Server: 192.168.1.180 Address: 192.168.1.180#53 Name: test.sunil.cc Address: 192.168.1.200 [[email protected] ~]#
Así es como funciona el DNS y la replicación en Samba 4.