Samba As Domain Controller Configuration
Samba As Domain Controller Configuration
on CentOS 7
Installation of Samba 4
192.168.1.190 Samba4 AD centos 7
Basis is a CentOS 7 with a minimal install and SELinux disabled.
The installation will take about 10 minutes depending on the system speed.
Now we will do the domain provisioning.
[root@samba4 samba]#
--------
#includedir /etc/krb5.conf.d/
--------
Run the domain provisioning again and now the domain will get created
without errors.
[root@samba4 etc]#
[Service]
Type=forking
PIDFile=/usr/local/samba/var/run/samba.pid
ExecStart=/usr/local/samba/sbin/samba
[Install]
WantedBy=multi-user.target
[root@samba4 ~]#
After reboot go to run and type in dsa.msc
Click on Hassan.local domain and right click new -> Users.
Configure sssd.
[sssd]
domains = Hassan.local
config_file_version = 2
services = nss, pam
[domain/Hassan.local]
ad_domain = Hassan.loal
krb5_realm = Hassan.local
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 = True
fallback_homedir = /home/%u@%d
access_provider = ad
[root@centos7 ~]#
Restart sssd.
[libdefaults]
default_realm = Hassan.local
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
[realms]
SUNIL.CC = {
kdc = samba4.hassan.local
admin_server = samba4.hassan.local
}
[domain_realm]
.hassan.local = hassan.local
hassan.local = hassan.local
[root@centos6 db]#
Configure authentication.
[domain/ hassan.local]
id_provider = ad
# Uncomment if service discovery is not working
# ad_server = server.win.example.com
default_shell = /bin/bash
fallback_homedir = /home/%u
[root@centos6 db]#
Validating user.