Urgenthomework logo
UrgentHomeWork
Live chat

Loading..

Information Technology - N Assessment Answer

n this task, you need to implement system security and access control in Linux operating system.  

 

Using Debian OS, write and implement one bash shell script. This script is a simplify version of the adduser or useradd utility. You are NOT allowed to use adduser or useradd or other similar command/utility for adding user.

 

The script should have the following specifications:  

 

Part (a)

 

Once the script is executed (assume root execute the script), it will copy the /etc/passwd file to another file /etc/passwd-DDMMYYYY (e.g. If the date is 01 Aug 2019, the file copied will be /etc/passwd-01082019) in the /etc/ folder.

If the copied file (/etc/passwd-DDMMYYYY) already exist, it will prompt the user on whether to overwrite the file.

If the user decided to overwrite the existing file (/etc/passwd-DDMMYYYY) by inputting a “yes”, the script will overwrite the existing file and proceed. If the user decided NOT to overwrite the existing file by inputting a “no”, the script will terminate with an appropriate message shows to the user.

The script will prompt the user to only input “yes” or “no”. The script will keep asking the user to input “yes” or “no” until the user input one of these two options.

The permissions of the file /etc/passwd-DDMMYYYY needs to be updated such that only root can have all access, whereas all other users should have NO access.

(15 marks)

 

   

Part (b)

 

The script will now prompt the user to enter the following:

username o user ID o group ID o User Info

After the user key in the necessary info as above, a new line (that means a new user) will be added to the /etc/passwd file with the information that the user has just entered. You are to use the following values for the rest of the fields:

Password: x

Home folder: /home/USERNAME (e.g. if the USERNAME is Alice, the value will be /home/Alice)

Home shell: /bin/bash

Create the home folder /home/USERNAME. Change the owner of the folder to USERNAME. Change the group of the folder to the respective group (as the group ID stated). 

Change the permissions of the folder to only owner can have all access, group can have read and execute permissions, whereas others only have read access.

Prompt the user to change the password for this new user (hint: use the passwd command).

(15 marks)

 

Part (c)

 

Validation check needs to be done in the bash shell script whenever possible (e.g. when input a username, the script should check the /etc/passwd file to see whether the username already exist).

The script will then display the info of the new user added from the /etc/passwd file and the /etc/shadow file (only print the appropriate line from the /etc/passwd file and

/etc/shadow file).                

(15 marks) Part (d)

 

A documentation (with appropriate screen-shots and explanations) needs to be produced on the execution of the bash shell script with different conditions (e.g. when the username already exist in the /etc/passwd file). Necessary checking needs to be done (e.g. login as the new user created).

 

Comments must be added in the script to make it easier to understand.

 




Buy Information Technology - N Assessment Answers Online


Talk to our expert to get the help with Information Technology - N Assessment Answers to complete your assessment on time and boost your grades now

The main aim/motive of the management assignment help services is to get connect with a greater number of students, and effectively help, and support them in getting completing their assignments the students also get find this a wonderful opportunity where they could effectively learn more about their topics, as the experts also have the best team members with them in which all the members effectively support each other to get complete their diploma assignments. They complete the assessments of the students in an appropriate manner and deliver them back to the students before the due date of the assignment so that the students could timely submit this, and can score higher marks. The experts of the assignment help services at urgenthomework.com are so much skilled, capable, talented, and experienced in their field of programming homework help writing assignments, so, for this, they can effectively write the best economics assignment help services.

Get Online Support for Information Technology - N Assessment Answer Assignment Help Online

Resources

    • 24 x 7 Availability.
    • Trained and Certified Experts.
    • Deadline Guaranteed.
    • Plagiarism Free.
    • Privacy Guaranteed.
    • Free download.
    • Online help for all project.
    • Homework Help Services
); }
Copyright © 2009-2023 UrgentHomework.com, All right reserved.