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

Once you are in the Linux environment, perform the following steps: Set an environment variable for...
Once you are in the Linux environment, perform the following steps: Set an environment variable for USER that holds the value of your name. For this submission, you will write a BASH shell program that meets the following requirements: Clear the screen. Display to the user what the program will do and that the program is starting. Display to the user the string “Hello“ and the value of the USER environment variable. Output a blank line. Display to the user...
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
How LUNCH meterpreter in Kali Linux. Complete command please. Thank you
How LUNCH meterpreter in Kali Linux. Complete command please. Thank you
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...
Perform the following tasks of dc-dc Buck converter. 1). Provide matlab code for DC-DC buck converter...
Perform the following tasks of dc-dc Buck converter. 1). Provide matlab code for DC-DC buck converter 2). Mathematical Analysis of fourier series and filters to remove harmonics
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT