• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

"User account already exists" while user doesn't really exists

DennisAm

Basic Pleskian
Hello,

I have a problem with one of my user accounts (let's call it testuser) in Plesk. System is Windows Server 2012 R2 with Plesk 12.
In the Control Panel, the customer and subscription for testuser are removed, so there should not be any data left for the domain/user.

However, when I want to create a new subscription with the username testuser, Plesk gives the error "User account already exists". I tried to manually remove the domain and took the following steps:

Code:
C:\Program Files (x86)\Parallels\Plesk\bin>customer --remove testuser
An error occurred during removal of customer account: testuser does not exist

C:\Program Files (x86)\Parallels\Plesk\bin>webuser --remove testuser
The web user with the name 'testuser' does not exist

C:\Program Files (x86)\Parallels\Plesk\bin>ftpsubaccount --remove testuser -do
main testdomain.tld
Unable to remove FTP account: Unable to find service node for web service on dom
ain with id=0

C:\Program Files (x86)\Parallels\Plesk\bin>database --remove testuser
An error occurred during database removal: database does not exist

As described in this topic, I logged in to the MySQL server and tried to remove the user:

Code:
C:\Program Files (x86)\Parallels\Plesk\MySQL\bin>mysql -P8306 -uadmin -p[admin-pass] psa
mysql> \g SELECT id FROM `sys_users` WHERE login=`testuser`
ERROR 1054 (42S22): Unknown column 'testuser' in 'where clause'
mysql> \g DELETE FROM `sys_users` WHERE login=`testuser`
ERROR 1054 (42S22): Unknown column 'testuser' in 'where clause'

Also, the inetpub/vhosts directory for the user is correctly removed and therefore doesn't exist.

Are there any other steps I can take to remove the user manually and so be able to recreate the user?
Dennis
 
Last edited:
Use correct SQL syntax:

mysql> SELECT id FROM sys_users WHERE login="testuser";

mysql> DELETE FROM sys_users WHERE login="testuser";
 
Thank you very much Igor, that worked like a charm.
Creation of subscription worked well, but I got the error "Error message : ProtDir_IIS::update() failed: Add Protected Directory failed: columns siteId, path are not unique (Error code 1)". Managed to fix it with the step described in this KB article.
 
Use correct SQL syntax:

mysql> SELECT id FROM sys_users WHERE login="testuser";

mysql> DELETE FROM sys_users WHERE login="testuser";

Hi Igor. Maybe you can help me. Which MySQL command can help me for listing all subscriptions users.
 
You can find them in smb_users table.
I have deleted user from smb_users, sys_users but it's still get same error in adding subscription page "User account already exists."
I have also tried after plesk repair db :(
 
I can only suggest you enable Plesk debug mode with tracking all SQL queries and deeply investigate these debug logs for the place where this error occurs in logs. Or contact Plesk Support Team for investigation and fixing this issue directly on your server.
 
I have deleted user from smb_users, sys_users but it's still get same error in adding subscription page "User account already exists."
I have also tried after plesk repair db :(

It's probably the actual system account;

[root@plesk ~]# userdel username
 
Back
Top