AIX 5.3 TL 6 and Apache 1.3 - httpd: bad user name nobody After upgrading AIX version 5.3 Apache daemon httpd doesn't want to start: httpd: bad user name nobody
Technology Level 6 for AIX 5.3 can come with a surprise. Specially if you have Apache 1.3 running.
$ /usr/local/apache/bin/apachectl start httpd: bad user name nobody /usr/local/apache/bin/apachectl start: httpd could not be started
I was very surprised seeing this. I imidiately checked httpd configuration file /usr/local/apache/conf/httpd.conf to see under which user is apache supposed to start
$ grep ^User /usr/local/apache/conf/httpd.conf User cp1adm
Hmm... httpd configuration file is supposed to start under cp1adm user. So I try to start it again. Same result: httpd: bad user name nobody
The first that came to my mind was to start httpd with -f option: -f file : specify an alternate ServerConfigFile
$ file /usr/local/apache/bin/httpd /usr/local/apache/bin/httpd: 64-bit XCOFF executable or object module $ $ /usr/local/apache/bin/httpd -f /usr/local/apache/conf/httpd.conf httpd: bad user name nobody /usr/local/apache/bin/apachectl start: httpd could not be started
Seems that httpd ignores User cp1adm line stated in /usr/local/apache/conf/httpd.conf configuration file.
Next, I try to see if httpd binary file even tries to read it's config file:
$ truss /usr/local/apache/bin/httpd -f /usr/local/apache/conf/httpd.conf >truss.out 2>&1 httpd: bad user name nobody /usr/local/apache/bin/apachectl start: httpd could not be started
Now I start greping for "conf" or "httpd.conf" in truss.out which is the output of the truss command, but without result. Seems that httpd doesn't even read the configuration file. So it's a problem, maybe, with user nobody.
The UID and GID of this user seem to be a little strange.
After searching the web for some information regarding these values, I try to change the UID and GID of user nobody to 65534. This can be done either by using smitty user and smitty group fast paths, either by using chgroup and chuser commands:
$ chgroup id=65534 nobody 3004-719 Warning: /usr/bin/chgroup does not update /etc/passwd with the new gid. $ id nobody uid=65534(nobody) gid=65534(nobody)
Please note that also /etc/passwd file must be edited to have the following UID and GID for user nobody:
$ id nobody uid=65534(nobody) gid=65534(nobody)
After this apache starts without problems as the user it is supposed to
Designed and developed by Andrei Manescu. Optimized for Mozilla Firefox.
Copyright 2007 Andrei Manescu
All trademarks and copyrights on this page are owned by their respective owners. Comments are owned by those who posted them.