Cannot reconfigure domain: "httpd: bad user name"

Created:

2016-11-16 13:02:50 UTC

Modified:

2017-04-24 11:32:07 UTC

2

Was this article helpful?


Have more questions?

Submit a request

Cannot reconfigure domain: "httpd: bad user name"

Applicable to:

  • Plesk for Linux

Symptoms

  1. Domains cannot be reconfigured using the websrvmng utility.

  2. Unable to add a subscription.

The following error is shown in both cases:

    ERR (3)  [util_exec]: proc_close() failed

file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 68
code: 0
Error occured while sending feedback. HTTP code returned: 502
[warn] module ssl_module is already loaded, skipping

httpd: bad user name user1

Cause

There is no such user in the system. When you check if the user from the error exists, you will get an empty output:

# grep user1 /etc/passwd

Resolution

Create a user using the configuration from the database:

  1. Log into the psa database and get information about the system user:

    # plesk db
    # mysql> select * from sys_users where login='user1'\\G
    *************************** 1. row ***************************
    id: 55
    login: user1
    account_id: 2898
    home: /var/www/vhosts/example.com
    shell: /bin/false
    quota: 0
    mapped_to: NULL
    serviceNodeId: 1
  2. Get the user password using account_id :

    mysql> select * from accounts where id=2898;
    +------+-------+----------+
    | id | type | password |
    +------+-------+----------+
    | 2898 | plain | 123qwe |
    +------+-------+----------+

    NOTE: A plain-text password is set in the system environment as PSA_PASSWD , while an encrypted password is set as PSA_CRYPTED_PASSWD .

  3. Export the password to the system environment. See this example for a plain password:

    # PSA_PASSWD='123qwe'
    # export PSA_PASSWD
  4. Create the system user:

    # /usr/local/psa/admin/bin/usermng --add-user --user=user1 --homedir=/var/www/vhosts/example.com --shell=/bin/false
  5. Reconfigure the domain using the websrvmng utility.

Have more questions? Submit a request
Please sign in to leave a comment.