Complete the Unix scripts

| Firewall // 1pt

Open the following ports and services: 443, http

| Account Management // 3 pts

From the csv, use the OS as the filter to complete the following tasks.

– Add each username and make sure to place it on the correct base dir. You can check the /etc/passwd to ensure it is correct.

roary001:x:1000:1000::/home/__OS__ /__COUNTRY__ /roary001:/bin/bash

– Each username must be part of the right primary group. See filter below

roary001:x:1000:1020::/home/__OS__ /__COUNTRY__ /roary001:/bin/bash

– Each home folder must contain the corresponding files. See filter below

– Add the right content to the about file.
* All text must be lower case
* Single space characters
* No extra characters at the end of the document

| MAC

– Base directory = /home/mac/

– Primary group = color

$ ls /home/mac/canada/roary001/

.DS_Store
about

$ cat /home/mac/canada/roary001/about
first last

dob

| WINDOWS

– Base directory = /home/windows/

– Primary group = fruits

$ ls /home/windows/mexico/roary002/

Thumbs.db
about

$ cat /home/windows/mexico/roary002/about
last first

shell

Ubuntu // 4pts

| Firewall // 1pt

Open the following ports and services: 21, 22, 53, 143, 443

| Apache2 // 3pt

Install Apache on the server

$ apt-get install apache2

From the csv, use the permission as the filter to complete the following tasks. 

– Create a base directory under the /var/www/html for each permission

/var/www/html/permission/   // all, create, delete, drop, execute, insert, select, update

– From the CSV, filter all users that match each permission and create a new directory for each month of the year for which your users were born. 

fh7058,forrester,hochstein,m,august 9 1998,ghana,plum,bananas,mac,/bin/tcsh,execute

gm1513,greydon,merrick,m,september 21 1992,bahrain,medium_aquamarine,grapes,mac,/bin/csh,select

iw7165,iriana,weick,f,august 20 1987,cyprus,medium_purple,plums,windows,/bin/tcsh,select

/var/www/html/select/september

– Inside of each folder above, create an index.html file and add all matching users data int the following order: country,color,fruits,os,shell,username,first,last,gender

cat /var/www/html/select/september/index.html

bahrain,medium_aquamarine,grapes,mac,/bin/csh,gm1513,greydon,merrick,m

Fedora // 2pts

// scripts

All scripts must be placed on the /root folder.

Scripts can not be executed prior to submission. This will cause issues.

Make sure to test your scripts before turning in the assignment.

* Ensure that all file references in your scripts are absolute paths.

| useradd

Create a script named useradd.sh. This script will complete the same steps outlined on CentOS, but will run them on demand.

| httpd

Create a script named httpd.sh. This script will complete the same steps outlined on Ubuntu, but will run them on demand.

* Keep in mind that to install apache2 on Fedora you need to use the command below. The folder structure for the web server is the same.

$ dnf install httpd.

Tags: No tags