Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 3rd October 2005, 17:37
Hellbound Hellbound is offline
Senior Member
 
Join Date: Sep 2005
Posts: 116
Thanks: 4
Thanked 1 Time in 1 Post
Default Change site's owner (customer)

hi guys
how can I change the already made site from one customer to another customer?

thanks
Reply With Quote
Sponsored Links
  #2  
Old 3rd October 2005, 18:52
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

That's not possible yet.
You have to delete the site (also from the recycle bin) and re-create it under the other customer.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 3rd October 2005, 19:50
Hellbound Hellbound is offline
Senior Member
 
Join Date: Sep 2005
Posts: 116
Thanks: 4
Thanked 1 Time in 1 Post
Default

how about modify it directly in mysql? which records? because recreating 15 sites it is really headache
Reply With Quote
  #4  
Old 3rd October 2005, 20:12
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Modifying in mySQL is not easy and i think you will get errors when you do it manually. You would have to change the user and group ID's in the tables isp_nodes, isp_dep for the record of the website in the table isp_isp_web and for the users in isp_isp_user. The table relations are trough the doc_id and doctype_id.
Reply With Quote
  #5  
Old 3rd October 2005, 20:33
Hellbound Hellbound is offline
Senior Member
 
Join Date: Sep 2005
Posts: 116
Thanks: 4
Thanked 1 Time in 1 Post
Default

I'll try to make a backup and change it so at least I can go back to previous settings
Reply With Quote
  #6  
Old 9th January 2006, 19:26
bio bio is offline
Junior Member
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am looking to do the same thing.

I noticed that the previous reply was some time ago... is there an easier way yet?

I am quite comfortable in the database making modifications, but want to make sure I get everything correct (as I have 50 domains on my box and I'd hate to hose it all up).

Thanks in advance!

On a alternative note: if I delete the domain to recreate it, will it also delete the user's email and web files? If not, that will work too.
Reply With Quote
  #7  
Old 9th January 2006, 21:08
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Quote:
Originally Posted by bio
I am looking to do the same thing.

I noticed that the previous reply was some time ago... is there an easier way yet?

I am quite comfortable in the database making modifications, but want to make sure I get everything correct (as I have 50 domains on my box and I'd hate to hose it all up).
Its nearly impossible to change an owner for a larger site or it takes at least some time and its error prone.

Here are some general informations but that does not mean that i recommend it

1) Get the userid and groupid of the customer. The easiest way is, create a new website for the customer and check which user and groupid it has.

The user and groupid are in the table isp_nodes. you can join isp_nodes and isp_isp_web by their doc and doctype id's.

2) To change the owner, you must set the userid and groupid in isp_nodes for the website to the new owner.

Then you must do the smae things for all users from isp_isp_user and isp_isp_domain. The user and groupid for these tables are also in isp_dep.

3) Get the corresponding records in the table isp_dep, where the parent_doc_id is the doc_id of the web and the parent_doctype_id is the doctype_id of the web. Change userid and groupid in isp_dep too.

As you can see, changing userid's in 2 - 3 depending tables for each record is a pain


Quote:
On a alternative note: if I delete the domain to recreate it, will it also delete the user's email and web files? If not, that will work too.
No, all users and co.domains of a website where deleted recursively.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 26th September 2007, 06:44
cvladan cvladan is offline
Junior Member
 
Join Date: Sep 2007
Location: Beograd
Posts: 9
Thanks: 0
Thanked 7 Times in 3 Posts
Send a message via Skype™ to cvladan
Default Tell me if I am wrong? Have I forgot something?

I just changed the owner of the site...

My notes - Changing the customer of already created site:

1) Therefore, I titled the new site on the selected customer to 'test.com';
SELECT * FROM `isp_nodes` AS a
JOIN `isp_isp_web` AS b ON a.doc_id = b.doc_id AND a.doctype_id = b.doctype_id
WHERE a.title = 'test.com'

So, now I know the wanted user/groupid
userid = 6, and groupid = 2
2) Change the owner for the website (table isp_nodes).
SELECT * FROM `isp_nodes` AS a WHERE a.title = 'wantedsite.com'
(found that doc_id = 19 and doctype_id = 1013)
Update is below in one sql command.

Change the users (table isp_isp_user).
SELECT * FROM `isp_isp_user` AS a WHERE a.user_username LIKE 'wantedsite.com_%'
(found that i have two users: doc_id = 48 and doctype_id = 1014
doc_id = 51 and doctype_id = 1014)
Update is below in one sql command.
And the same for domains (table isp_isp_domain):
SELECT * FROM `isp_isp_domain` AS a WHERE a.domain_domain = 'wantedsite.com'
(found that doc_id = 22 and doctype_id = 1015)

Update is below in one sql command.

Now check for dependecies:
website: SELECT * FROM `isp_nodes` WHERE doc_id = 19 AND doctype_id = 1013
users: SELECT * FROM `isp_nodes` WHERE doc_id IN (48,51) AND doctype_id = 1014
domains: SELECT * FROM `isp_nodes` WHERE doc_id = 22 AND doctype_id = 1015
And update everything:
UPDATE `isp_nodes` SET userid = 6, groupid = 2 WHERE
(doc_id = 19 and doctype_id = 1013) OR
(doc_id IN (48,51) AND doctype_id = 1014) OR
(doc_id = 22 AND doctype_id = 1015)
3) Show everything: SELECT * FROM `isp_dep` WHERE parent_doc_id = 19 AND parent_doctype_id = 1013
and i found out that I have and database: id = 15, doctype_id = 1029
Do not do this: UPDATE `isp_dep` SET userid = xxx WHERE parent_doc_id = xxxx
But no! This seems that has no effect! So revert... Do nothing in this table, considering the userid or groupid.

At last, I found it:
You must change the parent tree_id (easiest from hover on ispconfig tree) and doc_id (from table isp_isp_kunde):

SELECT * FROM `isp_dep` WHERE child_doc_id = 19 AND child_doctype_id = 1013
UPDATE `isp_dep` SET parent_doc_id = 4, parent_tree_id = 158 WHERE child_doc_id = 19 AND child_doctype_id = 1013

The problems and dilemas are:

Have I forgotten something? That will pop-up as a problem later?
Are there any changes needed in 'dns_nodes' or 'dns_dep' tables?
Nothing else to change?

NOTE: Site names, or any other data here shown is fictional (but has sense)

Last edited by cvladan; 26th September 2007 at 06:49.
Reply With Quote
  #9  
Old 26th September 2007, 07:49
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Why dont you do not use the site owner changing functionl which is available in the tools menu on all current ISPConfig versions?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 26th September 2007, 08:02
cvladan cvladan is offline
Junior Member
 
Join Date: Sep 2007
Location: Beograd
Posts: 9
Thanks: 0
Thanked 7 Times in 3 Posts
Send a message via Skype™ to cvladan
 
Default C'mon guys!

I just tought that I am stupid...
But it's more - the naming of a tool is INCREDIBLE!

I'am not MOVING SITE anywhere, just CHANGING OWNER.

This is why I did not try this function, ever!
Specially because it is in steps, and I never had a courage to go to step two!

But, for everybody:

Tools -> Move Websites
means
Tools -> Change Ownership

Anyway, YOU ARE REALLY FAST!
100% percent perfect! Just write a little more intuitive interfaces...
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change keymap under Debian fernando Technical 3 15th June 2006 16:28
Need help with sites images dirs. SkIRmiS Installation/Configuration 11 26th September 2005 15:24
Can one change ? misterm Installation/Configuration 4 20th September 2005 13:14


All times are GMT +2. The time now is 15:26.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.