![Page 1: ITIS 3110 LAB 02 Scripts I. 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](https://reader036.vdocuments.us/reader036/viewer/2022082517/56649eae5503460f94bb555f/html5/thumbnails/1.jpg)
ITIS 3110LAB 02
Scripts I
![Page 2: ITIS 3110 LAB 02 Scripts I. 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](https://reader036.vdocuments.us/reader036/viewer/2022082517/56649eae5503460f94bb555f/html5/thumbnails/2.jpg)
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
![Page 3: ITIS 3110 LAB 02 Scripts I. 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](https://reader036.vdocuments.us/reader036/viewer/2022082517/56649eae5503460f94bb555f/html5/thumbnails/3.jpg)
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
![Page 4: ITIS 3110 LAB 02 Scripts I. 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](https://reader036.vdocuments.us/reader036/viewer/2022082517/56649eae5503460f94bb555f/html5/thumbnails/4.jpg)
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
![Page 5: ITIS 3110 LAB 02 Scripts I. 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](https://reader036.vdocuments.us/reader036/viewer/2022082517/56649eae5503460f94bb555f/html5/thumbnails/5.jpg)
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
![Page 6: ITIS 3110 LAB 02 Scripts I. 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](https://reader036.vdocuments.us/reader036/viewer/2022082517/56649eae5503460f94bb555f/html5/thumbnails/6.jpg)
SCRIPTS I HINTS Stage 1
![Page 7: ITIS 3110 LAB 02 Scripts I. 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](https://reader036.vdocuments.us/reader036/viewer/2022082517/56649eae5503460f94bb555f/html5/thumbnails/7.jpg)
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
![Page 8: ITIS 3110 LAB 02 Scripts I. 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](https://reader036.vdocuments.us/reader036/viewer/2022082517/56649eae5503460f94bb555f/html5/thumbnails/8.jpg)
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
![Page 9: ITIS 3110 LAB 02 Scripts I. 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](https://reader036.vdocuments.us/reader036/viewer/2022082517/56649eae5503460f94bb555f/html5/thumbnails/9.jpg)
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
![Page 10: ITIS 3110 LAB 02 Scripts I. 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](https://reader036.vdocuments.us/reader036/viewer/2022082517/56649eae5503460f94bb555f/html5/thumbnails/10.jpg)
SCRIPTS II HINTS
![Page 11: ITIS 3110 LAB 02 Scripts I. 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](https://reader036.vdocuments.us/reader036/viewer/2022082517/56649eae5503460f94bb555f/html5/thumbnails/11.jpg)
Improve addpermplus.sh• 1st parm must be only u, g, o, or a• 2nd parm must be only r, w, or x• 3rd 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
![Page 12: ITIS 3110 LAB 02 Scripts I. 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](https://reader036.vdocuments.us/reader036/viewer/2022082517/56649eae5503460f94bb555f/html5/thumbnails/12.jpg)
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 1st login
![Page 13: ITIS 3110 LAB 02 Scripts I. 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](https://reader036.vdocuments.us/reader036/viewer/2022082517/56649eae5503460f94bb555f/html5/thumbnails/13.jpg)
Random Password• Use Google to find simple script• If you have openssh installed it is a simple one-liner
![Page 14: ITIS 3110 LAB 02 Scripts I. 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](https://reader036.vdocuments.us/reader036/viewer/2022082517/56649eae5503460f94bb555f/html5/thumbnails/14.jpg)
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
![Page 15: ITIS 3110 LAB 02 Scripts I. 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](https://reader036.vdocuments.us/reader036/viewer/2022082517/56649eae5503460f94bb555f/html5/thumbnails/15.jpg)
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
![Page 16: ITIS 3110 LAB 02 Scripts I. 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](https://reader036.vdocuments.us/reader036/viewer/2022082517/56649eae5503460f94bb555f/html5/thumbnails/16.jpg)
GET STARTED