• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Error when deleting/activating a suspended account

mnxsolutions

New Pleskian
When attempting to activate, or delete a suspended account I'm getting the following error.

ERROR: PleskUserException
Unable to activate/deactivate domain: Domain Mgmt backend failed: domainmng: Unable to define login for ftp user: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
domainmng: Unable to define login for ftp user: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Additionally, an exception has occurred while trying to report this error: PleskFatalException
Domain Mgmt backend failed: domainmng: Unable to define login for ftp user: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
domainmng: Unable to define login for ftp user: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

This does not happen for all accounts, it only occurs for 2 that I've attempted. After some investigation I have found that these accounts do not have an associated system user for them. I was wondering if anyone has come across this before and knew of a solution. Something that I was thinking about testing was creating the system user in the psa database then removal, but if I insert wrong values into the database I could potentially destroy an active account, or somehow link accounts.

alias mysql='mysql -u admin -p$(cat /etc/psa/.psa.shadow)'

mysql -Ns -e "SELECT login, home FROM sys_users WHERE id in (select sys_user_id from hosting where dom_id in (select id from domains where cl_id in (select id from clients))) order by login;" psa | grep -e domain1 -e domain2

The mysql command will output in the following form system_user document_root. However, for the domains in question, they were missing. The domains, of course had IDs, and I know the hosting owners ID, I would just think that I need to link hosting account to system user within the database for plesk to allow deletion. Any ideas on how to proceed?

Additionally, I tried deleting other accounts with the client's permission, and they deleted just fine. I do not know what would have removed the system user from the mentioned accounts.
 
How about in your plesk control panel, try changing or adding a system user.
 
[SOLVED] How to remove a user that's system user is unlinked

Even though I received an error after doing so I managed to remove the users. Thanks for the hint.

1.) Assign New Domain Owner (Just chose a random one)
2.) Delete domain
 
Last edited:
Back
Top