The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

restore account with different username

Discussion in 'General Discussion' started by mohsyn, Dec 6, 2005.

  1. mohsyn

    mohsyn Member

    Joined:
    May 25, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I have made a backup with eg /scripts/pkacct user1 and i want to restore it a different username say user2. How can i do it from WHM or from shell i have the pkg file /home/cpmove-user1.tar.gz

    Regards,
     
  2. mgsnnetworks

    mgsnnetworks Well-Known Member

    Joined:
    Sep 11, 2005
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Rhyl, North Wales, UK
    Use Cpanel Restore \ Backup with the admin \ reseller login then browse the member site you wish to restore
     
  3. aby

    aby Well-Known Member

    Joined:
    May 31, 2005
    Messages:
    638
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    What about restoring the account with the same username and then changing it using the modify account option from WHM. That should give the result you are looking for.
     
    #3 aby, Dec 6, 2005
    Last edited: Dec 6, 2005
  4. kris1351

    kris1351 Well-Known Member

    Joined:
    Apr 18, 2003
    Messages:
    963
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lewisville, Tx
    You can untar the backup and change the username in the cpanel file under the backup.
     
  5. mohsyn

    mohsyn Member

    Joined:
    May 25, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    The server is the same for both the users.
     
  6. iwscm

    iwscm Registered

    Joined:
    Apr 11, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Can someone elaborate on the exact file(s) that should be edited in the backup to change the account username. I found '/cp/[username]', but I'm not sure if that's among the files I should be editing.

    I, too, am trying to restore a backup file to a different server, and using the same username is problematic.
     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Is there any reason the username cannot be changed prior to packaging it in WHM > Modify an Account area? Or, do you not have the account on the old machine any longer to change the username, re-package it and then restore it with that new username?

    You could unpackage the file and then do a find for the username in files as content, then in file and folder names:

    Code:
    find /pathtofiles | xargs grep "username"
    find /pathtofiles -name "username*"
    The first command will search for username within files and the second will search for folders or files with that username. Please replace pathtofiles with the path to the extracted package, and please replace username with the current cPanel username.
     
  8. dwykofka

    dwykofka Well-Known Member

    Joined:
    Aug 6, 2003
    Messages:
    394
    Likes Received:
    3
    Trophy Points:
    18
    honestly there really needs to be an automated way to accomplish this. I run instal this issue all the time when a new user signs up and wants us to transfer their cpanel account over from their old provider but they have a fairly common username.
     
  9. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    If this is something that doesn't exist, the only way to have it added is to make a feature request:

    Feature Requests for cPanel/WHM

    It is a good idea, but this isn't part of the product currently.
     
Loading...

Share This Page