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
    • 最新
    • 标签
主页 / server / 问题 / 1087792
Accepted
Iggy
Iggy
Asked: 2021-12-21 02:36:23 +0800 CST2021-12-21 02:36:23 +0800 CST 2021-12-21 02:36:23 +0800 CST

每个 LDAP 用户使用 LDAP 和 sssd (Centos7) 给出“权限被拒绝”

  • 772

我正在尝试将 LDAP 登录限制为“admin”组。

这是我的 /etc/sssd/sssd.conf 文件:

[domain/default]
autofs_provider = ldap
ldap_tls_reqcert = allow
auth_provider = ldap
ldap_id_use_start_tls = False
chpass_provider = ldap
cache_credentials = True
debug_timestamps = True
ldap_default_authtok_type = password
ldap_search_base = dc=example,dc=com
id_provider = ldap
ldap_default_bind_dn = cn=moderator,ou=moderators,ou=test,o=organization,dc=example,DC=COM
min_id = 100
ldap_uri = ldaps://example.com:636/
ldap_default_authtok = Pa$$word
ldap_tls_cacertdir = /etc/openldap/cacerts/
ldap_tls_cert = /etc/openldap/cacerts/certificate.pem
access_provider = ldap
ldap_access_filter = memberOf=cn=admin,ou=group,o=organization,dc=example,dc=com

[sssd]
services = nss, pam, autofs
domains = default
[nss]
homedir_substring = /home

[pam]

[sudo]

[autofs]

[ssh]

[pac]

[ifp]

[secrets]

[session_recording]

我已经尝试过id username,它提出了:

id user uid=90514(user) gid=20000(users) groups=20000(users),2480(admin)

当尝试通过这样做来更改用户时,输入密码后su user会出错su: Permission denied。从 sssd.conf 中删除组限制条目时,它按预期工作并允许用户登录。

有什么想法我搞砸了吗?

编辑:现在我将使用/etc/security 和 PAM进行设置,这样就可以了。但是我仍然对使用 sssd 进行操作感到好奇。

ldap openldap centos7 sssd
  • 3 3 个回答
  • 1229 Views

3 个回答

  • Voted
  1. Best Answer
    natxo asenjo
    2021-12-22T14:21:22+08:002021-12-22T14:21:22+08:00

    根据https://www.mankier.com/5/sssd-ldap:

    ldap_access_filter (string)
    
    If using access_provider = ldap and ldap_access_order = filter (default), this
    option is mandatory. It specifies an LDAP search filter criteria that must be met
    for the user to be granted access on this host.
    
    If access_provider = ldap, ldap_access_order = filter and this option is not set,
    it will result in all users being denied access. Use access_provider = permit to
    change this default behavior.
    

    显然,添加 access_provider = permit 应该可以解决您的问题。

    • 1
  2. nirnaeth
    2021-12-21T03:27:40+08:002021-12-21T03:27:40+08:00

    您的 LDAP 配置中是否存在覆盖 memberOf ?据我了解,此叠加层需要明确配置才能使用。

    以下命令的输出应包含诸如“memberof.la”之类的内容。如果没有,那么您可能应该首先配置您的 LDAP 服务器。

    slapcat -n 0 | grep olcModuleLoad

    这可能会有所帮助: https ://tylersguides.com/guides/openldap-memberof-overlay/#configuration_tag https://stackoverflow.com/questions/60994495/memberof-and-refint-does-not-work-in-openldap

    • 0
  3. miken32
    2022-08-29T08:48:05+08:002022-08-29T08:48:05+08:00

    使用简单的访问控制提供程序更容易(有些人可能会说简单):

    [domain/default]
    ...
    access_provider = simple
    simple_allow_groups = admin
    ldap_group_search_base = ou=group,o=organization,dc=example,dc=com
    
    • 0

相关问题

  • Cygwin sshd 和 LDAP 身份验证

  • 从 OpenLDAP 检索操作属性

  • 为 Mac 网络使用 Linux 和 Open LDAP

  • 使用LDAP服务器身份验证的Linux中单个用户的多个登录名

  • 使用 smbldap 管理用户/组的 Web 前端

Sidebar

Stats

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

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve