1

Topic: starting httpd: httpd: bad user name iredadmin

==== Required information ====
- iRedMail version: iRedMail-0.8.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Linux/BSD distribution name and version: CentOS 6.4
- Related log if you're reporting an issue:
====
I just finished installing iRedMail and wanted to try it when I noticed that the httpd daemon was not running. When I tried to start it, I got this error message:

$ service httpd start
starting httpd: httpd: bad user name iredadmin
                                                                              [FAILED]

I noticed that the iredadmin user was specified in the /var/www/iredadmin/settings.ini file. The password appeared to be an MD5 hash (or something similar).

Do I need to create the iredadmin user locally? If so, what password should I use?

2

Re: starting httpd: httpd: bad user name iredadmin

- It's defined in /etc/httpd/conf.d/iredadmin.conf, not /var/www/iredadmin/settings.ini.
- You should create it manually.
- Did you choose not to install iRedAdmin during iRedMail installation?

3

Re: starting httpd: httpd: bad user name iredadmin

Thank for the fast response and for the suggestion.

I thought that I did choose to install IRedAdmin, that's why I was confused. Is there a log that I can check to verify that this was simple user error?

ZhangHuangbin wrote:

- It's defined in /etc/httpd/conf.d/iredadmin.conf, not /var/www/iredadmin/settings.ini.
- You should create it manually.
- Did you choose not to install iRedAdmin during iRedMail installation?

4

Re: starting httpd: httpd: bad user name iredadmin

Adding the user iredadmin worked perfectly but now I cannot login as that user on the website. Is there a specific password that I am mean to use?

5

Re: starting httpd: httpd: bad user name iredadmin

I just verified that I can use postmaster@<domain> to log into https://<server>/mail but I am still getting the 500 error when I try to access https://<server>/.

I was also not able to log into https://<server>/phppgadmin using the "postgres" user. The message was "Login disallowed for security reasons" but I was able to login to psql from the command line.

6

Re: starting httpd: httpd: bad user name iredadmin

I was able to track down the https://<server>/iredadmin problem. There is an exception occurring in the WSGI script:

[Mon Apr 15 11:18:36 2013] [error] [client x.y.z.a] mod_wsgi (pid=28126): Exception occurred processing WSGI script '/var/www/iredadmin/iredadmin.py'.
[Mon Apr 15 11:18:36 2013] [error] [client x.y.z.a] Traceback (most recent call last):
[Mon Apr 15 11:18:36 2013] [error] [client x.y.z.a]   File "/var/www/iredadmin/iredadmin.py", line 9, in <module>
[Mon Apr 15 11:18:36 2013] [error] [client x.y.z.a]     from libs import iredbase
[Mon Apr 15 11:18:36 2013] [error] [client x.y.z.a]   File "/var/www/iredadmin/libs/iredbase.py", line 34, in <module>
[Mon Apr 15 11:18:36 2013] [error] [client x.y.z.a]     webmaster = cfg.general.get('webmaster', 'root')
[Mon Apr 15 11:18:36 2013] [error] [client x.y.z.a]   File "/usr/lib/python2.6/site-packages/web/utils.py", line 76, in __getattr__
[Mon Apr 15 11:18:36 2013] [error] [client x.y.z.a]     raise AttributeError, k
[Mon Apr 15 11:18:36 2013] [error] [client x.y.z.a] AttributeError: 'general'

It looks like it is related to webmaster authentication. What do I need to check in the webmaster setup?

7

Re: starting httpd: httpd: bad user name iredadmin

I found the problem (at least one of them). The conf/* files assume that they can use /home for home directories (like iredadmin). That assumption is not correct for my setup because /home is auto mounted to a central filer and is administered by LDAP/Kerberos. Local users are created in /opt/home or /local/home.

I did not see a way to set that in the installation tool so I hand edited the conf files and re-installed by re-running the iRedMail.sh script. I am testing now.

This explains why the user "iredadmin" was not properly configured.

8

Re: starting httpd: httpd: bad user name iredadmin

Rerunning the installation script generated all sorts of errors. Apparently that isn't the way to go. I could not find any documentation on how to do this so I will rebuild the server from scratch.

9

Re: starting httpd: httpd: bad user name iredadmin

I was able to get things working by:

1. rebuilding the system from scratch
2. re-downloading iredmail
3. untarring it
4. changing the /home references to /opt/home
5. creating /opt/home (mkdir -p)
6. install as documented

I can now access https://<server>/iredadmin.

10

Re: starting httpd: httpd: bad user name iredadmin

Glad to hear that it works for you now.
Usually, re-install OS + iRedMail is the easiest way to solve issue if it's still a new/testing/non-production server.