AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 950831
Accepted
Ubuntuser
Ubuntuser
Asked: 2017-08-29 22:24:11 +0800 CST2017-08-29 22:24:11 +0800 CST 2017-08-29 22:24:11 +0800 CST

AD 登录和 smbclient 登录成功,但从 Windows 客户端失败

  • 772

我可以使用 AD/LDAP 身份验证登录 Ubuntu 16.04 系统并访问所有内容。但是,当我将 samba 配置为从 Windows 客户端连接时,它会失败。

来自另一台 Ubuntu 机器的 smbclient 成功并列出所有文件夹

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

任何人都可以为这种情况提供正确的 smb.conf 文件吗?互联网上的任何配置都不起作用。下面是我的 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

我得到的错误是

../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
samba
  • 1 1 个回答
  • 6133 Views

1 个回答

  • Voted
  1. Best Answer
    Ubuntuser
    2017-10-19T21:25:18+08:002017-10-19T21:25:18+08:00

    通过在 samba 文件夹上设置正确的权限来解决。权限应与用户的主文件夹相同

    • 0

相关问题

  • 从哪里共享文件的最佳位置?

  • 如何从 Ubuntu 访问 Windows 共享驱动器/文件夹?

  • 以root身份运行的Ubuntu Server samba?

  • 如何通过 Windows 网络共享文件?

  • 如何设置 Ubuntu Server 10.04 LTS 作为 samba 主域控制器使用 pam 模块对 LDAP 服务器进行身份验证?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve