Download presentation
Presentation is loading. Please wait.
Published byLaura Wood Modified over 9 years ago
1
ITIS 3110 LAB 02 Scripts I
2
Lab IDs Your Lab ID is the same as your 49er ID The PW is different: a + your 800 id a800123456 Note: sometimes the a is not required Change the password ASAP passwd Follow the instructions
3
Scripts I and II Two parts to this lab: Scripts I (due next week) Entering simple scripts Testing Documenting Simple modifications on some Scripts II (last half of semester) Writing your own Major improvements to addpermplus Create new accounts
4
Make life easy hint: Start writing your own scripts to make running and maintenance of your VMs easier Example Create two network interfaces templates One for DHCP One for a specific address Write a script to: Stop the network Copy a template to replace the current interfaces record Start the network Once written and debugged changing configurations will be a quick error free task
5
Scripts II Suggest: Review Scripts I and II requirements Complete Scripts I this lab period Between Scripts I and II: Review what the individual exercises showed in Scripts I Review the requirements for the two Scripts II parts Many of the mini-scripts in Scripts I can be used in Scripts II Have the code ready to type in Scripts II
6
SCRIPTS I HINTS Stage 1
7
Scripts Read the instructions carefully! If you type in the examples verbatim many of them WILL NOT work! Understand and follow the steps in “Getting Started” or you will suffer pain doing the lab. Many of the scripts in the exercise can be use for parts of Scripts II Scan what is needed for Scripts II Keep those requirements in mind as you do Scripts I Note what you may reuse or modify to do Scripts II
8
Deliverables Scripts I Documentation showing working and non-working scripts as appropriate Show code being tested and the results Important: Show incorrect data is properly rejected (if appropriate) E.g. wrong length PWs Show correct data accepted (as appropriate) Copy of the Lab with comments (optional) What worked Typos Comments on what was instructional and what wasn't and why Estimate of amount of time spent on lab Upload to Moodle.doc file
9
Warning MS Office has decided it doesn’t like spaces Some of the spaces between words has been eliminated Most (hope all) have been replaced Most occurred between font style changes Let the instructor know if you find a missing one
10
SCRIPTS II HINTS
11
Improve addpermplus.sh 1 st parm must be only u, g, o, or a 2 nd parm must be only r, w, or x 3 rd parm must be a valid name You decide what are your requirements for a valid name: size characters anything else Document your choice Why these requirements Test and document it's working Show proper passes & rejections
12
Create new accounts Source for the new IDs will be an Excel file Contains firstname and lastname Convert (save) Excel.xls .csv file Read the csv file to generate usernames Up to first 6 character of lastname last 2 characters of firstname first Concatenate last + first for the username Create an account for each user Home directory Assign a random pw Your choice for length (but at least 6 chars) Your choice for chars (but at least 1 alpha and 1 numeric) Record the pw somewhere so it can be sent to the user Recommend creating a new.csv file with the first name, last name, user name and pw Can be viewed with a text reader or spreadsheet Force new PW when 1 st login
13
Random Password Use Google to find simple script If you have openssh installed it is a simple one-liner
14
Deliverables Scripts II Document results of running the code Before After Estimate of amount of time spent on lab Upload to Moodle.doc file for report Enhanced addpermplus code New accounts code You might not get this lab back Since this is the second time for this lab it may be liberally graded
15
Last hints sh Bourne shell bash Bourne again (bash) shell The systax between them is very similar Some script code will work in either Some script code will work differently depending on the shell Make sure you are running the right shell when you script is executed
16
GET STARTED
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.