0

What am I doing wrong!!! Argh!!!

I’m trying to get an Ubuntu 14.04 server running Samba as domain controller.

Setup is a VM (10.0.0.1, samba.test.local) running a fresh & basic installation of Ubuntu 14.04.

After the installation is complete I did

apt-get update
apt-get upgrade
apt-get dist-upgrade
reboot

Then the following packages have been installed via apt-get set up

openssh-server

openssh-client

ntp

bind9

dnsutils

acl

attr

samba

winbind

smbclient

NTP setup and time in sync. BIND9 setup to provide dns resolution for test.local domain as it’s a test network.

Changed the FSTAB file to the following

LABEL=cloudimg-rootfs   /        ext4   user_xattr,acl,barrier=1,errors=remount-ro,relatime     0 0

Now here’s where it goes pear shaped.

First of all I stop samba, smbd, nmbd and samba-ad-dc

Then I do the following

rm -rf /etc/samba
rm -rf /var/lib/samba/private/*
rm -rf /var/lib/samba/sysvol/*

samba-tool domain provision --domain=TEST --adminpass="Password1" --dns-backend= SAMBA_INTERNAL --server-role=dc --function-level=2008_R2 --use-xattr=yes --use-rfc2307 --realm=ad.test.local --host-name=samba.text.local

Looking up IPv4 addresses
More than one IPv4 address found. Using 10.0.2.15      <<--  Not sure where it gets this address as is not bound anywhere.
Looking up IPv6 addresses
No IPv6 address will be assigned
Setting up share.ldb
Setting up secrets.ldb
Setting up the registry
Setting up the privileges database
Setting up idmap db
Setting up SAM db
Setting up sam.ldb partitions and settings
Setting up sam.ldb rootDSE
Pre-loading the Samba 4 and AD schema
Adding DomainDN: DC=ad,DC=test,DC=local
Adding configuration container
Setting up sam.ldb schema
Setting up sam.ldb configuration data
Setting up display specifiers
Modifying display specifiers
Adding users container
Modifying users container
Adding computers container
Modifying computers container
Setting up sam.ldb data
Setting up well known security principals
Setting up sam.ldb users and groups
Setting up self join
Adding DNS accounts
Creating CN=MicrosoftDNS,CN=System,DC=ad,DC=test,DC=local
Creating DomainDnsZones and ForestDnsZones partitions
Populating DomainDnsZones and ForestDnsZones partitions
Setting up sam.ldb rootDSE marking as synchronized
Fixing provision GUIDs
A Kerberos configuration suitable for Samba 4 has been generated at /var/lib/samba/private/krb5.conf
Setting up fake yp server settings
Once the above files are installed, your Samba4 server will be ready to use
Server Role:           active directory domain controller
Hostname:              samba.test.local
NetBIOS Domain:        TEST
DNS Domain:            ad.test.local
DOMAIN SID:            S-1-5-21-3934883758-3531211222-3658496477

Now when I do a smbclient -L localhost -U% I get the following error. session setup failed: NT_STATUS_OBJECT_NAME_NOT_FOUND

What am I missing?

What else do I need to configure.

I was following the guide at this location (http://blogging.dragon.org.uk/samba4-ad-dc-on-ubuntu-14-04/) but now I’m stuck.

Ian Chilvers
  • 407
  • 2
  • 7
  • 19
  • Realm is `ad.test.local`, hostname should be `samba.ad.test.local`, not `samba.text.local`. Might not be the whole problem. – Jeter-work Aug 09 '18 at 22:23

1 Answers1

1

(This is really more like a comment, but it's too long...)

To set up Samba4, don't follow random guides, stick to the Samba Wiki, specifically: "Set up a Samba Active Directory Domain Controller."

When you're using Samba as an AD DC, your first step in troubleshooting is to make sure DNS is working properly.

Your comment Not sure where it gets this address as is not bound anywhere. is an indication that your DNS configuration isn't correct. Make sure your DC's host name resolves correctly to its IP.

It's not the cause of this particular error, but using .local as a domain name is a bad idea, against everyone's best practices... Use a subdomain of a domain you own.

Finally, you have a typo in your provision command: the realm and host name don't match.

Ward - Reinstate Monica
  • 12,788
  • 28
  • 44
  • 59
  • 1
    There is no reason to not use test.local for a test platform. It's not going to be routed anywhere. I administer an isolated network that uses `orgname.local` for our AD domain. We're leaving AD and will be using certificates issued by parent organization, so as we leave AD we're migrating domain name to `orgname.parentorg.tld`. Bottom line, if the network stands alone and does not use routing or need connection to external DNS, there's nothing stopping you from using any domain suffix you wish. And that linked page suggests using subdomain of owned name rather than the owned name itself. – Jeter-work Aug 09 '18 at 22:25