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.

Automatic Account Creation

Discussion in 'General Discussion' started by bdraco, Feb 10, 2002.

Thread Status:
Not open for further replies.
  1. bdraco

    bdraco Guest

    Automatic Accounts

    I'm thinking about doing this via a perl module.

    IE

    use Cpanel::Accounting;

    $acctmkr = new Cpanel::Accounting;
    $acctmkr-&host = 'cpanelmachine.com';
    $acctmkr-&user = 'reseller/root';
    $acctmkr-&accesshash = 'md5hash here';
    ($status,$result) = $acctmkr-&createacct('domain.com','user','pass','plan');
     
  2. wadearnold

    wadearnold Well-Known Member

    Joined:
    Jan 13, 2002
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    This would be great

    This would then create the account right away? Or would it add it to the process signups link?
     
  3. bdraco

    bdraco Guest

    [quote:edd2918bb3][i:edd2918bb3]Originally posted by wadearnold[/i:edd2918bb3]

    This would then create the account right away? Or would it add it to the process signups link? [/quote:edd2918bb3]

    It would create it right away...
     
  4. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    This is somthing i would not use. Maybe somthing like this could be a plugin or somthing. Like mod_gzip and JSP. If you want it you can download the Process Signups bin and install it. Then it could add a process signup's section to WHM. (Like JSP does)
     
  5. jumpdomain

    jumpdomain Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    16
    That would be great... It would keep us from having to modify the wwwacct script to automatically setup accounts.
     
  6. rbro

    rbro Well-Known Member

    Joined:
    Jan 31, 2002
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    Would this be for automatically signing up reseller accounts? That would be very useful to us. So would integration with Authorizenet. I'm not as interested in a sign up form for single domain accounts, but maybe that's just me......
     
  7. gorgo

    gorgo Well-Known Member

    Joined:
    Jan 9, 2002
    Messages:
    148
    Likes Received:
    0
    Trophy Points:
    16
    How about use signup.cgi to take the signups, then use the process signups feature in WHM to approve them...

    I have seen both these options in WHM, BUT, I've never actually seen them used...
     
  8. bert

    bert Well-Known Member

    Joined:
    Aug 21, 2001
    Messages:
    602
    Likes Received:
    0
    Trophy Points:
    16
    I agree with shaun, I rather see it as a plugin. I do not like total automation for creating accounts. I rather examine the order first. Nowdays with these spammer crooks and everything else, fully automated account creation is not the way to go.

    Just my 2 cents.
     
  9. wadearnold

    wadearnold Well-Known Member

    Joined:
    Jan 13, 2002
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    signup.cgi

    I was never able to get the signup.cgi to work. I guess I did not take that much time. I think most people would like to see documentation on this part of the &existing& system. I would love to use both options. I would implement the signup.cgi tonight if I knew how I could code to it. I need to know what the standard is for coding to it. I am sure I could figure out a hack but I would not want a new release to break my signup process.
    cheers;
    wade
     
  10. bdraco

    bdraco Guest

    [quote:c906ba3934][i:c906ba3934]Originally posted by bert[/i:c906ba3934]

    I agree with shaun, I rather see it as a plugin. I do not like total automation for creating accounts. I rather examine the order first. Nowdays with these spammer crooks and everything else, fully automated account creation is not the way to go.

    Just my 2 cents.[/quote:c906ba3934]

    Its a perl module for inclusion in your [b:c906ba3934]own[/b:c906ba3934] signup script .. there will be a php one as well .. You are by no means forced to use it.
     
  11. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    ok, sounds good. So does that mean signup.cgi and the process signup's in WHM are going to be removed or that stuff still a project to be finished?
     
  12. bdraco

    bdraco Guest

    I'm looking for beta testers for this one.. Here is what works so far.. the only thing I really see anybody else needing it listaccounts ... I'm getting ready to do a php version of this soon, so please let me know if you are going to need anything besides the functions below and listaccounts

    #!/usr/bin/perl
    BEGIN {
    push (@INC,&/usr/local/cpanel&);
    }
    use Cpanel::Accounting;

    my($whm) = Cpanel::Accounting-&new;

    $whm-&{host} = &localhost&;
    $whm-&{user} = &testuser&;
    $whm-&{accesshash} = 'hash from whm';

    $response = $whm-&killacct(&someuser&);
    print $response;

    my %PKGS = $whm-&listpkgs();
    foreach $package (sort keys %PKGS) {
    @PKCTS = @{$PKGS{$package}};
    print &$package @PKCTS\n&;
    }

    #domain,user,pass,package
    $response = $whm-&createacct(&cptest.net&,&cpred&,&rtest&,&mypkg&);
    print $response;


    $response = $whm-&suspend('someuser');
    print $response . &\n&;
    $response = $whm-&unsuspend('someuser');
    print $response . &\n&;
     
  13. wadearnold

    wadearnold Well-Known Member

    Joined:
    Jan 13, 2002
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    remote server support

    I would really like to be able to create accounts on remote servers. I see that you have in your object the variable host. In the future am I going to be able to specify the host name that I would like the account created on?
    Could this be written to the same port that is listening for account transfers?

    An idea would be to setup an XML daemon that would listen, parse, execute account creations? Then we could use any programming language that we want to create the front end. I know that you are creating this in php but if we went the xml route then php, asp, jsp, perl, etc would all work. For local host we could just use loop back to the same port. People could firewall the port and setup trusts for there remote servers. Let me know your thoughts. I would be more than willing to help you on this project.

    Wade &luv& Arnold
    -- that's for you mama
     
  14. rbro

    rbro Well-Known Member

    Joined:
    Jan 31, 2002
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    Will it create resource based reseller accounts as well?
     
  15. bdraco

    bdraco Guest

    [quote:d018e21d98][i:d018e21d98]Originally posted by rbro[/i:d018e21d98]

    Will it create resource based reseller accounts as well?[/quote:d018e21d98]

    You'll just need to put in the reseller username as the user and the access hash from their WHM.
     
  16. bdraco

    bdraco Guest

    http://web.cpanel.net/manual/remoteaccess.html

    Here is the documentation on this feature..
     
  17. bens

    bens Member

    Joined:
    Aug 15, 2001
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Thank You for this script!
    It makes a ton of features much easier now!

    Thank You!! :) :)
     
  18. greg

    greg Active Member

    Joined:
    Sep 4, 2001
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    A slightly bizarre request, but our site and business works on the basis the customer chooses the amount of space s/he wants and the site will offer a price and a certain nubmer of features (a formula returns the number of subs, databases etc. the customer gets)..

    Would it be possible to set it up so instead of specifying the package it creates, you specify the specs of the account (ie. # ftps, pops, subs etc)

    NOTE: I dont mean replace the ability to request the package, but have this as an alternative.

    Thanks in advance.
     
  19. wadearnold

    wadearnold Well-Known Member

    Joined:
    Jan 13, 2002
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    custom package specs

    I really need this option too! We do customizable webhosting were people can configure there own package. This would be a needed upgrade for me to take advantage of this feature.
    Thanks!
    wade
     
  20. acer2k

    acer2k Well-Known Member

    Joined:
    Nov 12, 2001
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    I too would like to be able to create accts with custom specs. Please tell me how to do that :)
     
Loading...
Thread Status:
Not open for further replies.

Share This Page