Page 1 of 1

OMG ! Plesk breaks admin account after migration from plesk9

Posted: Thu Sep 29, 2011 5:57 pm
by nobody
I don't know how it managed to do it ....

But when I try to update admin contact info I get the errors pasted below ...

The panel is working and I can login the bad thing is that I cannot have in the admin account any domains cause I cannot access them and I get locked out if I try to do so... I found some other guys having the same issue on the net but they didn't know either how to resolve it. One of them paid parallels support ...
Things have gone crazy with parallels....
Can anyone suggest a solution or maybe think whats going on ?

Code: Select all

ERROR: Zend_Db_Statement_Exception
Up Level
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY'
0: Pdo.php:238
Zend_Db_Statement_Pdo->_execute(array)
1: Statement.php:283
Zend_Db_Statement->execute(array)
2: Abstract.php:433
Zend_Db_Adapter_Abstract->query(string 'INSERT INTO `smb_roles` (`id`, `name`, `isBuiltIn`, `ownerId`) VALUES (?, ?, ?, ?)', array)
3: Abstract.php:230
Zend_Db_Adapter_Pdo_Abstract->query(string 'INSERT INTO `smb_roles` (`id`, `name`, `isBuiltIn`, `ownerId`) VALUES (?, ?, ?, ?)', array)
4: Abstract.php:511
Zend_Db_Adapter_Abstract->insert(string 'smb_roles', array)
5: Abstract.php:924
Zend_Db_Table_Abstract->insert(array)
6: Row.php:171
Db_Table_Row->_executeInsert(array)
7: Row.php:130
Db_Table_Row->_doInsert()
8: Abstract.php:418
Zend_Db_Table_Row_Abstract->save()
9: Row.php:26
Db_Table_Row->save()
10: Client.php:122
Plesk_Smb_Bridge_Client::_createDefaultSmbRoles(integer '1', boolean true)
11: Client.php:48
Plesk_Smb_Bridge_Client::sync(object of type Client)
12: Client.php:431
Client->update()
13: cmd_server.php3:188
admin_ed(array, array)
14: admin_ed.php3:57
require(string '/usr/local/psa/admin/htdocs/server/admin_ed.php3')
15: plesk.php:68

Re: OMG ! Plesk breaks admin account after migration from pl

Posted: Wed Nov 02, 2011 2:20 pm
by coolemail
We had a related problem - I'm about to post - but I think yours is directly linked to http://kb.parallels.com/en/111985 which I hope will help you.

We have Plesk 10.2.0. With us, situation is we have a customer whose contact email address is xxx@domain1.com (we host domain1.com). We have a "Customer" Joe Bloggs whose contact email address (from Plesk 9 days) is xxx@ where he has his own domains, not domain1.com. We want to change the password for the email address ("user" in Plesk 10) xxx@domain1.com. But it tells us we cannot because it is being used elsewhere. If we now change contact details of Joe Bloggs to yyy@ (where yyy@ does not exist!!!) that is accepted and we can now go and change the password for xxx@domain1.com. But when we try and change Joe Bloggs contact email address back to xxx@, we cannot do so!!

Re: OMG ! Plesk breaks admin account after migration from pl

Posted: Mon Nov 07, 2011 11:53 pm
by nobody
coolemail wrote:We had a related problem - I'm about to post - but I think yours is directly linked to http://kb.parallels.com/en/111985 which I hope will help you.

We have Plesk 10.2.0. With us, situation is we have a customer whose contact email address is xxx@domain1.com (we host domain1.com). We have a "Customer" Joe Bloggs whose contact email address (from Plesk 9 days) is xxx@ where he has his own domains, not domain1.com. We want to change the password for the email address ("user" in Plesk 10) xxx@domain1.com. But it tells us we cannot because it is being used elsewhere. If we now change contact details of Joe Bloggs to yyy@ (where yyy@ does not exist!!!) that is accepted and we can now go and change the password for xxx@domain1.com. But when we try and change Joe Bloggs contact email address back to xxx@, we cannot do so!!

Thanks for your reply. Sorry for replying with such a delay.

Yes. It apparently tells you the user allready exists. The panel is so bad I want to pull my eyes out. You can't do anything about it as I have looked as well. It is very annoying...

Well this solution with offcourse the email changed to the correct one didn't return any values. Which is strange !
Can you run it against your box and tell me if it returns something to you ?

Code: Select all

 mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "select id, login, email, contactName from smb_users where email='admin@server.tld';" 
regards

Re: OMG ! Plesk breaks admin account after migration from pl

Posted: Tue Nov 08, 2011 6:52 am
by coolemail
Hi nobody
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "select id, login, email, contactName from smb_users where email='admin@server.tld';"
works for us, changing only the email address, but leaving all the single and double quotes etc. The email address needs to be one that is on the system, either hosted, or as we have tested an external email address that is an external customer's contact email address.

Re: OMG ! Plesk breaks admin account after migration from pl

Posted: Tue Nov 08, 2011 7:50 am
by nobody
coolemail wrote:Hi nobody
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "select id, login, email, contactName from smb_users where email='admin@server.tld';"
works for us, changing only the email address, but leaving all the single and double quotes etc. The email address needs to be one that is on the system, either hosted, or as we have tested an external email address that is an external customer's contact email address.

Yes, but what does it retrn to you ? Does it return user admin etc ?

Re: OMG ! Plesk breaks admin account after migration from pl

Posted: Tue Nov 08, 2011 8:01 am
by coolemail
Returns where that email address is being used, e.g.

Code: Select all

[root@plesk3 ~]# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "select id, login, email, contactName from smb_users where email='andrew@domain.com';"
+-----+--------------------------------+--------------------------------+--------------------------------+
| id  | login                          | email                          | contactName                    |
+-----+--------------------------------+--------------------------------+--------------------------------+
| 312 | abc                          | andrew@domain.com    | Andrew Smith            |
| 371 | andrew@domain.com   | andrew@domain.com    | andrew@domain.com |
+-----+--------------------------------+--------------------------------+--------------------------------+
[root@plesk3 ~]#
so in the example above, we id 371 is the email address set up under the domain.com domain. And 312 is the Customer that is set up which has andrew@domain.com as the contact email address. This was OK in Plesk 9, and migrated OK. The issue only comes when for example you try to change the password for the email address under domain.com because it is rejected with the message that the email address is being used elsewhere - as 312 is using it as the contact email address.

It is mad that in 312 on the Customer Contact details it is not a free text field, because it is only a contact email address that is being put in there. Quite why it has to chaeck that against anything else is beyind me.