Giter Club home page Giter Club logo

ansible-role-sambadc's Introduction

sambadc role

This role only does two jobs:

  • Configure a pre-installed samba server to be a new Domain Controler (DC)
  • Or configure a pre-installed samba server to join to existent DC group

This role does not do the following, but depends them to work:

  • Install samba
  • Configure resolv.conf

Said that, this role contains a lot of codes and ideas copied from another roles and were grouped here to achieve a different approach to setup samba dc:

Example Playbook

You should install samba before run this role:

- hosts: servers
  roles:
     - uspdev.install_samba
     - uspdev.sambadc

Tips

Show domain level password options.

samba-tool domain passwordsettings show

Procedimento de restauração de backup em caso de pane.

Baseado em https://wiki.samba.org/index.php/Using_the_samba_backup_script

Criar nova máquina com:

  • mesmo hostname
  • mesmo ip

Instalar samba e o configure como DC. Use a esta role, sambadc, para esta função. Parar o serviço do samba:

/usr/sbin/service samba-ad-dc stop

Configurar id:

net setdomainsid S-1-5-21-1948074455-2901749274-3793093824

Remove as pastas:

rm -rf /etc/samba/ /var/lib/samba/

Descompactar backups:

tar -jxf etc_samba.tar.bz2 -C /etc
tar -jxf var_lib_samba.tar.bz2 -C /var/lib/
tar -jxf var_lib_samba_private.tar.bz2 -C /var/lib/samba/
tar -jxf var_lib_samba_sysvol.tar.bz2 -C /var/lib/samba/

Criar os arquivos para idepotência da role sambadc:

touch /var/.samba_ad_created
touch /var/.samba_ad_joined

[VERIFICAR] Não entendi se precisamos rodar ou não:

samba-tool ntacl sysvolreset

Subir o serviço:

/usr/sbin/service samba-ad-dc start

ansible-role-sambadc's People

Contributors

thiagogomesverissimo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.