Samba4 4.7.0 Setup OpenSUSE 42.3

Setup do Servidor

  • Servidor com Samba4 4.7.0, OpenSUSE 42.3 64Bits
  • IP: 192.168.56.100
  • Nome: dc1.linuxpro.net
  • Configurar o arquivo: /etc/hosts e adicionar,192.168.56.100 DC1.linuxpro.net DC1, no final do arquivo
  • Configurar o arquivo: /etc/HOSTNAME e colocar assim: DC1.linuxpro.net no arquivo

Setup dos Clientes

  • Qualquer Desktop Windows 7/10 ou Ubuntu 16.04
  • REDE: 192.168.56.X
  • Nome: desktopX.linuxpro.net
  • Configurar o arquivo: /etc/resolv.conf e adicionar, nameserver 192.168.56.100 no arquivo
  • Configurar o arquivo: /etc/resolv.conf e adicionar,search linuxpro.net no arquivo
  • Caso seja Linux Ubuntu executar esse script para integração com AD.

Ambiente no Server

Criando o Ambiente no Servidor
1
2
3
4
5
6
zypper ar http://download.opensuse.org/repositories/home:/jniltinho/openSUSE_Leap_42.3/home:jniltinho.repo
zypper --gpg-auto-import-keys refresh
zypper in samba4-4.7.0
##ln -s /opt/samba4/bin/samba-tool /usr/local/bin/
echo 'export PATH=$PATH:/opt/samba4/bin:/opt/samba4/sbin' >> /etc/profile
source /etc/profile
Alterar os arquivos:
1
2
3
4
5
6
7
## /etc/hosts e /etc/HOSTNAME
## /etc/hosts
## Exemplo: Adicionado -> 192.168.56.100 DC1.linuxpro.net DC1
## /etc/HOSTNAME
## Exemplo: DC1.linuxpro.net
samba-tool domain provision --server-role=dc --use-rfc2307 \
--dns-backend=SAMBA_INTERNAL --realm=LINUXPRO.NET --domain=LINUXPRO --adminpass=Linuxpro123456
1
2
3
4
#samba-tool domain provision --server-role=dc --use-rfc2307 --function-level=2008_R2 \
#--use-xattrs=yes --dns-backend=SAMBA_INTERNAL --realm=LINUXPRO.NET --domain=LINUXPRO --adminpass=Linuxpro123456
systemctl start samba4.service
systemctl enable samba4.service

Add Users into Samba4

1
2
## Create user in Samba4 CLI
samba-tool user create Linuxpro

How to Reset Administrator Password

In case you forgot the administrator password then no need to panic as you can reset the password by logging physically into the domain server box

1
2
3
4
samba-tool user setpassword Administrator
## New Password:
## Enter it again:
## Password changed.

Ubuntu no AD

Caso você precise integrar o Ubuntu no Active Directory fiz esse howto de instalação e configuração.

Chegamos ao fim do artigo, achou o que estava procurando?
Faltou alguma informação?
Alguma parte ficou mal redigida?
Posso melhorar o artigo de alguma forma? Deixe seu feedback, é muito importante!

Compartilhe este post!