Skip to content

Instantly share code, notes, and snippets.

@jurandysoares
Last active July 24, 2025 21:18
Show Gist options
  • Save jurandysoares/2e90ecec8afbd40fc37d25ee49c68f74 to your computer and use it in GitHub Desktop.
Save jurandysoares/2e90ecec8afbd40fc37d25ee49c68f74 to your computer and use it in GitHub Desktop.
Alpine Linux: Instalacao de Samba-AD-DC

Alpine Linux: Instalacao de Samba-AD-DC

Roteiro de comandos baseado em: https://wiki.alpinelinux.org/wiki/Setting_up_a_samba-ad-dc

asciicast

  1. nl /etc/apk/repositories
  2. sed 's/#http/http/' /etc/apk/repositories
  3. nl /etc/apk/repositories
  4. sed -i 's/#http/http/' /etc/apk/repositories
  5. doas sed -i 's/#http/http/' /etc/apk/repositories
  6. nl /etc/apk/repositories
  7. doas apk add asciinema
  8. asciinema rec -i 2.5 -t "DNS: Servidor com ActiveDirectory"
  9. su -
  10. apk add chrony
  11. /etc/init.d/chronyd
  12. /etc/init.d/chronyd status
  13. /etc/init.d/chronyd start
  14. /etc/init.d/chronyd status
  15. rc-update add chronyd
  16. apk add samba-dc krb5
  17. hostname
  18. ping brasilia
  19. ping brasilia.brasil.lab
  20. apk add micro
  21. nl /etc/hosts
  22. micro /etc/hosts
  23. ping brasilia
  24. ping brasilia.brasil.lab
  25. cat > /etc/samba/smb.conf
  26. micro /etc/samba/smb.conf
  27. grep path /etc/samba/smb.conf
  28. mkdir -p /var/lib/samba/sysvol/brasil.lab/scripts
  29. samba-tool domain provision --use-rfc2307 --interactive
  30. apk add py3-cryptography
  31. samba-tool domain provision --use-rfc2307 --interactive
  32. ln -svf /var/lib/samba/private/krb5.conf /etc/krb5.conf
  33. cat > /etc/init.d/samba-ad-dc
  34. rc-update add samba-ad-dc
  35. chmod +x /etc/init.d/samba-ad-dc
  36. rc-update add samba-ad-dc
  37. #rc-service samba-ad-dc start
  38. ss -tnl
  39. apk add iproute2
  40. ss -tnl
  41. ss -unl
  42. rc-service samba-ad-dc start
  43. ss -unl
  44. ss -tnl
  45. exit
  46. poweroff
  47. history
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment