COIT20266 Systems Security Administration
Week 03 [1]
COIT20266 – Systems Security Administration
Week 03 – Command Line
This week we learn some basic scripting skills and build our
knowledge on the processes that run on a server and how they can
be controlled. We also look at how the filesystem is configured
and make some basic changes to the filesystem. Before making
changes to the file system we make a clone of our Virtual Machine.
We install a text based web browser and work out how to use it.
Summary
Software we need to install
* eLinks (elinks.cz) – a program for browsing the web in text
mode.
Chapters we need to read
* 02 – Scripting and the Shell
* 05 – Controlling Processes
* 06 – The Filesystem
Tasks
Readings
Read all of the recommended chapters before modifying the
filesystem, installing the software or attempting the assessment
COIT20266 Systems Security Administration
Week 03 [2]
items. The readings will give us some background information that
should help in understanding the changes we make to the
filesystem. Read through the assessment items before making any
changes.
We must use a cloned copy of our Virtual Machine. Altering
filesystems can often result in irreversible and terminal changes
to our entire system. If we make a mistake we don’t want to have
to reinstall our complete system from scratch.
Assessment
1. Make the specified changes to your filesystem as outlined in
the separate document “Basic Filesystem Changes“. Submit a before
and after listing of your filesystem disk space usage – paste them
into the word document. If something goes wrong you can delete
the cloned server and make a new clone. Seek help on the course
forum if you have problems.
2. Submit a list of your systems Volume Groups, Logical Volumes
and Physical Volumes – paste them into the word document.
3. Install the text based web browser eLinks. [You should be able
to do this without a guide – any questions should be directed to
the course forum.]
Configure eLinks so it displays in colour and submit a screen
capture image of eLinks displaying the www.cqu.edu.au website.
4. Writing a basic shell script.
The following set of videos should help you become familiar with
basic shell scripting and file and directory structures and
permissions. Do the same tasks as shown yourself – experiment a
little if you like. This is meant to add to the required
readings. It is not a substitute for the readings. To develop
the scripts required in this course you will have to refer to the
required readings for additional details.
Note: Please use vi not nano if you work through the tutorial.
Shell Basics – echo and read – Linux Tutorial #1
Shell Basics – New Line and Screen Clearing – Linux Tutorial #2
Shell Basics – Read and Write to Files – Linux Tutorial #3
COIT20266 Systems Security Administration
Week 03 [3]
Shell Basics – Working with Files and Directories – Linux Tutorial
#4
Shell Basics Writing a Shell Script Linux Tutorial 5
Shell Basics – Changing String Case – Linux – BASH
Shell Basics – First Look at tr – Linux – BASH
Shell Basics – Using tr to Convert Case – Linux – BASH
Shell Basics – If Then Else with Integers – Linux – BASH
Write a basic shell script named addaddress.sh that prompts the
user for the following details:
* First Name
* Last Name
* Age
* Street number and name
* Suburb
* Post Code
* State
Ensure that Age is between 18 and 110 and Post Code is between
1000 and 9000. If they are not, exit the script and display a
suitable message.
Change the ‘Street number and name’ and ‘Suburb’ entries so that
they are all capital letters before appending the entered address
to the text file ‘addresses.txt’ and display the reformatted
address to the screen.
Submit both the shell script and text file with at least three
sample addresses in the text file.
5. Capture to file and submit the full output of the “ps lax”
command. Select 3 entries (rows) and describe what they are.
Submit the captured text output as pslax.txt.
6. Suppose that a user at your site has started a long-running
process that is consuming a significant part of a machine’s
resources.
a) How would you recognise a process that is hogging resources?
COIT20266 Systems Security Administration
Week 03 [4]
b) Assume that the misbehaving process might be legitimate and
doesn’t deserve to die. Show the commands you would use to
suspend the process temporarily while you investigate.
c) Later, you discover that the process belongs to your boss and
must continue running. Show the commands you would use to resume
the task.
d) Alternatively, assume that the process needs to be killed.
What signal would you send, and why? What if you needed to
guarantee that the process died?
[Source: Textbook E5.2]
7. What is the difference between hard links and symbolic (soft)
links? When is it appropriate to use one or the other? [Source:
Textbook 6.4 in 4th Edn]
How to submit:
Include all lists, answers, screenshots etc. in a single Word
document. Your addaddress.sh script, addresses.txt, pslax.txt
files and the Word document should be zipped up as week03.zip.
Don’t submit it yet – it’s not due till Week 6.
Weeks 2,3,4 and 5 need to be submitted together and all are due in
Week-6. At that time you should zip up your weeks 2,3,4 and 5 zip
files as Week2345.zip and submit it.