Apache 无法以 stdout.log 中的 - "bad user name"开头。我在 httpd.conf 中指定了 LDAP 用户。

标签 apache ubuntu

我使用的是 Ubuntu 14.04.01 和 Apache - 2.2.31。 在 httpd.conf 我有

User build
Group build

正在尝试启动 apache -

apache/logs$ cat stdout.log
httpd: bad user name build

在此之前我尝试运行:

. bin/envvars

当我创建本地用户“test”时

useradd -m test -G sudo -s /bin/bash

并在 httpd.conf 中指定它,然后我就可以启动 apache 了。 但是,我需要使用 LDAP 用户“构建”。

最佳答案

最后,我解决了这个问题:

sudo ltrace -f sh apachectl configtest 2>out.log

调查 out.log 文件中的输出并发现调用 - 'getpwnam("build")',它返回“0”。来自 documentation我知道“找不到给定的名称或 uid。”,但是当我调用“id build”时,我能够看到该用户存在以及该用户所属的网络组列表。然后我连接到另一个虚拟机,在那里我能够使用 LDAP 用户启动 apache 并运行

ldd bin/httpd

并比较输出。其中一个虚拟机缺少“libldap-2.3.so.0”

关于Apache 无法以 stdout.log 中的 - "bad user name"开头。我在 httpd.conf 中指定了 LDAP 用户。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42024859/

相关文章:

php - PHP 中的 HTTP_HOST 和 SERVER_NAME 有什么区别?

由于 VPN,Apache Drill-embedded 无法连接

ruby-on-rails - 不知道如何构建任务 'rails'

excel - Ubuntu:将办公文档转换为 PDF 的命令行应用程序

使用 github 和 vps 进行开发和生产的 Git 流程

python - 从不均匀间隔的文本文件中提取表数据

ruby-on-rails - Rails 3.1.1 HTTP 流与 Apache +Passenger

apache重写: force https and name of server,不是IP

python - Airflow 随机向任务发送sigterms

linux - 未提供显式端口选项时出现 Perforce 客户端 (p4) 错误