Question

In: Computer Science

In LINUX Provide the command(s) and any additional steps to perform the following tasks. You will...

In LINUX Provide the command(s) and any additional steps to perform the following tasks. You will need to be running with root privileges.

  1. Create a symlink to the /etc/openldap/ directory named "ldapconf" in /tmp/.

  1. Find all .conf files in the /etc/ directory and its subfolders.

  1. Find all directories starting with "gnome" or "GNOME" anywhere under the /usr/share/ directory.

  1. Sam and Susan are members of the "sales" group. Sam has been working on a project that has grown too big for one person. You will need to move the project folder and update the permissions so they can share their work. Start by moving /home/sam/stuff to /home/shared/. Rename the folder to "salesproject".

  1. Take a look at the permissions and ownership of the moved folder. Note that they didn't change. Recursively set the owner and group of /home/shared/salesproject/ and its contents to sam and sales, respectively.

  1. Change the permissions of all files in the /home/shared/salesproject/ directory to allow the user and group to read and write but not execute. Disallow all access to everyone else on the system.

  1. Change the permissions of the /home/shared/salesproject/ folder itself, allowing the owner and group full access, with no access for anyone else on the system.

  1. Log in as "susan" (password "secret") and make sure she can access the /home/shared/salesproject/ directory and files within. Create a file in /home/shared/salesproject/ as susan. What are the owner, group, and mode of the file she created?

  1. Log in as "sam" (password "secret"). Try to edit the file susan created. Why doesn't sam have access?

  1. In order to guarantee that files created in /home/shared/salesproject/ are created with the "sales" group, set the SGID bit on the /home/shared/salesproject/ directory.

Solutions

Expert Solution

Tasks and Commands for them:

  1. Create a symlink to the /etc/openldap/ directory named "ldapconf" in /tmp/.

ln -s /etc/openldap/ldapconf /tmp/ldapconf

2. Find all .conf files in the /etc/ directory and its subfolders.

find -L /etc/ -name "*.conf"

3. Find all directories starting with "gnome" or "GNOME" anywhere under the /usr/share/ directory.

find /usr/share/ -type f -iname "*gnome*"

4. Sam and Susan are members of the "sales" group. Sam has been working on a project that has grown too big for one person. You will need to move the project folder and update the permissions so they can share their work. Start by moving /home/sam/stuff to /home/shared/. Rename the folder to "salesproject".

mv /home/sam/stuff /home/shared/

mkdir salesproject

5. Take a look at the permissions and ownership of the moved folder. Note that they didn't change. Recursively set the owner and group of /home/shared/salesproject/ and its contents to sam and sales, respectively.

ls -lrth - to see and match permissions of the directory and users

  6. Change the permissions of all files in the /home/shared/salesproject/ directory to allow the user and group to read and write but not execute. Disallow all access to everyone else on the system. Change the permissions of the /home/shared/salesproject/ folder itself, allowing the owner and group full access, with no access for anyone else on the system.

chmod 700 /home/shared/salesproject/

7.


Related Solutions

Unix / Linux 21. Given the following command pipeline, provide a diagram (ascii art) or detailed...
Unix / Linux 21. Given the following command pipeline, provide a diagram (ascii art) or detailed description indicating all the Input/Output (I/O) connections. Every stdin, stdout, and stderr for each command will need to connect to something. grep a < words | wc -l > a_count.txt 22. Explain what is wrong (if anything) with the following command pipeline. cd | ls 23. Stream Editor: Write a sed command to delete digits, but only on lines that end with a period....
Using Linux in VirtualBox Do the Following Exercise: Using the clear command At this point, you...
Using Linux in VirtualBox Do the Following Exercise: Using the clear command At this point, you screen might seem filled with commands and their results. Use the clear command anytime you want a clean slate. This exercise enables you to clear the screen now. To clear the screen: Type clear on the command line, and press Enter. The command prompt is now in the upper-left corner of your screen. [No output or questions for this part.] Viewing manual pages You...
Upgrade your UBUNTU Linux system and document the steps that you took. What events, if any,...
Upgrade your UBUNTU Linux system and document the steps that you took. What events, if any, were logged? Next, search the repositories for the application nginx. If it’s not installed, install it. Document the steps you took.
In MongoDB using Linux how do you Execute the command to find the size of a...
In MongoDB using Linux how do you Execute the command to find the size of a single document of your choosing from the enron database Execute the command to find the size of the collection of documents in the enron database
linux: Become the root user for this exercise. What command did you use to do this...
linux: Become the root user for this exercise. What command did you use to do this again? $ Now that you are root, create a new user on your system called labsevenuser. What is the command you used to create this user? # Set a new password for the new user you just created in step 2 above. What is the command you used to do this? # Create a new group called awesomepeople. Add the user you created in...
linux: Become the root user for this exercise. What command did you use to do this...
linux: Become the root user for this exercise. What command did you use to do this again? $ Now that you are root, create a new user on your system called labsevenuser. What is the command you used to create this user? # Set a new password for the new user you just created in step 2 above. What is the command you used to do this? # Create a new group called awesomepeople. Add the user you created in...
Please write shell scripts in Kali Linux to complete the following tasks. Task A - Take...
Please write shell scripts in Kali Linux to complete the following tasks. Task A - Take your UIN Write a script like below that reads and displays the MIDAS ID if the following requirements are satisfied: Only lower case letter [a-z] and numeric character[0-9] are allowed MIDAS ID must between 4 to 8 digits Test your script with the following examples: Your MIDAS ID in lower case Your MIDAS ID w.one upper case A string less than 4 digits A...
Unix / Linux 6. vi editor: In vi command mode, what are the keystrokes you would...
Unix / Linux 6. vi editor: In vi command mode, what are the keystrokes you would type to... Quit the vi editor and save any changes? 7. C language source files, by convention, have the suffix ".c". The associated "header" files have the suffix ".h". What is the command to perform the following task: List all the C source and C header files in the current directory. [Hidden files may remain hidden.] 8. C language source files, by convention, have...
a) Observe the following Linux commands and work out what each command does: 1) $ ls...
a) Observe the following Linux commands and work out what each command does: 1) $ ls –al 2) $ /etc/profile 3) $ chmod 200 final_assignment.txt b) Consider a scenario where Bob has downloaded his messages to the local machine with an access of POP3, he can create mail folders and move the downloaded messages into the folders. Bob can then delete messages, move messages across folders, and search for messages (by sender name or subject). But this paradigm—namely, folders and...
The employees at Table Manufacturing perform the following tasks as indicated in Table A and Table...
The employees at Table Manufacturing perform the following tasks as indicated in Table A and Table B. Employee A Roles and Responsibilities Employee B Roles and Responsibilities Reports to CFO Reports to CFO Raises capital through issuing stocks and bonds General financial accounting General managerial accounting Tax preparation Which of the following is the role of Employee A and Employee​ B?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT