Script for generating new accounts

  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 28, 2004
  • Posts: 1127
  • Loc: San Diego
  • Status: Offline

Post April 6th, 2010, 9:58 am

Is there a simple script to generate a new account with website? Let's see if I can make a checklist if I was going to make a script:

./newaccount klaircri klaircristiani.com password

Create user and group $1
Create DNS .db and add to named.conf (ftp, www, mail, $2)
Create conf.d/$1.conf file with apache settings
Make log file symlink for apache
Set up mail host (dont know how to do this command line, have only done this on webmin)
Restart named and httpd so settings take effect

What else? I want to make a script that does this for me so I can type ./newaccount newdomai newdomain.com 121212 and have instant website, FTP and mail settings
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post April 6th, 2010, 9:58 am

  • sequencehosting
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Feb 25, 2010
  • Posts: 6
  • Status: Offline

Post April 6th, 2010, 10:52 am

Hello,

If you have cPanel/WHM installed on your server they already have a pre-made script to do exactly that. It will be located at /scripts/ on a cPanel server.

Jack
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 28, 2004
  • Posts: 1127
  • Loc: San Diego
  • Status: Offline

Post April 6th, 2010, 12:08 pm

I actually want a script that I can do about 25 or so at a time, rather than point-and-click in cpanel...
  • sequencehosting
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Feb 25, 2010
  • Posts: 6
  • Status: Offline

Post April 6th, 2010, 12:13 pm

I'm not quite sure what you mean by point and click in cPanel. I'm talking about creating accounts using the cPanel scripts via SSH.
  • camperjohn
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 28, 2004
  • Posts: 1127
  • Loc: San Diego
  • Status: Offline

Post April 6th, 2010, 4:34 pm

Oh, I didn't know you could do that - see, now I'm learning something!

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 41 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.