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.

auto-created database and user

Discussion in 'General Discussion' started by dnevins, Oct 13, 2006.

  1. dnevins

    dnevins Member

    Joined:
    Jan 31, 2005
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    On the system we use WHM on, all of our clients' accounts require a database and user created in MySQL. We have some custom software installed by the skeleton files which we'd like to be capable of automatically configuring itself the first time its run. However, the actual web scripts can't create the database and user itself.

    We do not want to require users to login to cpanel/WHM and have to manually create teh database and user with the MySQL tool. We would like for all of that to be created automatically when we create the account, and have the database name, user name, and password stored in the client's home dir, and then the web software's install script can get the data out of there to create its tables and run its config utility.

    Is there a way to do this without creating an entire addon script? If not, does anyone have any pointers on how to create an addon that registers a callback to be invoked when a new account is created?

    Thanks!
     
  2. mrprez

    mrprez Well-Known Member

    Joined:
    Jun 14, 2002
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    16
    what a coincidence

    I am looking for exactly the same thing. I managed to get it so that the skel files are loaded and one of the config files edited but am stuck on the database and user.

    I've been trying to get the guy at premierwebsitesolutions.com to write an add-on for me but can't seem to get in touch with him

    John
     
  3. dnevins

    dnevins Member

    Joined:
    Jan 31, 2005
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    There has to be at least a way to just run a script when an account is created without creating a ton of cpaddon meta-data files and stuff, isn't there? I have all the code I need to set things up, but no way to get it to automatically run. I've currently resorted to a cron job which checks the cpanel accounting log for new account creation records and extracts the necessary data from there. The only bit missing now is having access to the account's password during creation for setting up a few other services (for which we want to have a single unified password between cpanel and those services).
     
  4. xoxo

    xoxo Registered

    Joined:
    Apr 21, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
Loading...

Share This Page