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.

Using Remote Access Keys (php)

Discussion in 'General Discussion' started by ThermoDust, Oct 29, 2002.

  1. ThermoDust

    ThermoDust Member

    Joined:
    Oct 27, 2002
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Is there any place to explain how each command for remote access should be setup. Like suspend, killacct, ect.. Like a place to show me how the uername should be in there. How to idenfiy the account I want to suspend, killacct, ect...?
     
  2. ThermoDust

    ThermoDust Member

    Joined:
    Oct 27, 2002
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    please! anyone?
     
  3. ansigo

    ansigo Registered

    Joined:
    Feb 26, 2003
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    hi,

    if u look at the accounting.php.inc file you will see the definition of each function there.

    in case you don't have direct access to that file, here's the Grand List

    function suspend (host,$user,$accesshash,$usessl,$suspenduser)

    function unsuspend ($host,$user,$accesshash,$usessl,$suspenduser)

    function killacct ($host,$user,$accesshash,$usessl,$killuser)

    function showversion ($host,$user,$accesshash,$usessl)

    function createacct ($host,$user,$accesshash,$usessl,$acctdomain,$acctuser,$acctpass,$acctplan)

    function listaccts ($host,$user,$accesshash,$usessl)

    function listpkgs ($host,$user,$accesshash,$usessl)

    Key
    ----
    $host will be 'localhost' or the ip address of the remote system
    $user will be 'root'
    $accesshash will ge in your WHM.
    set $usessl to 0 if accessing from remote system else 1;
     
  4. jimcarter

    jimcarter Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK
  5. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    691
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    my php skills are a bit lacky, but I see $acctpass as a variable.

    Does anyone know if it is possible to modify a users password remotely with php?
     
  6. Zeustk

    Zeustk Registered

    Joined:
    Feb 7, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Yeah but how do you automaticly add a contact email...?
     
  7. zopinidi

    zopinidi Registered

    Joined:
    Mar 27, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    i think;
    createacct ($host,$user,$accesshash,$usessl,$acctdomain,$acct user,$acctpass,$acctplan,$contactmail);
     
  8. zopinidi

    zopinidi Registered

    Joined:
    Mar 27, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    oops sorry .. Feb 2004
     
  9. Tapan

    Tapan Well-Known Member

    Joined:
    Dec 4, 2004
    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandigarh
    Hi,

    According to this function: function killacct ($host,$user,$accesshash,$usessl,$killuser)

    $killuser is the username of account that is going to get killed ?

    Thanks.
     
  10. bhznat

    bhznat Active Member

    Joined:
    Jun 2, 2004
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    $accts = listaccounts($host,$user,$accesshash,0);
    print_r($accts);

    This will print WHM List Accounts page.
    Is there any solution to get accounts info as an array?
     
  11. bhznat

    bhznat Active Member

    Joined:
    Jun 2, 2004
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    I found:

    $accts = listaccts($host,$user,$accesshash,0);
    print_r($accts);

    But it will only return username, domain, plan and owner.
    How to get Email, Setup Date or even IP???
     
  12. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    691
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Did any one notice how every post in this thread is a question about how to do something?

    You could aways tear apart their scripts and write your own API.
     
  13. Tapan

    Tapan Well-Known Member

    Joined:
    Dec 4, 2004
    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandigarh
    Hi,

    By searching this forum carefully you can get answeres to all your questions. I got all the scripts i required in the order i needed them.

    Thanks.
     
Loading...

Share This Page