Erro ao tentar iniciar os serviços do Samba 4 [RESOLVIDO]

1. Erro ao tentar iniciar os serviços do Samba 4 [RESOLVIDO]

Wendel Lemos Moura
wendel1

(usa Debian)

Enviado em 09/12/2019 - 10:35h

Olá pessoal, estou utilizando o Ubuntu 18.04 e o Samba 4.7.6, tudo foi instalado sem problemas, porém quando tento iniciar os serviços smnd e nmbd eles não funcionam.
Os serviços iniciam com o arquivo smb.conf original, mas depois do provisionamento criar um novo arquivo, o erro acontece.

root@srvdominio:/home/suporte# systemctl start smbd
Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xe" for details.

root@srvdominio:/home/suporte# systemctl start nmbd
Job for nmbd.service failed because the control process exited with error code.
See "systemctl status nmbd.service" and "journalctl -xe" for details.

Quando verifico o status

root@srvdominio:/home/suporte# systemctl status nmbd.service
? nmbd.service - Samba NMB Daemon
Loaded: loaded (/lib/systemd/system/nmbd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-12-09 11:45:37 UTC; 1min 43s ago
Docs: man:nmbd(8)
man:samba(7)
man:smb.conf(5)
Process: 5825 ExecStart=/usr/sbin/nmbd --foreground --no-process-group $NMBDOPTIONS (code=exited, status=1/FAILURE)
Main PID: 5825 (code=exited, status=1/FAILURE)

Dec 09 11:45:37 srvdominio systemd[1]: Starting Samba NMB Daemon...
Dec 09 11:45:37 srvdominio nmbd[5825]: [2019/12/09 11:45:37.387548, 0] ../source3/nmbd/nmbd.c:923(main)
Dec 09 11:45:37 srvdominio nmbd[5825]: server role = 'active directory domain controller' not compatible with running nmbd standalone.
Dec 09 11:45:37 srvdominio nmbd[5825]: You should start 'samba' instead, and it will control starting the internal nbt server
Dec 09 11:45:37 srvdominio systemd[1]: nmbd.service: Main process exited, code=exited, status=1/FAILURE
Dec 09 11:45:37 srvdominio systemd[1]: nmbd.service: Failed with result 'exit-code'.
Dec 09 11:45:37 srvdominio systemd[1]: Failed to start Samba NMB Daemon.


root@srvdominio:/home/suporte# systemctl status smbd.service
? smbd.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-12-09 11:45:29 UTC; 4min 37s ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Process: 5797 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=1/FAILURE)
Main PID: 5797 (code=exited, status=1/FAILURE)

Dec 09 11:45:29 srvdominio systemd[1]: Starting Samba SMB Daemon...
Dec 09 11:45:29 srvdominio smbd[5797]: [2019/12/09 11:45:29.124531, 0] ../source3/smbd/server.c:1815(main)
Dec 09 11:45:29 srvdominio smbd[5797]: server role = 'active directory domain controller' not compatible with running smbd standalone.
Dec 09 11:45:29 srvdominio smbd[5797]: You should start 'samba' instead, and it will control starting smbd if required
Dec 09 11:45:29 srvdominio systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Dec 09 11:45:29 srvdominio systemd[1]: smbd.service: Failed with result 'exit-code'.
Dec 09 11:45:29 srvdominio systemd[1]: Failed to start Samba SMB Daemon.


Alguém poderia me ajudar a resolver esse problema?

Arquivo smb.conf

# Global parameters
[global]
dns forwarder = 8.8.8.8
netbios name = SRVDOMINIO
realm = DOMINIO.LOCAL
server role = active directory domain controller
workgroup = DOMINIO
idmap_ldb:use rfc2307 = yes

[netlogon]
path = /var/lib/samba/sysvol/dominio.local/scripts
read only = No

[sysvol]
path = /var/lib/samba/sysvol
read only = No

[Arquivos]
comment = Arquivos
path = /mnt/dados/Arquivos
create mask = 0775
create mode = 0775
force create mode = 0775
directory mask = 0775
force directory mode = 0775
public = false
writable = yes
read only = no
browseable = yes
vfs object = recycle:recycle full_audit:audit
recycle:repository = .trash/%U
recycle:maxsize = 0
recycle:versions = Yes
recycle:keeptree = Yes
recycle:touch = No
recycle:directory_mode = 0775




  


2. Re: Erro ao tentar iniciar os serviços do Samba 4 [RESOLVIDO]

Wendel Lemos Moura
wendel1

(usa Debian)

Enviado em 11/12/2019 - 09:24h

Consegui resolver o problema da seguinte forma:

Copiei o arquivo krb5.conf localizado em /var/lib/samba/private/krb5.conf para /etc
cp /var/lib/samba/private/krb5.conf /etc

Parei os serviços ativos (se é que tinha algum rodando)
systemctl stop smdb nmbd winbind

Desabilitei pra não iniciar no boot
systemctl disable smdb nmbd winbind

Removi o script de inicialização do samba
systemctl unmask samba-ad-dc

iniciei o samba manualmente
systemctl start samba-ad-dc

Habilitei a inicialização no boot
systemctl enable samba-ad-dc

Reiniciei pra ver se funcionou e deu certo!






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner
Linux banner
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts