- Plesk for Linux
- Plesk for Windows
Cannot change customer's password, execution fails with following error:
PLESK_ERROR: Error: DB query failed: SQLSTATE: 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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
It is also not possible to access domains of this customer, following error is displayed instead:
PLESK_INFO: Client: unable to select: No such row in the table
plesk repair db -nshows that there is inconsistency in the database:
# plesk repair db -n
Checking the consistency of the Plesk database
Inconsistency in the table 'smb_users' for the column ownerId: No
rows in the table 'clients' with = 99 ............................ [ERROR]
- Not possible to log in to Plesk under the affected customer account with the error:
PLESK_ERROR: Error: Access denied. Your account was suspended.
Inconsistency in the Plesk database: user has incorrect ownerId.
Note: if you don't have administrative access to Plesk server via SSH or RDP, contact your hosting provider regarding the issue
Run following command to make sure that the client with the same login exists:
# plesk db 'SELECT c.login, c.id, s.ownerId FROM clients c LEFT JOIN smb_users s ON c.login=s.login WHERE c.login="user";'
| login | id | ownerId |
| user | 4 | 99 |
ownerIdwith 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="user";'