|
|
||
|---|---|---|
| .gitignore | ||
| Dockerfile | ||
| init-dc.sh | ||
| README.md | ||
| samba-provision.sh | ||
| vars.sh | ||
Docker container for using a Samba Active Directory server in your network.
As a Samba domain controller needs it's own fixed IP in the network, this container needs to run privileged as root using a macvlan network.
The container needs 3 environment variables to run.
| Environment variable | Description | Example |
|---|---|---|
| DOMAIN_FQDN | The internal domain name used on the network. This can be a .internal domain. | companyname.internal |
| DOMAIN_NETBIOS | The Netbios domain name for the AD domain. Username login will become <DOMAIN_NETBIOS>\Administrator for example | PALANTHIR |
| DNSFORWARDER | The DNS server the Samba DNS server uses as DNS forwarder | 1.1.1.1 |
Installation
Create the volumes needed, for example:
sudo podman volume create ad_dc1_conf
sudo podman volume create ad_dc1_sambalib
build the image
sudo podman build -t samba-ad-docker --network host https://git.palanthir.nl/palanthir/samba-ad-docker.git
sudo podman build -t samba-ad-docker .
start the container
sudo podman run --name ad_dc1
-e DOMAIN_FQDN=
-e DOMAIN_NETBIOS=
-e DNSFORWARDER=
-e TLS_KEY_FILE=
-e TLS_CERT_FILE=
-e TLS_CA_FILE=
--network=LANnetwork --ip= --ip6=
--replace --privileged -d --hostname=
-v ad_dc1_conf:/etc/samba/config
-v ad_dc1_sambalib:/var/lib/samba
localhost/samba-ad-docker
Set the Administrator password
podman exec -it <container name> samba-tool user setpassword Administrator
Handy command to view all DNS hosts in the AD domain:
samba-tool dns query localhost <domain name> @ ALL -U Administrator