Skip to content

Instantly share code, notes, and snippets.

@tomaszwostal
Last active March 22, 2019 20:15
Show Gist options
  • Save tomaszwostal/fa7278011007ed3a3a65e2e54aeea3bd to your computer and use it in GitHub Desktop.
Save tomaszwostal/fa7278011007ed3a3a65e2e54aeea3bd to your computer and use it in GitHub Desktop.

Run samba active directory on RaspbberyPi

Edit /etc/dhcpcd.conf

interface eth0 
static routers=192.168.88.1
static domain_name_servers=127.0.0.1
static domain_name_servers=192.168.88.1 
static ip_address=192.168.88.10
static domain_search=wostal.eu

Install required packages

sudo apt-get install samba smbclient winbind krb5-user krb5-config krb5-locales winbind libpam-winbind libnss-winbind dnsutils \
sudo systemctl stop samba-ad-dc.service smbd.service nmbd.service winbind.service \
sudo systemctl disable samba-ad-dc.service smbd.service nmbd.service winbind.service \
sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.backup

Provision domain

sudo samba-tool domain provision --use-rfc2307 --interactive

Enable samba services

sudo systemctl unmask samba-ad-dc.service
sudo systemctl start samba-ad-dc.service
sudo systemctl status samba-ad-dc.service
sudo systemctl enable samba-ad-dc.service

Edit /etc/resolv.conf

search wostal.eu
nameserver 192.168.88.100
nameserver 8.8.8.8

sudo chattr +i /etc/resolv.conf

Reboot

sudo reboot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment