Symptoms
-
Unable to change password for customer in Customers > johndoe > Change Login info with the error:
PLESK_ERROR: Error: DB query failed: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘user’ for key ‘login’, query was: INSERT INTO `smb_users` (`login`, `password`, `contactName`, `email`, `companyName`, `phone`, `fax`, `address`, `city`, `state`, `zip`, `country`, `creationDate`, `isBuiltIn`, `roleId`, `uuid`, `isLocked`, `externalId`, `ownerId`, `additionalInfo`, `imNumber`, `imType`, `locale`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
-
The domain
example.com
is belonged to johndoe customer. In an attempt to access Domains > example.com the following error is shown:PLESK_INFO: Client: unable to select: No such row in the table
- The error below occurs in an attempt to log into Plesk under johndoe account:
PLESK_ERROR: Error: Access denied. Your account was suspended.
Cause
Inconsistency in the Plesk database, the customer has incorrect ownerId
.
Resolution
Click on a section to expand
Plesk for Linux
-
Connect to the server via SSH
-
Create a backup for Plesk database:
# plesk db dump psa > /root/psa_backup.sqlÂ
-
Execute the command below to update
ownerId
 with the correct value:# plesk db “UPDATE smb_users s RIGHT JOIN clients c ON c.login=s.login SET s.ownerId = c.id WHERE c.login=’johndoe’“
Note: in the example above replace johndoe with the affected customer login.
-
If the issue persists, set the
isBuiltIn
value to1
for the affected customer login:# plesk db “UPDATE smb_users s RIGHT JOIN clients c ON c.login=s.login SET s.isBuiltIn = 1 WHERE c.login=’johndoe'”
Note: in the example above replace johndoe with the affected customer login.
Plesk for Windows
-
Connect to the server via RDP
-
Create a backup for Plesk database:
C:> plesk db dump psa > C:psa_backup.sql
-
Execute the command below to update
ownerId
 with the correct value:C:> plesk db “UPDATE smb_users s RIGHT JOIN clients c ON c.login=s.login SET s.ownerId = c.id WHERE c.login=’johndoe’“
Note: in the example above replace johndoe with the affected customer login.
-
If the issue persists, set the
isBuiltIn
value to1
for the affected customer login:C:> plesk db “UPDATE smb_users s RIGHT JOIN clients c ON c.login=s.login SET s.isBuiltIn = 1 WHERE c.login=’johndoe'”
Note: in the example above replace johndoe with the affected customer login.