user1562282 user1562282 - 4 years ago 177
Apache Configuration Question

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".

Answer Source

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 ""

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download