Plesk

Apache and websites are down: cannot find user with name john_doe or bad user name john_doe

Symptoms

Cause

The subscription user is missing in /etc/passwd.

Resolution

  1. Connect to the server via SSH.

  2. Re-create httpdocs directory for the domains mentioned in the error:

    # mkdir /var/www/vhosts/example.com/httpdocs

  3. Re-create the system users:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin -Dpsa -Ns -e"select s.login, a.password, s.home, s.shell from sys_users s, accounts a where a.id = s.account_id" | awk '{ print "PSA_PASSWD=x27" $2 "x27 /usr/local/psa/admin/sbin/usermng --add-user --user=" $1 " --homedir=" $3 " --shell=" ($4?$4:"/bin/false")}' | sh -x

  4. Recreate the directories and configuration files with the following command:

    # plesk bin repair --update-vhosts-structure

  5. Repair permisisons for the domain from step 2:

    # plesk repair fs -v example.com

Additional information

Apache configuration shows error after removing a domain from Plesk: httpd: bad user name

Exit mobile version