How to Joining Ubuntu Desktop 20.04 to an Active Directory Domain Controller (Samba 4)
Before We Begin
Active Directory Domain (Samba4):
OS: CentOS 7.5
IP: 192.168.30.132
Domain: TEST.LAP
Client:
OS: Ubuntu Desktop 20.04
** On Ubuntu **
Update system and install fping
$ sudo apt update
$ sudo apt-get install fping
Check your Ubuntu Desktop machine has access to the Active Directory domain controller, run the following command :
$ dig -t SRV _ldap._tcp.test.lab | grep -A2 "ANSWER SECTION"
;; ANSWER SECTION:
_ldap._tcp.test.lab. 900 IN SRV 0 100 389 pdc.test.lab.
Ping Active Directory domain Domain Controllers:
$ ping test.lab
$ ping pdc.test.lab
also
$ fping pdc.test.lab
pdc.test.lab is alive
Install all necessary packages:
$ sudo apt-get -y install realmd sssd sssd-tools samba-common krb5-user packagekit samba-common-bin samba-libs adcli ntp
after ask type local domain :TEST.LAB
then OK
Config your NTP service to point to your domain nameservers, run the following command :
$ sudo vi /etc/ntp.conf
Add a new line:
pdc.test.lab
Restart your ntp service:
$ sudo service ntp restart
Setting up realmd:
$ sudo vi /etc/realmd.conf
. Add
[users]
default-home = /home/%D/%U
default-shell = /bin/bash
[active-directory]
default-client = sssd
os-name = Ubuntu Desktop Linux
os-version = 14.04
[service]
automatic-install = no
[test.lab]
fully-qualified-names = no
automatic-id-mapping = yes
user-principal = yes
manage-system = no
Join the Ubuntu machine on the AD domain:
$ sudo kinit [email protected]
Password for [email protected]:
[You will not see any output while you type the password. That’s normal.]
Add the Ubuntu machine in the domain:
$ sudo realm --verbose join test.lab \
--user-principal=ubuntudesk01/[email protected] --unattended
Config sssd:
$ sudo vi /etc/sssd/sssd.conf
Modify the: access_provider = simple
to
access_provider = ad
Restart the sssd service:
$ sudo service sssd restart
Config homedir auto-creation for new users:
$ sudo vi /etc/pam.d/common-session
Insert :
session required pam_unix.so
session optional pam_winbind.so
session optional pam_sss.so
session optional pam_systemd.so
session required pam_mkhomedir.so skel=/etc/skel/ umask=0077
Check Active Directory users name resolution:
$ id domainuser
ex: $ id acc1
Rebot ubuntu desktop
Login with domain user:
Select : Not listed?
Username : [email protected]
Setting up LightDM for CLI mode ubuntu or linux:[no need for ubuntu GUI]
$ sudo vi /etc/lightdm/lightdm.conf
...
[SeatDefaults]
allow-guest=false
greeter-show-manual-login=true
...
Final Check:
Restart the machine and try to login using the Ubuntu graphical login by domain user and password
******
If you like the video, why not subscribe, so you won't miss future videos!
Subscribe Here:
/ @errorandfix
Useful Links/Commands:
#linux #tutorial #macOS #Windows #Printer #Camera #CCNA #Graphic
⭐ Connecting With Us ⭐
-------------------------------------------
Email for any enquiry: [email protected]
YouTube Channel: / errorandfix
Join our FB Group: / errorandfix
Like our FB Page: / errorandfix
Website: https://errorandfix.com
⭐ Topics ⭐
Remote Desktop Connection: • Remote Desktop Connection