LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-24-2015, 12:11 PM   #1
CubeDev
LQ Newbie
 
Registered: Jun 2015
Posts: 5

Rep: Reputation: Disabled
Script for completing multiple tasks


Hello,

I do not really know where this should go. But I guess this is the best place.

My Question:


I have vServer running Debian 7 and with it a Apache2 server. I need these commands to be executed when I open a .sh file.

First I'd like a dialog to come up and ask for X (username) and then another one for Y (Password).

What is the username?
X
What is the password?
Y

Then these command should be executed:

useradd X --home /var/www/X/ -s /bin/false
passwd Y
X
mkdir /var/www/X/
chown X:X -R /var/www/X/

How should the script be? I am a newbie to .sh scripts.

I hope you understand what I mean.
 
Old 06-24-2015, 01:09 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Welcome to LQ!
Have a look at http://tldp.org/LDP/Bash-Beginners-G...ect_08_02.html
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Crontab script not completing deepGC Linux - Newbie 9 06-07-2015 03:28 PM
cgroups - tasks in multiple hierarchies and same subsystems selaci Linux - Security 0 10-17-2014 07:44 PM
[SOLVED] if statement with multiple tasks ted_chou12 Linux - Newbie 3 02-02-2011 06:59 PM
[SOLVED] How to make a C app do multiple tasks simultaneously? yaplej Programming 6 10-24-2010 07:09 AM
semaphore with multiple tasks Rama Anandakrishnan Linux - Kernel 3 08-01-2007 06:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration