Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    Member
    Join Date
    Jun 2006
    Posts
    146

    Default What is the script name for assignment of accounts to a reseller?

    In WHM, there is an area where accounts can be assigned to a reseller. It's located in Reseller Center

    What is the script being used for that? Reason is i have 100 accounts to assign move from one reseller to another and I want to automate it in SSH. I can retrieve the current assignment from truedomains file but I don't know what script to use and what is the command to execute re-assignment of account to another reseller in ssh. I know cpanel has scripts located in /scripts folder.

    I hope somebody can help me.

  2. #2
    Member
    Join Date
    Aug 2009
    Location
    Houston, Tx
    Posts
    275

    Default

    Hello,

    I do understand what you mean, unfortunately this is not something that we can directly support. However, this can be done through the WHM interface. Please let me know if you have any other questions.

    Thank you,
    Matthew Curry

  3. #3
    Member
    Join Date
    Jun 2006
    Posts
    146

    Default

    Quote Originally Posted by cPanelMattCurry View Post
    Hello,

    I do understand what you mean, unfortunately this is not something that we can directly support. However, this can be done through the WHM interface. Please let me know if you have any other questions.

    Thank you,
    Matthew Curry
    Yes i know it can be done in WHM but since it's 100 accounts, it will tedious to search through the list and assign to the new reseller account. Im looking for a way for this to be easier if i have to do this for 100 accounts

  4. #4
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    The URLs in WHM that contain references to /scripts have little to no relation to the /scripts directory in the root partition.

    In this case there is no command line script to change the account owner. Nor do I see an API function to accomplish this.
    Kenneth
    Product Manager
    cPanel, Inc.

  5. #5
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    Quote Originally Posted by sharmaine001 View Post
    In WHM, there is an area where accounts can be assigned to a reseller. It's located in Reseller Center

    What is the script being used for that? Reason is i have 100 accounts to assign move from one reseller to another and I want to automate it in SSH. I can retrieve the current assignment from truedomains file but I don't know what script to use and what is the command to execute re-assignment of account to another reseller in ssh. I know cpanel has scripts located in /scripts folder.

    I hope somebody can help me.
    You need to replace the "OWNER=" line in the respective account files /var/cpanel/users

  6. #6
    Member
    Join Date
    Jun 2006
    Posts
    146

    Default

    so is there no way to write a bash script that will automatically get all accounts assigned to ResellerA and then change the assignment to ResellerB?

  7. #7
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    Quote Originally Posted by sharmaine001 View Post
    so is there no way to write a bash script that will automatically get all accounts assigned to ResellerA and then change the assignment to ResellerB?
    I would say you apparently didn't read my previous post!

    (I told you what you needed to do in the last past)

    Code:
    #!/bin/bash
    IFS="$"
    
    cd /var/cpanel/users
    
    if [ $# = 2 ]; then
       replace "OWNER=${1}" "OWNER=${2}" -- /var/cpanel/users/*
    else
       echo "USAGE:   ./${0} <old reseller login>  <new reseller login>"
    fi
    Last edited by Spiral; 10-09-2009 at 11:23 PM.

  8. #8
    Member
    Join Date
    Jun 2006
    Posts
    146

    Default

    Quote Originally Posted by Spiral View Post
    I would say you apparently didn't read my previous post!

    (I told you what you needed to do in the last past)
    Ops.. sorry I misunderstood your post.

    I don't understand much of the script you posted. Do i need to change OWNER=${1} with ResellerA and OWNER=${2} with ResellerB? So its something like this:

    replace "reseller1" "reseller2" -- /var/cpanel/users/*

    reseller1 is the username of the old reseller
    reseller2 is the username of the new reseller
    Last edited by sharmaine001; 10-09-2009 at 11:40 PM.

  9. #9
    Member bvierra's Avatar
    Join Date
    Jul 2006
    Location
    Southern California
    Posts
    55

    Default

    Quote Originally Posted by sharmaine001 View Post
    Ops.. sorry I misunderstood your post.

    I don't understand much of the script you posted. Do i need to change OWNER=${1} with ResellerA and OWNER=${2} with ResellerB? So its something like this:

    replace "reseller1" "reseller2" -- /var/cpanel/users/*

    reseller1 is the username of the old reseller
    reseller2 is the username of the new reseller
    thats a bad idea, what if somewhere else it contains reseller1 in the file.... use the script provided.

  10. #10
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Lightbulb

    As bvierra tried to point out to you above, I wrote the script specifically so that only the reseller owning the account would be changed. If you remove the "OWNER=" from the replace line then you are running the replace command against the entire user file and that could be very bad as you would end up altering the reseller account details themselves or possibly matching against other places you don't want to match.

    You can manually run a replace command instead of using the script but you would need to keep the same format as the script and replace ${1} with the old reseller name and ${2} with the new reseller name if you were just going to manually run your own replace command.

    Frankly, the script I quick whipped up for you is a lot easier.

  11. #11
    Member
    Join Date
    Jun 2006
    Posts
    146

    Default

    Hmm how about if I want that i will determine which accounts to be assigned to another reseller by package?

    I notice that when I acquire accounts, the user is also "root" so I cannot base the transfer from the account name

Similar Threads & Tags
Similar threads

  1. Filed with Developers Reseller's domain not shown in the WHM - Show Reseller Accts [Case 56116]
    By AlexAT in forum Feature Requests for cPanel/WHM
    Replies: 2
    Last Post: 09-03-2010, 04:53 PM
  2. IP Assignment problem
    By Arkaos in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 12-04-2005, 03:21 PM
  3. transfer reseller / reseller's accounts without root?
    By Secret Agent in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-28-2005, 08:59 AM
  4. IP Assignment
    By autson in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-04-2002, 12:48 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube