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...
Based on the tables below, write SQL command to perform the following tasks for MySql: Create...
Based on the tables below, write SQL command to perform the following tasks for MySql: Create SALESREP and CUSTOMER tables Create primary and foreign keys as appropriate. The custNo should use a surrogate key as the primary key with auto-increment increase the balance of the Gonzales account by $100 to a total of $450? Find an average customer balance Display the name of the sales representative and the name of the customer for each customer that has a balance greater...
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....
Linux Fundamentals part 3 Below are questions related to the command line use of Linux. You...
Linux Fundamentals part 3 Below are questions related to the command line use of Linux. You can use the videos, man pages, and notes to answer these questions. Remember that Linux is CASE SENSITIVE. Rm and rm are NOT the same command. I will count off totally for a question if you do not take this into account. For each command give me the ENTIRE COMMAND SEQUENCE. If I ask you 'What command would I use to move the file...
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
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
You have to perform the following tasks: 1- Write the name of best string matching algorithm...
You have to perform the following tasks: 1- Write the name of best string matching algorithm in terms of time and space complexity. 2- Implement it in (c or c++) 3- Dry run it on following strings: - String A=aaabaaaabbaaabcaaabd - String B=aaabd Deliverable in PDF file: Code + Dry run + Code execution results using the above given strings.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT