I am trying to create a Linux Domain Controller on my virtualbox using Samba although it's working but can't reach servers?
Detail Information:
Software: VirtualBox
Distro for Server: Debian9
Windows Desktop: Windows 10 or Windows 7
Network Type: Internal (For both Server and Desktop)
Packages: Samba, Samba-Client, KRB5
I have done the following pings
$ ping dc1.tjh.com
$ ping 192.168.100.1
$ ping dc1
Those were pinging successfully.
$ ping tjh.com
This ping responded:
ping: tjh.com: Temporary failure in name resolution
Obviously this was because my network is set to internal as the same responded for 'google.com' so I ruled this issue out of the problem.
Here are my commands and checks for the Samba and krb5:
$ smbclient -L localhost -U%
Responded:
Domain=[TJH] OS=[Windows 6.1] Server=[Samba 4.5.12-Debian]
Sharename Type Comment
--------- ---- -------
netlogon Disk
sysvol Disk
IPC$ IPC IPC Service (Samba 4.5.12-Debian)
Domain=[TJH] OS=[Windows 6.1] Server=[Samba 4.5.12-Debian]
Server Comment
--------- -------
DC1 Samba 4.5.12-Debian
Workgroup Master
--------- -------
TJH DC1
I assume there are no problems there. So I ran the following code for Samba:
$ smbclient //localhost/netlogon -UAdministrator
$ Enter Administrator's password:
Responded:
session setup failed: NT_STATUS_NO_LOGON_SERVERS
I also tried testing the Krb5 below:
$ kinit administrator
Responded:
Kinit: Cannot find KDC for realm "TJH.COM" while getting initial credentials
Tested the DNs using the host
command:
$ host -t A dc1.tjh.com
Responded:
;; connection timed out; no servers could be reached
Can anyone help me out please? Any help is appreciated, thanks.
Best Answer
I had the same issue. In the lower output of
service samba-ad-dc status
, does it give any error or warning about the DNS service? To fix this i had to remove the/etc/resolv.conf
symlink and replace it with a static file with this content:restart
systemd-resolved
andsamba-ad-dc
services and check the service status again. If the dns warning is gone, you should be able to ping your AD domain and usekinit
.This tutorial has all you need: https://www.tecmint.com/install-samba4-active-directory-ubuntu/
For Ubuntu 18.04, check out the differences on this one: https://www.server-world.info/en/note?os=Ubuntu_18.04&p=samba&f=4
Also the edits in the
/etc/network/interfaces
file should be placed in the yaml file in/etc/netplan/
.