0

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.

2 Answers 2

0

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:

domain example.com
nameserver 127.0.0.1

restart systemd-resolved and samba-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 use kinit.

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/.

0

It's not really clear from your question what you've done... Have you installed Samba on your Linux server and provisioned it as a domain controller?

When working with Samba, you should always use the "official" documentation, e.g.:

https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller

And you need to make sure dns resolution is working properly, otherwise you won't be able to join PCs to your domain.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .