Manual CentOS Active Directory
Manual CentOS Active Directory
4.8.3
# wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# yum -y update
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth0
UUID=98fb1987-e6a8-41c5-aa94-3587bd884d45
DEVICE=eth0
ONBOOT=yes
IPADDR=192.168.4.199
PREFIX=24
GATEWAY=192.168.4.1
DNS1=192.168.4.199
DN2=8.8.8.8
DOMAIN=accesoc.adir
IPV6_PRIVACY=no
______________________________________________________________
# hostname -d
accesoc.adir
# hostname –f
seract.accesoc.adir
Contiene:
Contiene:
# Generated by NetworkManager
search accesoc.adir
nameserver 192.168.4.199
nameserver 8.8.8.8
_________________________________________________________
2.6.- Hacer inmutable el archivo de config, es decir, este comando hará que no cambie
esta config por nada:
# chattr +i /etc/resolv.conf
firewall-cmd --reload
#nano /etc/selinux/config
Contiene:
# reboot
# curl -O https://download.samba.org/pub/samba/stable/samba-4.8.3.tar.gz
# tar -zxvf samba-4.8.3.tar.gz
# make install
Contiene:
[Unit]
Description=Samba AD Daemon
Wants=network-online.target
After=network.target network-online.target rsyslog.service
[Service]
Type=forking
PIDFile=/run/samba/samba.pid
LimitNOFILE=16384
ExecStart=/usr/sbin/samba --daemon
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target
______________________________________________________________
4.4.- Archivo de permiso de samba:
# nano /etc/tmpfiles.d/samba.conf
Contiene:
______________________________________________________________
--------
/var/lib/samba/bind-dns/named.conf
---- o
/usr/local/samba/bind-dns/named.conf
--------
# nano /etc/named.conf
Contiene:
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// See the BIND Administrator's Reference Manual (ARM) for details about the
// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html
options {
listen-on port 53 { 127.0.0.1;192.168.4.199; };
tkey-gssapi-keytab "/var/lib/samba/bind-dns/dns.keytab"; //ESTA LINEA NO ESTABA
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
recursing-file "/var/named/data/named.recursing";
secroots-file "/var/named/data/named.secroots";
allow-query { localhost;192.168.4.199; };
/*
- If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
- If you are building a RECURSIVE (caching) DNS server, you need to enable
recursion.
- If your recursive DNS server has a public IP address, you MUST enable access
control to limit queries to your legitimate users. Failing to do so will
cause your server to become part of large scale DNS amplification
attacks. Implementing BCP38 within your network would greatly
reduce such attack surface
*/
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
include "/var/lib/samba/bind-dns/named.conf"; //ESTA LINEA NO ESTABA
__________________________________________________________
tkey-gssapi-keytab "/var/lib/samba/bind-dns/dns.keytab";
include "/var/lib/samba/bind-dns/named.conf";
__________________________________________________________
# cp /etc/samba/krb5.conf /etc/
samba_upgradedns --dns-backend=BIND9_DLZ
solo informa
# samba_dnsupdate --verbose
# host -t A hostname.seconddomain.firstdomain
# samba_upgradedns --dns-backend=BIND9_DLZ
# samba_dnsupdate --verbose
6.- En Windows: Unir cliente al dominio e instalar RSAT
****Cliente-PC****
ping seract, ok
-reboot
Administrator
Des4cc3s0171215
****Cliente-Administrator****
RSAT (Regression suite automation tool): herramientas para administrar equipos y servidores de
forma remota
funciona para w10 1808 o "1809"
Como ej: se creará un usuario y se restringirá el acceso al panel de control y config del sistema:
****Cliente****
# nano /etc/samba/smb.conf
Contiene:
path = /publico/
writable = yes
guest ok = yes
guest only = yes
create mode = 0777
directory mode = 0777
____________________________________
*****DEBUGS
https://wiki.samba.org/index.php/
BIND9_DLZ_DNS_Back_End#Reconfiguring_the_BIND9_DLZ_Back_End