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.

postwwwact set owner

Discussion in 'cPanel Developers' started by jbnmedia, May 24, 2010.

  1. jbnmedia

    jbnmedia Member

    Joined:
    Jun 25, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hello!

    Is there anyone who knows how to set owner on account created with postwwwact scripts? Now all accounts is set to owner root. I want a reseller username to be the owner.

    I bought my script and it is written in php.

    If someone can help me I will be very glad. A small reward of $10 for the one who can help me.

    Sincerely Johan
     
  2. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If you were to execute:

    /scripts/modcpuser --user $username --action set --key OWNER --value $reseller


    you would probably get the result you wanted :)
     
  3. jbnmedia

    jbnmedia Member

    Joined:
    Jun 25, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    hmm maybe I said wrong or can i add that line in my script ?

    The thing I want is when a new user order a website with my cms site2go.se - the account and the website installs. That works fine. From now on I want all new customer that orders shall driectly be owner "jbn" s accounts.
     
  4. jbnmedia

    jbnmedia Member

    Joined:
    Jun 25, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    is there anyone who can help me ?
     
  5. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi jbnmedia,

    Unfortunately, I don't know how exactly you're creating accounts. Normally, when you use cPanel or WHM, you can set the owner when you first create the account. However, it sounds like you have a different setup.

    If you need something to happen after account creation, make (or add to) a postwwwacct script. Anything you put in this script will get executed when an account is created.

    /scripts/modcpuser is for changing a cpanel account. You can use it to change the owner of an account. If you call that script, inside your postwwwacct script, you will change the owner immediately after the account is created.

    Documentation for postwwwacct scripts: cPanel/WHM Script Hooks

    A blog article with example PHP postwwwacct script: Frequently Asked Scripts: "How do I automate XYZ after creating an account?" - cPanel Integration

    Regards,
    -DavidN
     
Loading...

Share This Page