AD login e login smbclient bem-sucedido, mas falha em clientes Windows

0

Eu consigo acessar o sistema Ubuntu 16.04 usando autenticação AD / LDAP e acessar tudo. No entanto, quando eu configuro o samba para se conectar a partir de clientes Windows, ele falha.

smbclient de outra máquina Ubuntu é bem sucedido e lista todas as pastas

smbclient -k -L serverip -U user%password
  Sharename       Type      Comment
  ---------       ----      -------
   public          Disk
   user            Disk
   IPC$            IPC       IPC Service (Samba Server 4.3.11-Ubuntu)

    Server               Comment
    ---------            -------
    servername         Samba Server 4.3.11-Ubuntu

    Workgroup            Master
    ---------            -------
    workgroup

Alguém pode ajudar com o arquivo smb.conf correto para esse tipo de situação? nenhuma das configurações na internet funciona. abaixo está meu smb.conf

[global]

  workgroup = {{ workgroup}}
  server string = Samba Server %v
  netbios name = server-fqdn
 # Active Directory System
  passdb backend = tdbsam
  security = ads
  idmap config * : range = 1000000-2000000
  os level = 0
  # With .tld
  realm = {{ realm_id }}
  local master = no
  preferred master = no
  domain master = no

  #Auth
  client use spnego = yes
  client ntlmv2 auth = yes
  ntlm auth = yes
  lanman auth = no

  encrypt passwords = yes
  password server = *
  restrict anonymous = 2
  #log
  log file = /var/log/samba/samba.log
  log level = 2
  #mapping
  map to guest = bad user
  guest account = nobody
  unix extensions = yes

 [ubuser]
  path = /opt/samba/ubuser
  valid users = %S, domain\ubuser
  admin users = %S, domain\ubuser
  writable = yes
  read only = no
  force create mode = 0660
  create mask = 0777
  directory mask = 0777
  force directory mode = 0770
  access based share enum = yes
  hide unreadable = yes

Os erros que recebo são

../auth/credentials/credentials_secrets.c:396(cli_credentials_set_machine_account_db_ctx)
  Could not find machine account in secrets database:

[2017/08/29 08:16:16.879389,  0] ../source3/auth/auth_domain.c:121(connect_to_domain_password_server)
  connect_to_domain_password_server: unable to open the domain client session to machine machine.host.com. Error was : NT_STATUS_CANT_ACCESS_DOMAIN_INFO.
[2017/08/29 08:16:16.883324,  1] ../auth/credentials/credentials_secrets.c:396(cli_credentials_set_machine_account_db_ctx)
  Could not find machine account in secrets database: Failed to fetch machine account password for WBI from both secrets.ldb (Could not find entry to match filter: '(&(flatname=domain)(objectclass=primaryDomain))' base: 'cn=Primary Domains': No such object: (null)) and from /var/lib/samba/private/secrets.tdb: NT_STATUS_CANT_ACCESS_DOMAIN_INFO
[2017/08/29 08:16:16.883435,  0] ../source3/auth/auth_domain.c:121(connect_to_domain_password_server)
  connect_to_domain_password_server: unable to open the domain client session to machine machine.host.com. Error was : NT_STATUS_CANT_ACCESS_DOMAIN_INFO.
[2017/08/29 08:16:16.883811,  0] ../source3/auth/auth_domain.c:184(domain_client_validate)
  domain_client_validate: Domain password server not available.
[2017/08/29 08:16:16.884142,  2] ../source3/auth/auth.c:315(auth_check_ntlm_password)
  check_ntlm_password:  Authentication for user [ubuser] -> [ubuser] FAILED with error NT_STATUS_NO_LOGON_SERVERS
[2017/08/29 08:16:16.884211,  2] ../auth/gensec/spnego.c:716(gensec_spnego_server_negTokenTarg)
  SPNEGO login failed: NT_STATUS_NO_LOGON_SERVERS
[2017/08/29 08:16:17.238067,  2] ../source3/librpc/crypto/gse_krb5.c:196(fill_mem_keytab_from_secrets)
  ../source3/librpc/crypto/gse_krb5.c:196: failed to fetch machine password
    
por Ubuntuser 29.08.2017 / 08:24

1 resposta

0

Resolvido configurando as permissões corretas na pasta samba. As permissões devem ser as mesmas da pasta inicial do usuário

    
por Ubuntuser 19.10.2017 / 07:25