简体   繁体   中英

Apache fails to start with - “bad user name” in stdout.log. I specified LDAP user in httpd.conf.

I am using Ubuntu 14.04.01 and Apache - 2.2.31. In httpd.conf I have

User build
Group build

Trying to start apache -

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

Before that I tried to run:

. bin/envvars

When I created local user "test"

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

and specified it in httpd.conf, then I was able to start apache. But, I need to use LDAP user "build".

Finally, I solved this issue:

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

Investigated output in out.log file and found a call - 'getpwnam("build")' , which returned '0'. From documentation I understood that "The given name or uid was not found.", but when I was calling 'id build' I was able to see that user exist and list of the network groups to which this user belongs to. Then I connected to another vm, where I was able to use LDAP user to start apache and ran

ldd bin/httpd

and compared the output. One of vm's was missing "libldap-2.3.so.0"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM