Reflective Writing Assignment

During this course, I have learned about several topics related to cybersecurity ethics. Here are three of them, along with my thoughts and takeaways on each:

1. Privacy versus Security

Throughout the course, we have explored the complex relationship between privacy and security. Privacy should be the top priority, as individuals have the right to protect their personal information from unauthorized access and use. However, as we delved deeper into the subject matter and examined the various cybersecurity threats, I began to recognize the importance of implementing effective security measures to safeguard sensitive data and prevent cyber attacks.

While I still value the importance of privacy, I appreciate the need for some level of surveillance and data collection to maintain information systems’ security. I have learned that balancing privacy and security is crucial and may need adjusting depending on the specific circumstances. My key takeaway from this topic is that while the tension between privacy and security can be complex and challenging, ensuring that both principles are upheld and protected is essential.

2. The Role of Corporations in Cybersecurity

During our recent conversation, we had a chance to explore the crucial role of corporations in maintaining cybersecurity. Initially, I had always believed that the primary responsibility of protecting personal devices and data lay with the individuals themselves. However, after our enlightening discussion, I realized that corporations also have a significant commitment to protect their customers’ data and must take proactive measures to prevent cyber attacks.

As customers, we trust the companies we interact with and have the right to expect a certain level of data protection. Therefore, corporations must be held accountable for their cybersecurity practices and take all necessary steps to safeguard sensitive information.

Our conversation made me realize that a company’s cybersecurity measures can directly impact the safety and well-being of its customers. Therefore, it is in the company’s and its customers’ best interest to prioritize cybersecurity and take proactive steps to prevent any potential breaches. Ultimately, our discussion reaffirmed the importance of holding corporations accountable for their cybersecurity practices and ensuring they take the necessary measures to protect their customers’ data.

3. Cyberbullying and Online Harassment

In our recent discussion, we delved into the issue of cyberbullying and online harassment. Initially, I thought these were minor inconveniences people should learn to ignore. However, through our conversation, I came to understand that cyberbullying and online harassment can have far-reaching psychological effects on victims. Moreover, in extreme cases, they can even lead to physical harm. It was distressing to learn that many people suffer in silence as a result of such abuse, and these issues are not always taken seriously by society.

From our discussion, I realized that we all are responsible for creating a safer and more respectful online environment. This includes being mindful of our online behavior and our words’ impact on others. It’s also essential to take action if we witness or experience cyberbullying or online harassment. This could involve reporting the abuse to the relevant authorities or contacting the victim to offer support and solidarity.

In short, our discussion highlighted the importance of being a responsible and empathetic online citizen. By taking proactive steps to prevent and address cyberbullying and online harassment, we can help create a more inclusive and equitable online community for all.

As I reflect on the learnings from this course, I realize how significantly it has impacted my perception of the ethical considerations surrounding cybersecurity. The course has effectively highlighted the multifaceted nature of cybersecurity challenges and provided me with a comprehensive understanding of the moral implications involved. These insights will undoubtedly play a pivotal role in shaping my future interactions with technology and my fellow human beings online as I strive to be a responsible and ethical user of technology.

5.4. Case Analysis on Whistleblowing

In the video “Collateral Murder,” released by Chelsea Manning in 2010, the chilling
footage captured from an Apache helicopter provides a disturbing glimpse into the realities of
modern warfare. Set in Baghdad, Iraq, the video portrays a U.S. military airstrike that resulted in
the deaths of several individuals, including two Reuters journalists. Manning, a former
intelligence analyst in the United States Army, decided to leak this footage along with a trove of
classified documents to WikiLeaks. Manning’s motivation for releasing the material was rooted
in her belief that the public deserved to know the truth about the actions of their military forces.
She argued that the footage exposed potential war crimes committed by the U.S. military and
highlighted the indiscriminate nature of armed conflict. Manning’s actions ignited a fierce debate
about the ethics of military conduct and the role of whistleblowers in holding institutions
accountable. This case raises complex moral questions regarding the duty of soldiers to uphold
loyalty to their country versus their obligation to expose wrongdoing. It challenges traditional
notions of patriotism and asks us to consider where our allegiance should lie when confronted
with evidence of injustice. In this Case Analysis, I will argue that virtue ethics shows that
Manning did not act out of loyalty to the United States and that her actions were a moral
whistleblowing case.
In his article “Whistle Blowing and Rational Loyalty,” Vandekerckhove delves into
rational loyalty and its correlation with whistleblowing. The term rational loyalty denotes loyalty
that is grounded in moral principles rather than self-interest. Vandekerckhove posits that rational
loyalty should be the fundamental guiding principle of behavior within organizations, as it plays
a crucial role in maintaining the organization’s integrity. By prioritizing ethical values above
individual gains, employees can remain steadfast in their commitment to the organization’s
mission and values. Furthermore, rational loyalty can foster a culture of trust and accountability, enhancing an organization’s reputation and helping it retain top talent. Overall,
Vandekerckhove’s article underscores the importance of rational loyalty as a critical driver of
ethical behavior in organizational settings.
In a company producing harmful products, the role of employees becomes crucial. The
employees may be aware of the company’s actions but hesitate to speak up against the company.
This is where the concept of rational loyalty comes into play. Rational loyalty means that the
employees should act in the company’s best interest, but not at the cost of violating ethical
principles. If the employees are rationally loyal to the company, they should report the
wrongdoing to relevant authorities, even if it means going against the company’s interest. This is
because the employees are morally obligated to safeguard the consumers from using harmful
products. The employees are responsible for society; if they fail to speak up, they will be
complicit in the company’s unethical practices. By reporting the company’s wrongdoing, the
employees can ensure that the company is held accountable for its actions. In doing so, they are
fulfilling their moral obligation and contributing to society’s greater good.
When evaluating ethical actions in a given situation, virtue ethics provides a framework
emphasizing the significance of behaving by moral principles rather than self-interest.
Employees have a moral responsibility to protect consumers and other stakeholders in the
context of a company’s wrongdoing. This could involve blowing the whistle on unethical or
illegal practices within the organization. By acting by virtue ethics, employees prioritize their
moral and ethical obligations over any potential harm to their personal or professional interests.
This approach requires a commitment to ethical behavior, which can help to maintain trust and
credibility with stakeholders. Employees can uphold their ethical responsibilities by reporting
wrongdoing and contributing to the greater good. In today’s corporate world, employees must act ethically and report any legal or ethical
standards violations by their company. This is not always an easy task; however, it is the right
thing to do, demonstrating a commitment to ethical behavior and responsible corporate
citizenship. The concept of rational loyalty is crucial in the context of whistleblowing. This
concept emphasizes the importance of moral principles and integrity in organizations and
encourages employees to act in the company’s and its stakeholders’ best interest. In practice,
rational loyalty suggests that employees should be loyal to the company, but only to the extent
that it aligns with their moral and ethical principles. For instance, if a company produces harmful
products or engages in unethical practices, employees are responsible for blowing the whistle
and reporting the wrongdoing to the relevant authorities. In doing so, they protect consumers,
uphold the law, and promote the greater good.
Employees must cultivate courage, honesty, and integrity to make rational loyalty work
in practice. Virtue ethics teaches us that these virtues are essential for moral reasoning, decision-
making, and action. By cultivating these virtues, employees can develop a sense of responsibility
and accountability for their actions and become better corporate citizens. Organizations must act
ethically and report any breach of legal or ethical standards. Doing so not only aligns with moral
principles but also contributes to the long-term prosperity and endurance of the organization. By
embracing the concept of rational loyalty and cultivating virtues such as courage, honesty, and
integrity, employees can become ethical leaders and contribute to a better and more just society.
In their article “Care and Loyalty in the Workplace,” Julinna Oxley and D.E. Wittkower
delve into the importance of care and loyalty in a work setting. The authors introduce a new
concept called “caring labor,” which refers to work involving emotional labor, primarily caring
for others. They discuss how caring labor is often underappreciated in the workplace and frequently goes unrewarded. The article sheds light on the fact that caring labor is a vital aspect
of many professions, such as nursing, teaching, and social work, and how it plays a crucial role
in ensuring the well-being of both employees and clients. The authors also examine how the lack
of recognition and compensation for caring labor can lead to burnout, high turnover rates, and
other negative consequences. Overall, the article provides valuable insights into the importance
of care and loyalty in the workplace and highlights the need for greater recognition and
appreciation of caring labor in various professions.
Consider a scenario where a nurse consistently goes above and beyond her duty to
provide the best possible patient care. Despite her hard work, her employer fails to recognize her
efforts and does not compensate her for the extra time and effort she puts in. In this situation, the
nurse is performing what is called caring labor. This labor, which is crucial to the well-being of
her patients, involves providing emotional support, physical care, and assistance with various
daily activities. However, her employer does not seem to value this labor, which can ultimately
lead to burnout and dissatisfaction among the nursing staff. This can have adverse effects on the
overall quality of care provided to patients, as well as on the morale of the nursing staff. It is,
therefore, important for employers to recognize and appreciate the efforts of their employees,
especially those who are providing caring labor, to maintain a healthy and productive work
environment.
Upon analyzing the actions taken in this case through the lens of virtue ethics, it is
apparent that the employer is not exhibiting ethical behavior. Virtue ethics is a philosophical
approach that emphasizes cultivating virtuous character traits, such as compassion and fairness,
to guide ethical decision-making. In this specific scenario, the employer fails to demonstrate
compassion towards the nurse performing essential duties that benefit the patients. The nurse goes above and beyond the call of duty, yet the employer does not acknowledge or appreciate her
efforts. Additionally, the employer is not fair in treating the nurse, as they are not compensating
her for the additional work she is undertaking. This lack of fairness is further compounded by the
fact that the nurse’s extra efforts benefit the patients, which is the primary objective of the
healthcare facility. Therefore, it is clear that the employer’s actions do not align with the values
and principles of virtue ethics.
Upon thorough assessment and analysis of the situation, it has become evident that the
employer in question should have recognized and appreciated the significant contributions made
by the nurse’s diligent and compassionate labor. This recognition can be appropriately
demonstrated through the provision of fair compensation and acknowledgment of her invaluable
contributions to the workplace. By valuing and prioritizing the crucial role of caring labor, the
employer can effectively create a more positive and supportive work environment, which is
beneficial for the employees and the patients receiving care. Such a supportive work
environment can foster a culture of respect, appreciation, and collaboration, improving patient
outcomes and employee satisfaction.
Drawing on Vandekerckhove’s concept of rational loyalty, Manning’s whistleblowing can
be seen as an expression of loyalty to the higher principles of transparency and justice rather than
blind allegiance to the military institution. By prioritizing the disclosure of potential wrongdoing
over loyalty to the military establishment, Manning demonstrates a form of rational loyalty
grounded in ethical principles. Furthermore, Oxley and Wittkower’s exploration of care and
loyalty in the workplace sheds light on Manning’s actions from a perspective of moral care.
Manning’s decision to blow the whistle can be interpreted as an act of care towards the victims of
war and the broader society affected by military actions. By exposing potential war crimes, Manning acted in the interest of those impacted by the consequences of armed conflict,
demonstrating a sense of moral responsibility and care for others.
In conclusion, in the case of Chelsea Manning’s release of the “Collateral Murder” video
and classified documents to WikiLeaks, the ethical evaluation through virtue ethics reveals a
nuanced understanding of Manning’s actions. Manning’s decision to disclose the video and
documents was rooted in her belief that the public deserved to know the truth about the actions
of their military forces, highlighting potential war crimes and the indiscriminate nature of armed
conflict. Manning’s motivation aligns more closely with moral principles than unquestioning
loyalty to the United States. While loyalty to one’s country is typically considered virtuous,
Manning’s actions suggest a higher loyalty to universal moral values such as transparency,
accountability, and harm prevention.

4.4. Case Analysis on Professional Ethics

Bill Sourour, a former software developer, wrote an article titled “The Code I am Still
Ashamed Of.” In this article, he reveals details about a project he had worked on in the early
stages of his career. The project involved developing a tool to create code for a client’s website
automatically. However, the tool also included creating fake user accounts and generating fake
user activity to make the website appear more popular than it was. Initially, Sourour agreed to
this unethical behavior, but he later realized the extent of the harm it was causing and spoke out
against it. His article sheds light on the dangers of compromising one’s moral values for
professional advancement. In this Case Analysis, I will argue that the ethics of care shows us that
the code was morally problematic because it violated the trust of the users and the client and that
Sourour was right to speak out against it because he had a responsibility to act in the best
interests of all stakeholders involved.
In the context of ethical considerations, integrity is one of the pivotal concepts that
computing professionals should uphold. According to the Code of Ethics of the Association for
Computing Machinery (ACM), computing professionals are expected to exhibit honesty,
trustworthiness, and respect for others. Similarly, the Institute of Electrical and Electronics
Engineers (IEEE) Code of Ethics underscores the importance of integrity as a fundamental
characteristic of a professional. Furthermore, the National Society of Professional Engineers
(NSPE) Code of Ethics also emphasizes the significance of this trait, stating that engineers must
avoid dishonest practices that falsify their qualifications or the quality of their work. In essence,
exhibiting integrity is crucial for computing professionals to build trust and maintain ethical
standards.
Creating fake user accounts and generating fake user activity, as highlighted by Sourour,
is a clear violation of the principle of integrity. Such behavior is dishonest and deceptive and undermines the trust that both users and clients place on the website and the development team
responsible for it. Using such fake accounts and activity provides an unfair advantage to the
client, as it misrepresents the popularity and success of the website. This misrepresentation could
lead to significant financial gains for the client, but it would be at the expense of other
stakeholders who rightfully expect transparency and authenticity. In addition, using fake accounts
and activity could harm the website’s reputation and credibility, leading to a loss of users and
clients in the long run. Therefore, it is crucial to maintain the highest standards of integrity and
transparency in all aspects of website development and user engagement.
When we adopt an ethics of care perspective while dealing with a case, it becomes clear
that the well-being and interests of all stakeholders are paramount. In this instance, the
stakeholders include the users, the client, and the development team. It is crucial to consider the
impact that the creation of counterfeit accounts and activity can have on each of these
stakeholders:
1. Such practices can be deeply harmful to the users. They need to maintain their trust and
confidence in the website, which can lead to losing faith in the company. This can translate
into a significant loss of business for the client, which can be catastrophic for their financial
well-being and long-term success.
2. The creation of counterfeit accounts and activity can also adversely affect the client. It can
misrepresent the website’s popularity and success, leading to unrealistic expectations and
goals. This can lead to frustration and disappointment when the actual numbers are revealed,
harming the client’s reputation and standing in the industry.
3. Such practices can also impact the development team. It can harm their professional integrity and credibility, adversely affecting their careers. It can
also lead to a loss of trust among their peers and clients, making it difficult for them to secure
future projects and business opportunities.
After careful consideration of all the factors involved, Sourour concluded that it was the
right decision to speak out against unethical behavior. His actions were a testament to his strong
commitment to honesty and his sense of responsibility towards all stakeholders. By speaking out,
he was able to prevent any further harm from being inflicted and promote ethical conduct among
the development team.
However, it is essential to acknowledge that speaking out against unethical behavior can
be challenging and may have negative consequences for the individual involved. This highlights
the significance of creating an ethical and supportive workplace culture that values integrity and
encourages ethical behavior. Organizations must establish a culture of transparency and
accountability, where employees feel comfortable reporting unethical behavior without fear of
retribution. This can be achieved by implementing robust ethics training programs, developing a
code of conduct that outlines expected behaviors, and providing employees with channels for
reporting unethical conduct anonymously if they so choose.
In essence, promoting an ethical workplace culture requires a sustained effort from the
organization and its employees. By working together to establish a culture of integrity,
organizations can build trust with their stakeholders, inspire loyalty, and promote a positive work
environment.
In her article titled “Confidentiality: A Comparison Across the Professions of Medicine,
Engineering, and Accounting,” Mary Beth Armstrong delves into the nuances of confidentiality
in various professional fields. The author explores how confidentiality is perceived and maintained in different contexts and how it is sometimes weighed against other ethical
obligations that professionals must uphold. Armstrong highlights the importance of balancing
confidentiality and other ethical considerations and provides a comprehensive overview of how
this balance is achieved in different fields. Overall, the article offers a thought-provoking analysis
of the complex concept of confidentiality and how it is navigated in different professions.
In their profession, therapists often find themselves in a complex situation where their
obligation to keep client information confidential conflicts with their duty to prevent harm to
others in society. In such situations, a therapist must weigh the potential harm resulting from
disclosing confidential information against the importance of maintaining confidentiality. For
example, suppose a client reveals during therapy that they have committed a crime or pose a
threat to themselves or others. In that case, the therapist must take appropriate action while
ensuring that the client’s privacy rights are not violated. This delicate balance requires careful
consideration of all the factors involved, including the severity of the potential harm, the client’s
mental and emotional state, and the therapist’s legal and ethical obligations. Therapists must
understand the nuances of these situations and act in an informed and responsible manner to
ensure the safety and well-being of the client and the wider society.
The ethics of care framework is an approach to decision-making that emphasizes the
importance of considering the impact of one’s actions on both the individual and the wider
community. In the context of therapy, it is essential to be mindful of how a therapist’s actions can
affect their client and the people around them. One of the most crucial aspects of therapy is
confidentiality, which is essential to build trust between the therapist and the client. However, it
is important to remember that confidentiality should never be prioritized over the safety of others.
In certain situations, a therapist may be obligated to disclose information that could prevent harm to someone else. If a therapist becomes aware of information that suggests a client may harm
themselves or others, they must act in the best interest of the client and the public. In such cases,
the therapist should first persuade the client to disclose the information to the relevant authorities.
However, if the client refuses, the therapist may have to consider breaking confidentiality to
prevent harm to others.
The scenario at hand emphasizes the complexity of ethical dilemmas that arise when the
principle of confidentiality conflicts with other ethical obligations. In such cases, balancing the
importance of preserving confidentiality and other ethical considerations is crucial. This requires
carefully evaluating the impact of different courses of action on all parties involved. One possible
framework for doing so is the ethics of care approach, which focuses on the well-being of the
client and the wider community. By applying this framework, one can assess the ethical
implications of different options and strive to arrive at a decision that prioritizes the best interests
of all involved. This may involve considering the potential harm or benefit of disclosing
confidential information, the extent to which it is necessary or proportionate, and the implications
for trust and relationships with the client. Ultimately, the goal is to ensure that ethical principles
are upheld while promoting the welfare of those affected by the decision.
In summary, as computing professionals, we must maintain integrity and trust in our
work. The recent development of the pharmaceutical quiz code using fake user accounts and
activity clearly violated this principle. It is essential to ensure transparency and authenticity in
our work to protect the interests of all stakeholders, including users, clients, and development
teams.
It’s important to approach the situation from an ethics of care standpoint to evaluate how
certain practices affect everyone involved. This approach prioritizes the well-being of all parties involved, including those who may be affected by the actions of computing professionals. Bill
Sourour’s decision to speak out against unethical behavior and take a stand was commendable, as
he acted in the best interests of all stakeholders involved and upheld his ethical obligations as a
computing professional.
We must learn from this case and strive to maintain the highest standards of integrity,
transparency, and ethics in all aspects of our work. By doing so, we can build trust and maintain
the credibility of our profession. Our ethical obligation is to act in the best interests of all
stakeholders and uphold the principles of integrity and trust in everything we do.

Assignment 10

Task A – Backup your system (Using crontab) [100 points]
Scenario: Performing system backup can be time-consuming, and the process is often overlooked. For this scenario,
1. (10 Points) Create a new user Alice (with home directory) and

2. (50 Points) Write a shell script that backups Alice’s home directory by creating a tar file (tape archive), using the following steps:
a. • Take 2 inputs with their values- your MIDAS name and current date (for example, midas=svatsa).
• Create a variable named as filename that should be assigned the value as MIDAS-date (example output after executing the script would be like, svatsa- 2021.3.17-01.16.430).
• Using tar command, create a tape archive for Alice’s home directory (/home/Alice) and the filename created above (in step-2-ii). (Please learn about tar command in Linux for its usage)
b. Move the tape archive file/tar file (created in step 2-iii) to /var/backups/ directory using correct command in linux.
c. To optimize the disk usage, pick a compression algorithm (bz2, gzip, or xv) to compress the tar file you created in /var/backups/ in the previous step-2b.


3. (30 Points) Create a crontab file to keep the scheduled task running for 3 minutes, then check the contents in the /var/backups directory.

4. (10 Points) Cancel the crontab jobs.

TASK B: SYSTEM CLEANUP (EXTRA CREDIT) [20 Points]
Scenario: In the above scenario, your system disk will be filled up eventually without cleaning up the old backups. Therefore, in this optional task, create a script that checks the number of backups you created in Task A. If the number of the backup file is more than a pre-defined threshold, the script will delete the old archives to maintain the backups under a reasonable size. This script should do the following:
1. Count the number of backups created in Task A and determine if this number is larger than 3.
2. Nothing should happen if the number of backups is less than the threshold, 3.
3. If more backup archives are detected, calculate the number of backups to delete. Then delete the old archives.

Note: As the script needs to write contents in the “/var/backups” folder, which is owned by root, you should consider the permission issue properly. (Using sudo to create crontab file)

Assignment 9

Task-A: Write a shell script to complete the following steps:

  1. Prompt the user to input his/her lucky number.
  2. If the input number is equal to 10, then print the message “You got the first prize.”
  3. If the input number is equal to 8, then print the message – “You got the second prize.”
  4. If the input number is equal to 999, then print the message – “You got the third prize.”
  5. If None of the above conditions are true, then print the message – “Sorry, good Luck for the next time.”

Task-B: Write a shell script to validate your input.

  1. Prompt the user to provide the username which should consists of characters and numbers both, and check if the following requirements are satisfied:
  2. Only lower-case letter [a-z] and numeric character [0-9] are allowed.
  3. The length must be between 4 to 8 digits

Test your script with the following inputs, and submit the screenshot for the script and all the Four outputs:

  1. Your input with one upper case
  2. The input has length less than 4 digits.
  3. The input has length larger than 8 digits.
  4. Your input in lower case and should have length between 4 to 8.

Assignment 8

Step-1: Use vi or nano editor to write your script (Ex, nano lkopa.sh) for the following tasks.
Step-2: After saving the script, save and exit out of the editor and make the script executable by adding execute permission ( chmod +x lkopa.sh)
Step-3: Run your script using ./lkopa.sh

Task A (Correct script (25 points) + result/output after executing the script (25 points)- Conditional Statement Write a shell script using nano or vi editor (eg, nano lkopa.sh) like below, that performs the following task:

  1. Add the Shebang (#!/bin/bash) as the first line in your script.
  2. Read a number using read function
  3. Using if statement, check if the input number is less than 10, then print the message “Input number is greater than 10.
  4. If the number is not greater than 10, then print the message, “Input number is not greater than 10.

Task B (Correct script (25 points) + result/output after executing the script (25 points) – Shell Script to Create a new file Write a shell script using nano or vi editor (eg, nano lkopa.sh) like below, that performs the following task:

  1. Add the Shebang (#!/bin/bash) as the first line in your script.
  2. Reads the name of the file to check for a filename that exists.
  3. Check whether the given input is a directory or regular file.
  4. If the input is a directory and exists, then display the message “Directory exists”.
  5. If the input is a regular file, then display the message “It is a regular file, and the file exists” and display the contents of the file.
  6. If the given input name in step-1 doesn’t exist, then create the new file with the given name in step-1.
    (Extra credit: 10 points) Add your name to the file (using redirection operator ‘>’) and display the contents for the newly created file.
  7. Save and exit the editor and remember to make the script executable using the command chmod +x lkopa.sh)

Extra Credit(15 points)- Check Directory Write a script like below that

  1. Reads Two variables- your name and the name of the directory as input.
  2. Your script should check for the validity of the given directory name, if the entered filename is a directory, then display its contents
  3. If the directory doesn’t exist, then print an error message “Sorry, the entered directory name is not a valid directory name.”
  4. You need to execute your script and test the following directories to test with your script
  • /etc/systemd
  • /home
  • A directory that does not exist
    Display the contents for the directories you have entered

Assignment 11

Understanding subnetting takes time and practice. Using the methods covered during the class, fill in the following tables for Network, broadcast, first IP, Last IP and Max. Hosts in the network. The column for IP address should be in Decimal format for each, except number of hosts. (Refer to the examples in the slide for week 10-Networking Basics)

Task-A: (50 Points)
Category IP Address Binary Format
Address 192.168.100.4 11000000.10101000.01100100.00000100
Netmask 28 11111111.11111111.11111111.11110000
Network address 192.168.100.0 11000000.10101000.01100100.00000000
Broadcast address 192.168.100.15 11000000.10101000.01100100.00001111
First IP 192.168.100.1 11000000.10101000.01100100.00000001
Last IP 192.168.100.14 11000000.10101000.01100100.00001110
Maximum host in the network 14 hosts

Task-B: (50 points)
Category IP Address Binary Format
Address 170.1.0.0 10101010.00000001.00000000.0000000
Netmask 26 11111111.11111111.11111111.1100000
Network address 170.1.0.0 10101010.00000001.00000000.0000000
Broadcast address 170.1.0.63 10101010.00000001.00000000.0011111
First IP 170.1.0.1 10101010.00000001.00000000.0000000
Last IP 170.1.0.62 10101010.00000001.00000000.0011111
Maximum host in the network 62 hosts

Extra Credit (10 points)
Write a bash script to print out 0~10 in shell scripts by using for loop and while loop, respectively? Please submit the screenshot for the script and its output, both.

Assignment 7

Part I– Check your file system (30 points).
Step 1. Execute the ls /dev/sd* command to see the current hard disk devices. [use sudo]

Step 2. Execute the fdisk -l command to list the current hard disk partitions. [use sudo]

Step 3. Execute the parted -l command to list the current hard disk partition table. [use sudo]

Part II– Create a new virtual disk (30 points)
Step 1. In the VM setting, attach a new virtual hard disk with the size of 200 MB to our current Linux VM. Name it as “your_midas.vdi” [ HINT: Please refer to the slides and discussion during the class for week 7]
Step 2. Load this virtual hard disk to your virtual machine.

Step 3. Repeat the steps in Part I and highlight the differences after adding the new virtual hard disk.

Part III– Creating Partitions and Filesystems (60 points)
Step 1. Use the fdisk command to create a new primary partition on the new virtual hard disk attached in Part II.

Step 2. Use the correct command to create an ext4 filesystem on the new partition.

Step 3. Repeat the steps in Part I and highlight the differences.

Step 4. Make a new directory named /cyse. And mount the new partition under this directory.

Step 5. Use the df command to check the mounting point of the new partition.

Step 6. Create a new file named for YourMIDAS.txt (replace YourMIDAS with your MIDAS ID) in the directory /cyse and put your name in that file.

Step 7. Unmount /cyse directory.

Step 8. Check the contents in /cyse directory. What do you find?

I didn’t find anything under the directory /cyse.

Assignment 6

You need to configure the system to allow three users to perform the shared folder actions. Please submit the screenshot for all the steps in a word or pdf file
Task A: Get accounts and groups ready (70 points)
Step 1. Create three groups- employee, payroll, and admin. (You may refer to the slides for week-4 – Group Management)

Step 2. Create three user accounts with a specified home directory for Sophia, Olivia, and Emma. Set the primary group for Sophia, Olivia, and Emma to “employee”, “payroll”, and “admin”, respectively. And change their login shell to /bin/bash. Don’t forget to set their passwords.

Step 3. Create a shared group called “your_midas” (replace it with your MIDAS name) and set this shared group as the above accounts’ secondary group. After this step, remember to check each user’s group profile.

Step 4. Create a directory named /home/cyse_project, which is to be owned by the “your_midas” group which is a shared group). After this step, remember to check the permission of this shared directory.

Step 5. Change the permissions of the /home/cyse_project directory to “rwxrwx—” using the octal method so that only the project group members have access to this directory. After this step, remember to check the permission of this shared directory.

Step 6. Switch to Sophia’s account. Change the default permissions using octal method with umask command, to “rw-r—–” for Sophia when she creates a file or directory. Check the value of umask, and permission of a new file after this step.

Step 7. Create a new file called “Sophia_homework” in the home directory of Sophia and put your name in the file as content. After this step, remember to check the content and the permission of the new file. (ls -l Sophia_homework)

Step 8. Copy “Sophia_homework” to the /home/cyse_project directory. After this step, remember to check the permission of the file in the shared directory.

Step 9. Switch to Emma’s account. Try to read “Sophia_homework” in the /home/cyse_project
Directory.

Step 10. Exit out of Emma’s account and Sophia’s account.

Task B: Set SGID permission (15 points)
Step 1. Switch to root or the regular user’s account. To allow group members to access the files shared in the shared directory, you need to fix the sharing issue by setting the correct SGID group values to /home/cyse_project directory.

Step 2. Switch to Sophia’s account. Copy “Sophia_homework” to the /home/cyse_project directory as “Sophia_homework2”.

Step 3. Switch to Emma’s account. Try to read “Sophia_ homework2” in the /home/cyse_project directory.

Task C: Unset SGID permissions (15 points)
Step 1. Switch to root the regular user’s account. To disallow group members to access the files in the shared folder, you need to fix the sharing issue by setting the correct SGID group values to /home/cyse_project directory to remove the group user read permission.

Step 2. Switch to Sophia’s account. Copy “Sophia_homework” to the /home/cyse_project directory as “Sophia_homework3”.

Step 3. Switch to Olivia’s account. Try to read “Sophia_home3” in the /home/cyse_project directory.

Extra credit: Sticky Bit (10 points)
Step 1. Switch to Olivia’ account. Delete “Sophia_ homework” in the /home/cyse_project directory.

Step 2. Switch to root account. Set the sticky bit permission, to make files can only be removed by the owner of the file.

Step 3. Switch to Olivia’ account. Try to delete “Sophia_ homework3″ in the /home/cyse_project directory. Can you delete it this time? Why?

No, I could not delete “Sophia_homework3” from Olivia’s account. The reason is that Olivia did not have permission to delete anything in the first place.