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.

Change Reseller

Discussion in 'General Discussion' started by BWS, Dec 21, 2003.

  1. BWS

    BWS Active Member

    Joined:
    Nov 20, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    I recently bought my own dedicated, and copied several accounts from my old server (where I was a reseller) using WHM's copy function.

    However this has meant that the accounts that I copied over have retained my reseller username as their reseller when I list the accounts (and obviously on the new server I'm not a reseller) is there any way of changing this?
     
  2. BWS

    BWS Active Member

    Joined:
    Nov 20, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Not to worry - Found it...

    Edit the users file in /var/cpanel/users
     
  3. Aiki-boy

    Aiki-boy Member

    Joined:
    Aug 14, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    You can also change account ownership in WHM under account functions.
     
  4. BWS

    BWS Active Member

    Joined:
    Nov 20, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Using change ownership wouldn't work, as it listed me as the owner, but my old username as the reseller!
     
  5. Aquitaine

    Aquitaine Member

    Joined:
    May 7, 2003
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Calcutta
    change ownership for accounts

    Just an FYI ::

    I had to change ownership on a lot of domains.
    There is no internal script for that, but i made a quick perl script that would do the job, just sharing it for others

    #!/usr/bin/perl

    $domains{'domain_name.com'} = 'username';
    # Other domains
    # Come here

    for (keys %domains) {
    my $user = $domains{$_};
    if (! -e "/var/cpanel/users/$user") { print "Domain $_ has changed usernames [$!]"; exit }

    open (R, "/var/cpanel/users/$user" ) || die "how ? $a{$_} [$!] ";
    open (W, ">temp.txt") || die "Error cant open temp file [$!]";
    while (<R>) {
    chomp;
    if (/OWNER=root/ ) { print W "OWNER=owner_user_name\n"; } else { print W "$_\n"; }
    }
    close (R);
    close (W);
    print `mv temp.txt /var/cpanel/users/$user`;
    # rename ("temp.txt", "/var/cpanel/users/$user" ) || die "Error rename $user [$!]";
    }

    For some reason the rename didnt work for me , mv did though,,

    Cheers

    change ownership account multiple
     
  6. ilir038

    ilir038 Member

    Joined:
    Feb 26, 2005
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I'm interested in this "change ownership for multiple accounts" script but I don't know how to use it. Can you give me a hint or something?

    Thanks,

    I.
     
Loading...

Share This Page