CIT final
set user password
echo 'Password01' | sudo passwd --stdin userName
Now you need to use fdisk and mkfs to create a new ext3 formatted drive from your 2nd hard drive.
lsblk, sudo fdisk /dev/sdb, n, sudo mkfs.ext3 /dev/sdb1, sudo mkdir /mnt/backup
Create a new folder under teacher-share called cit-225.
sudo cd /school/teacher-share sudo mkdir /school/teacher-share/cit-225
Create a file in the teacher-share/cit225 folder called CIT-225-StudyGuide.txt Add a line that says STUDY AND PRACTICE A LOT!
sudo cd /school/teacher-share/cit-225 echo "STUDY AND PRACTICE A LOT!" > CIT-225-StudyGuide.txt sudo chown root:Teachers CIT-225-StudyGuide.txt sudo chmod 760 CIT-225-StudyGuide.txt
(Create a new folder under teacher-share called cit-225.) Give all student users the rights to only read files in that folder.
sudo chmod 764 /school/teacher-share/cit-225 sudo chown root:Teachers /school/teacher-share/cit-225
Create groups
sudo groupadd groupName
Use a compression utility to compress the passpolicy.pdf from above and save it in backup.
sudo gzip /school/teacher-share/CYBR445/passpolicy.pdf -c > /school/backup/passpolicy.pdf.gz **sudo chown -R your_username: /mnt/backup
Create a logical volume:
sudo lvcreate -L 20M -n backup2 myvg sudo lvdisplay
Create a folder under /mnt called backup2:
sudo mkdir /mnt/backup2
Create a directory called school in the root of the file structure (/school)
sudo mkdir /school
Create a sub directory under school called student-share Give all student users the rights to Read and Write files in that folder.
sudo mkdir /school/student-share sudo chmod 760 /school/student-share sudo chown root:Students /school/student-share
Create a sub directory under school called teacher-share Give all teacher users the rights to Read and Write files in that folder.
sudo mkdir /school/teacher-share sudo chmod 760 /school/teacher-share sudo chown root:Teachers /school/teacher-share
Login as your user and pretend you got an email from Dr. Clark asking you to copy the Password-PolicyFile from her folder to a new folder under the teacher share call CYBR445. Don't move it, just copy it she says. Make sure Captain Hook and Micky Mouse have access to read it. Also, she wants the name shortened to passpolicy.pdf
sudo mkdir /school/teacher-share/CYBR445 sudo cp /home/uclark/Downloads/password_policy.pdf /school/teacher-share/CYBR445/passpolicy.pdf
Format the logical volume as ext3:
sudo mkfs.ext3 /dev/myvg/backup2
Use the mount command to mount it under /mnt/backup.
sudo mount /dev/sdb1 /mnt/backup
Mount the logical volume:
sudo mount/dev/myvg/backup2 /mnt/backup2
From the remaining 2 drives you created, use the pvcreate command to add the 2 drives to physical volume
sudo pvcreate /dev/sdc /dev/sdd sudo pvdisplay
Give Donald Duck and Micky Mouse the permissions needed to read the CIT-225-StudyGuide.txt (Not Captain Hook)
sudo setfacl -m u:dduck:r CIT-225-StudyGuide.txt sudo setfacl -m u:mmouse:r CIT-225-StudyGuide.txt
Create users
sudo useradd -m -s /bin/bash -c "Full Name" -G groupName -U userName
Create a volume group:
sudo vgcreate myvg /dev/sdc /dev/sdd sudo vgdisplay
Use your favorite command to view a list of your running processes and then view ALL running processes.
top, q