The objectives of this lab experiment are to make you :
[Since this is your first lab in this course, a little bit of introduction regarding the structure of this document is in order. All future lab descriptions will have the same section structure as shown in the Table of Contents. The due date for the labs is shown on the course home page. The material described in the Background section should be studied long before a corresponding scheduled lab session, and certainly before you begin the actual Lab Experiment.]
The OSIS Lab (429 Russ) has 30 PCs, all networked. Each PC can be independently booted by students into one of several variations of Linux, or Windows XP Professional. Each PC is set up so that it can be run "properly" even when disconnected from the network.
The ceg233nn form of of user names are valid only in the OSIS Lab (429 Russ). While we do not prevent connections to any host, we do not permit remote logins to the machines in the Lab.
Even though security in the OSIS Lab is deliberately loose so that it is a playground for security courses, we take ethics and personal responsibility seriously.
The following are applicable to all your work (labs, projects, home work, and exams) in the course, and will not be repeated in other handouts.
In the OSIS Lab, the PCs are installed with Linux Ubuntu and Windows XP. In general, 32-bit or 64-bit does not matter in CEG233, except when explicitly required in a specific lab experiment.
These projects must be work done solely by you, except for any of the parts I provided during this term.
For work required to be done on Linux, you may use any Linux distribution that you prefer. For work required to be done on Windows, you may use either XP or Vista. Doing the lab work on an operating system other than the OS explicitly named constitutes cheating.
Post all your questions, helpful comments, criticisms, and suggestions regarding this project to our discussion group. I am hoping for a lively discussion leading to good answers and clarifications. Keep an eye on this group.
All submissions are done using the turnin program located in /home/ceg233/ceg23300/bin
on all the Linux machines in the OSIS Lab. Its first argument is the "name"
of the lab, which is uppercase L followed by one digit, e.g., L1. Following this
are the names of files that you intend to submit. So, for this part, the command
line may look like this:
/home/ceg233/ceg23300/bin/turnin L1
ReadMe.txt myLabJournal.txt answers.txt
assuming that you are in the directory containing the files named above and
relevant only to
this lab. It is ok to use turnin for a given Lab# multiple times; as long
as the file names are the same as before, the older files will be replaced by
newer ones. You will get an "ls -l" listing of files you turned in.
The following files with names exactly as indicated,
are almost always
required in each lab.
myLabJournal.txt: This plain text file is like a
diary entry. As you do your work in the lab, enter your observations
into this file. You can typically do this via copy-and-paste of the
lines you tyoed followed by the output of the commands with some additional
thoughts written up.answers.txt: This plain text file is a collections of
answers to specific items listed in the Grading Sheet and other asked in the
lab experiment.Note that at the risk of losing 10 points, you can email the files to your
grader. If you are a commuter, email the files before the due date, and on
or before the date of next class, turnin the same files.
Note that there are different turnin programs specific to a course. For 233, you must use /home/ceg233/ceg23300/bin/turnin (no spaces) and invoke it from Linux (not Windows).
A grading sheet will be shown as part of every lab/project. You should check with the grade sheet to be sure that you have attempted all that was required.
We try to read your code. But we depend mostly on observed execution of your code.
All work for this course is expected (but not required) to be done in the Operating Systems and Internet Security Lab (429 RC) . If you wish, use your home Unix/Linux/Windows machines, or those in other labs. However, our grading of your submitted project work includes the execution by us only on OSIS Lab machines.
Bonus points are awarded in recognition of good work, in addition to the max possible points. Quality is subjectively judged. Merely turning in a file will not receive full score.
Some of the above have a cascading effect.
Events. A keyboard key press is an event. Key release is an event. Mouse
button presses and releases are events. And so on. Time stamp of an event.
Events are coupled to certain actions. Modern OSs are event driven.
Linux GUI: KDE, and Gnome Desktop Environments.
Cut-and-paste. KDE cut and paste buffer. Highlighting, ^C and ^V bindings are
similar to Windows. Additionaly, middle mouse button click can paste what is
currently highlighted.
Explained all the window decorations. Underlined characters --> ALT+that-key.
Exercise: Login to Linux in the OSIS Lab. Experiment and become comfortable
with all the above. Tryout Konqueror. Browse through all the URLs you see.
Shells. Windows: cmd and command. Linux: sh, csh, tcsh, ..., bash, ...
Bourne Again Shell.
bash is an interpreter of a shell langauge. The shell language is also called
bash. All shell languages are legitimate programming
languages. Defined by grammars. Compilers and interpreters have parsers that
analyze the "sentences" of a programming language to "recognize" them. Grammars
are defined not at the level of character sequences, but at the level of "words"
(called tokens).
E.g., the character sequence "ls -lisa dir01" becomes the token sequence w0, w1,
w2 where w0=="ls", w1=="-lisa" and w2=="dir01". The spaces that separate the
tokens do not contribute any tokens; they just "delimit" the tokens. Where you
used one blank, you could have used a dozen, and it would not alter the
tokenization. This procedure is also called Lexical Analysis.
bash treats w0 as the name of a program file. For the ls-line discussed, it
counts the number of arguments (argc) as 3. It constructs an argv[] vector
(synonym for array) of argument strings. It then invokes exec system call of the
OS. Recall that the main method of most programs is declared (say using C++) as
int main(int argc, char * argv[]).
Back to w0. This is a name of a file that should be executable. The bash shell
has a variable called PATH, whose value is a sequnce of directory names. E.g.,
PATH=/bin:/usr/bin:/usr/local/bin
is listing the absolute path names of three directories. The colon separates
the names. bash searches for a file name given by w0 in
each of the directories of PATH, from left to right. If the list is exhausted,
you get a command-not-found error.
A dot by itself stands for the current directory (i.e., where you are at). You
would typically want to insert the dot in the PATH. At the very front!
Learn the commands listed here. You cannot claim to be Linux-familiar unless you have used
them all a few times. Especially, learn to use the man pages,
and the script (read man script) command.
This is an alphabetical list of standard Linux/Unix commands that you will/should be familiar with. The word "show" or "print" below means display to the stdout. If you are beginning to learn these commands, do not try them (i) alphabetically, (ii) without first looking them up (at least to figure out how to "exit" / kill a command).
| bash | Bourne-Again Shell |
bg | background |
| cat | show each file in sequence |
| chmod | change the permission on a file |
| chown | change the owner of a file |
cmp | compare two files |
| df | show mounted volumes, etc |
diff | show the differences between two files |
| du | show disk blocks used for one or more directories |
echo | shell built-in: echo/print arguments given |
| emacs | the all-powerful text/binary editor |
| env | lists the current environment variables |
fg | foreground |
file | guess what kind a file is |
grep | print lines matching a pattern |
kill | kills a running program |
| ln | creates a link between two files; try ln -s |
| ls | list contents of directory; try ls -lisa |
ltrace | show lib calls made |
| links | WWW/News/Mail browser; try links news:wright.ceg.433 |
| man | show reference pages; try man -k |
more | pagination |
od | octal dump; try od -x file-name |
ps | shows current processes |
| set | set/get and show the values of shell variables |
sftp | transfer files securely to/from a remote machine |
| source | shell built-in: execute the cmds in a file |
ssh | remote login securely |
strace | show sys calls made |
time | a prefix to commands, times the command and prints page faults etc. |
top | like ps, but with continuous updates |
| umask | get/set the file mode creation mask |
vi | text editor |
| w | who is on the system, and what they are doing |
wc | word count, etc |
All work is expected, but not required, to be carried out in the Operating Systems and Internet Security (OSIS) Lab, 429 Russ. But, you are welcome to work wherever. Note that use of both Linux and Windows and other software, that may not always be installed in other facilities, may be needed.
[This is the first lab and there are items in the experiment that we are yet to go over in the next day or two.]
"Explain/Describe", as used below, stands for explaining things in the file named
answers.txt using your own words, not cut-and-paste of some web search
results. This
answers.txt file and myLabJournal.txt do have substantial
overlap. If you wish, generate
answers.txt from myLabJournal.txt after you finish the
listed tasks.
In Linux
ReadMe.txt, myLabJournal.txt, answers.txt
files as described in
Expectations. Note that you will be editing these files both in Linux
and Windows. Use any text editor you like (e.g., kate in Linux and
WordPad in Windows) to edit these files.
Explore and explain if the cut-and-paste model of Windows works in Linux.konsole) window. Demonstrate that you
properly invoked at least 10 of the commands from
Minimal List of Unix
Commands (other than emacs and vi) by pasting
a few lines into answers.txt from the input/output of each
command you tried. bashrc is. .bash_history
is. alias is. Add the following
alias to your .bashrc file:
alias turnin=/home/ceg233/ceg23300/bin/turnin.
turnin), and
explain it.ps and wc.In Windows
answers.txt file the numbers you see for System Idle
Process and any two among the remaining processes. Record how many
processes were running. Use wordpad or someother program
(not notepad) to edit files created in Linux.cmd. Invoke set. Explain any 5 of
the items displayed.answers.txt to your account in
unixapps1.wright.edu using any ssh/sftp client program,
and explain how you did it. Note that the username you use for this
machine is the one given to you by WSU, which is of the form w123xyz,
not the one this course gave you, which is of the form ceg233nn.turnin L1 ReadMe.txt myLabJournal.txt answers.txt
![]() |
Grading Sheet for
Instructor = Prabhaker Mateti |
| Student | LoginID | Bonus | Points |
| Item description | MaxPts | Points |
Readme.txt exists with content as described in the
Expectations |
10 | |
| Explore Linux KDE, and customize any 5 of eye candy items | 10 | |
| Learnt at least 10 of Minimal List of Unix Commands | 2*10 | |
Explain what .bashrc is in answers.txt |
05 | |
Exaplain what .bash_history is in answers.txt |
05 | |
Explain what an alias is in answers.txt |
05 | |
Define a new alias of your own (other than turnin), and explain it in answers.txt |
10 | |
Task Manager of Windows XP exploration answered in answers.txt |
10 | |
| Discover the full path name of "My Documents" | 05 | |
| Explain any 5 of the items displayed by set in cmd | 10 | |
| Customize what ever sftp client you used | 05 | |
Transfer the file answers.txt to your account in
unixapps1.wright.edu |
05 | |
| Late submission -2% per day late; not accepted after 2 days | -- | |
| Extraneous files submitted: -2 points per file | -- | |
Files were not submitted using turnin program: -10 points |
-- | |
| Total | 100 |
| Copyright © 2009 pmateti@wright.edu | last edited: September 03, 2009 |