Register
It is currently Thu Nov 20, 2014 8:16 pm

Hosting platform for students


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Tue Feb 07, 2012 5:36 am   

Joined: Mon Dec 19, 2011 4:39 am
Posts: 2
Hi, I need to create a web hosting service for the students at the college I work at.

I am very new to bash scripting so I only know the basics.

I have got a dedicated ubuntu 10.04 server to host the websites with.

I would like help in creating a script that does the following when run:

Ask for a desired username and password.
Create a local user account on the server with the entered details.
Create a MySQL user with the entered details.
Create a symlink from /home/USERNAME/ to /var/www/USERNAME/

Thanks in advanced.
Dan


Top
 Profile  
 PostPosted: Thu Feb 16, 2012 12:09 pm   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 669
Location: Des Moines, Iowa
Sounds more like homework to me tbh.
I'll get you pointed in the right direction though.

Ask for a desired username and password. --- look at using "read -p"
Create a local user account on the server with the entered details. ----- look at using "useradd" (man useradd, pay special attention to the flags)
Create a MySQL user with the entered details. ----- look at "mysql" (man mysql) also search here for mysql examples for interacting with mysql from the command line.
Create a symlink from /home/USERNAME/ to /var/www/USERNAME/ ------- look at "ln" (man ln for more help)

Note the man pages are there to help you. IE: man COMMANDYOUWANTTOKNOWMOREABOUT


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 3 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

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP