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 / 问题 / 409559
Accepted
Jorge Suárez de Lis
Jorge Suárez de Lis
Asked: 2012-07-21 01:48:39 +0800 CST2012-07-21 01:48:39 +0800 CST 2012-07-21 01:48:39 +0800 CST

无法在 Debian Lenny 上配置 PAM + LDAP - 服务器日志上出现错误 = 49

  • 772

我一直在使用 Ubuntu 10.04 迁移一些服务器和桌面,将用户从旧的 OpenLDAP 实现迁移到更新的 Centos Active Directory。到目前为止,我没有遇到任何问题,直到我到达了 Debian Lenny 服务器。

我已将服务器设置为其他服务器,设置 /etc/ldap.conf 和 /etc/ldap/ldap.conf。但是,当我发出“getent passwd”时,我从 LDAP 服务器上什么也得不到。

阅读 pam_ldap 联机帮助页,我意识到 /etc/ldap.conf 不是 pam_ldap 接受的文件 - 虽然它适用于 Ubuntu -,所以我将它重命名为 /etc/pam_ldap.conf。同样的结果。但是,一旦我更改了该文件的名称,当我使用 SSH 登录时,我会在 LDAP 服务器日志中看到:

[20/Jul/2012:11:19:40 +0200] conn=16501 fd=155 slot=155 connection from x.x.x.50 to 10.1.176.237
[20/Jul/2012:11:19:40 +0200] conn=16501 op=0 BIND dn="uid=ubuntu,ou=Applications,ou=CITIUS,dc=inv,dc=usc,dc=es" method=128 version=3
[20/Jul/2012:11:19:40 +0200] conn=16501 op=0 RESULT err=0 tag=97 nentries=0 etime=0 dn="uid=ubuntu,ou=applications,ou=citius,dc=inv,dc=usc,dc=es"
[20/Jul/2012:11:19:40 +0200] conn=16501 op=1 SRCH base="ou=People,ou=CITIUS,dc=inv,dc=usc,dc=es" scope=2 filter="(uid=jorge.suarez)" attrs=ALL
[20/Jul/2012:11:19:40 +0200] conn=16501 op=1 RESULT err=0 tag=101 nentries=1 etime=0 notes=U
[20/Jul/2012:11:19:40 +0200] conn=16501 op=2 BIND dn="uid=jorge.suarez,ou=People,ou=CITIUS,dc=inv,dc=usc,dc=es" method=128 version=3
[20/Jul/2012:11:19:40 +0200] conn=16501 op=2 RESULT err=49 tag=97 nentries=0 etime=0

密码无效。我不知道那可能是错的,其他任何事情似乎都可以。该用户/密码来自其他客户端:

[20/Jul/2012:11:29:39 +0200] conn=16528 fd=188 slot=188 connection from x.x.x.224 to 10.1.176.237
[20/Jul/2012:11:29:39 +0200] conn=16528 op=0 BIND dn="uid=ubuntu,ou=Applications,ou=CITIUS,dc=inv,dc=usc,dc=es" method=128 version=3
[20/Jul/2012:11:29:39 +0200] conn=16528 op=0 RESULT err=0 tag=97 nentries=0 etime=0 dn="uid=ubuntu,ou=applications,ou=citius,dc=inv,dc=usc,dc=es"
[20/Jul/2012:11:29:39 +0200] conn=16528 op=1 SRCH base="ou=People,ou=CITIUS,dc=inv,dc=usc,dc=es" scope=2 filter="(uid=jorge.suarez)" attrs=ALL
[20/Jul/2012:11:29:39 +0200] conn=16528 op=1 RESULT err=0 tag=101 nentries=1 etime=0 notes=U
[20/Jul/2012:11:29:39 +0200] conn=16528 op=2 BIND dn="uid=jorge.suarez,ou=People,ou=CITIUS,dc=inv,dc=usc,dc=es" method=128 version=3
[20/Jul/2012:11:29:39 +0200] conn=16528 op=2 RESULT err=0 tag=97 nentries=0 etime=0 dn="uid=jorge.suarez,ou=people,ou=citius,dc=inv,dc=usc,dc=es"

我使用 SSHA 在 LDAP 服务器上存储密码。也许这不受 Debian Lenny 支持?

在 pam_ldap.conf 上,我已经设置了它,就像在所有其他服务器中一样:

# Do not hash the password at all; presume
# the directory server will do it, if
# necessary. This is the default.
pam_password md5

也试过clear,但是没用。无论如何,发出 getent passwd 仍然让我没有用户,这很奇怪。

但是,如果我使用包 libpam-dotfile 中的 pamtest 来测试登录,它就可以工作。

# pamtest ssh jorge.suarez
Trying to authenticate <jorge.suarez> for service <ssh>.
Password: 
Authentication successful.
# pamtest foo jorge.suarez
Trying to authenticate <jorge.suarez> for service <foo>.
Password: 
Authentication successful.

但是“su”也不起作用:

# su jorge.suarez
Id. descoñecido: jorge.suarez

只是 getent passwd 的输出:

# getent passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
Debian-exim:x:101:103::/var/spool/exim4:/bin/false
statd:x:102:65534::/var/lib/nfs:/bin/false
sshd:x:104:65534::/var/run/sshd:/usr/sbin/nologin
luser:x:1000:1000:Usuario local de Burdeos,,,:/home/luser:/bin/bash
messagebus:x:105:107::/var/run/dbus:/bin/false
sge-admin:x:1001:1001:Administrador do SGE,,,:/home/cluster/sge-admin:/bin/bash
ntp:x:107:110::/home/ntp:/bin/false
haldaemon:x:108:111:Hardware abstraction layer,,,:/var/run/hald:/bin/false
vde2-net:x:109:114::/var/run/vde2:/bin/false
uml-net:x:110:115::/home/uml-net:/bin/false
polkituser:x:111:116:PolicyKit,,,:/var/run/PolicyKit:/bin/false
Debian-pxe:x:113:65534:Dummy user for Debian pxe package,,,:/home/Debian-pxe:/bin/false

Nscd 从一开始就停止了。

linux
  • 1 1 个回答
  • 835 Views

1 个回答

  • Voted
  1. Best Answer
    Jorge Suárez de Lis
    2012-09-01T00:32:13+08:002012-09-01T00:32:13+08:00

    我已经迁移到 libpam-ldapd,现在一切正常。

    我只需要在名为“/etc/nslcd.conf”的新文件上重做配置。libpam-ldapd 比 libpam-ldap 好得多。

    最有趣的是它依赖于守护进程,因此您可以使用调试参数 (''nslcd -d'') 调用守护进程,并查看是否有某些地方没有按预期工作,如果配置上有一些注意事项, ETC。

    Ubuntu 10.04 的 libpam-ldapd 0.7.x 缺少一些有趣的选项。最好使用 PPA 获得 0.8.x。Debian Squeeze 已经有了 0.8.x 版本,我在 Lenny 上毫无问题地安装了它。

    • 0

相关问题

  • Linux 主机到主机迁移

  • 如何在 Linux 机器上找到有关硬件的详细信息?

  • 如何在 Linux 下监控每个进程的网络 I/O 使用情况?

  • 在 RHEL4 上修改 CUPS 中的现有打印机设置

  • 为本地网络中的名称解析添加自定义 dns 条目

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