Question

As the system administrator, you have received a memo saying that Leslie, Ronsam, Xochi, and Sara...

As the system administrator, you have received a memo saying that Leslie, Ronsam, Xochi, and Sara have been assigned to a work group to do some analysis and they need to work on your Linux system. You need to add these folks as regular users and give them an alternate group that they can switch into. You also need to set up a common folder for them to work in. Your plan is to create a new group called ‘analysis’ and you will create a folder off the root folder called /analysis_work

Execute the following commands to effect this new set-up:

First, add the users and set their passwords(just use the uid for the password):
useradd leslie ; passwd leslie
useradd ronsam ; passwd ronsam
useradd xochi
; passwd xochi
useradd sara ; passwd sara


Now, add the common group for the new users
groupadd -g 234 analysis

Next, add the folder for them all to work in, set the permissions and change the group on the folder to ‘analysis’
mkdir /analysis_work
chmod 670 /analysis_work
chown root:analysis /analysis_work


Finally, modify the new user accounts so they can switch out of their primary group into the work group
usermod -G analysis leslie
usermod -G analysis ronsam
usermod -G analysis xochi
usermod -G analysis sara


Test the system with the following:
su - leslie
newgrp analysis
cd /analysis_work
touch tmp.file
chmod g+w tmp.file

su - ronsam
newgrp analysis
cd /analysis_work
vi tmp.file

As user ‘ronsm’, you should be able to change (write) the file that ‘leslie’ created
Were you able to change the file using ‘vi’?____________

Homework Answers

Answer #1

Ans - No, you can't edit the tmp.file in ronsam user as the file is created by leslie.

Explanation:

We hav given chmod 670 /analysis_work ,chown root:analysis /analysis_work - It means all user having group name analysis can access the directory but not all the files created in that directory. When any user creates a file in that directory it will create a file with his own group name and file permission will be based on UMASK value.

exp:

$ whoami
leslie
$ pwd
/analysis_work
$ mkdir tmp.file
$ ls -ltr
-rw-rwx--- 1 leslie leslie 48 Oct 28 17:31 tmp.file

here you can see the owner is lensle and group is leslie so if you login with different user id with same group id of leslie then you will not be able to edit the file as the group of the file is leslie.

How to Change the File Group Ownership:

$ chgrp analysis tmp.file
$ ls -ltr
total 1
-rw-rw-r-- 1 leslie analysis 0 Oct 28 17:49 tmp.file

In this case other user belongs to analysis group able to edit the file.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
You have been tasked with developing the software for aSmart Ticket Purchasing Kiosk System. This system...
You have been tasked with developing the software for aSmart Ticket Purchasing Kiosk System. This system is like kiosk-based TicketMaster but only for on-campus and downtown events and movies that are located on campus and the surrounding area. The hardware for the kiosk would resemble a large ATM machine with the following additions: a much larger full LCD touchscreen for user inputs speakers to allow users to listen to artists’ music, watch movie trailers, concert video segments, and sports highlights...
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and...
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and the output in a word document and submit it. Part1: 1. Log in to Linux using your user account name and password. 2. If you logged in using a graphical login screen, open a terminal window by clicking on the icon in the lower left corner of the desktop to open the main menu, then selecting System Tools, then Terminal. A terminal window opens....
Create a State machine diagram, class diagram and a sequence diagram A description of the System...
Create a State machine diagram, class diagram and a sequence diagram A description of the System Hjolaleidir.is - Better Biking routes The group “Better biking routes” has got the idea of making the website: hjolaleidir.is for cyclists in the greater Reykjavik area. The group “Better biking routes” want to make the website accessible for a broad spectrum of users. They are catering to users who want information about good routes from a place to a destination and users who wish...
Program Behavior Each time your program is run, it will prompt the user to enter the...
Program Behavior Each time your program is run, it will prompt the user to enter the name of an input file to analyze. It will then read and analyze the contents of the input file, then print the results. Here is a sample run of the program. User input is shown in red. Let's analyze some text! Enter file name: sample.txt Number of lines: 21 Number of words: 184 Number of long words: 49 Number of sentences: 14 Number of...
1. By convention, how are configuration files separated from regular files? (NOTE: A practical effect of...
1. By convention, how are configuration files separated from regular files? (NOTE: A practical effect of the separation is that they are not displayed by the default version of the ls command)                         a. the prefix "rc" (rc.filename)               c. the extension .cfig                         b. a dot (.) at the beginning                    d. by having the SUID bit set 2. The IP address which is reserved for local loopback (equivalent to "localhost") is:                         a. 255.255.255.0                                   c. 192.168.70.1...
Introduction Purpose Your goal is to create a design for a software interface. You will experience...
Introduction Purpose Your goal is to create a design for a software interface. You will experience the scope of the design process from brainstorming ideas and gathering information about users’ needs to storyboarding, prototyping, and finally, testing and refining your product. As you work on the software interface, you will demonstrate your ability to apply fundamental Human-Computer Interaction principles to interface analysis, design, and implementation. You will be responsible for delivering project components to your professor at several points during...
Write a 4-6 sentence summary explaining how you can use STL templates to create real world...
Write a 4-6 sentence summary explaining how you can use STL templates to create real world applications. In your summary, provide an example of a software project that you can create using STL templates and provide a brief explanation of the STL templates you will use to create this project. After that you will implement the software project you described . Your application must be a unique project and must incorporate the use of an STL container and/or iterator and...
You work for Microsoft in their global smart phone group. You have been made project manager...
You work for Microsoft in their global smart phone group. You have been made project manager for the design of a new smart phone. Your supervisors have already scoped the project so you have a list showing the work breakdown structure and this includes major project activities. You must plan the project schedule and calculate project duration. Your boss wants the schedule on his desk tomorrow morning!      You have been given the information in Exhibit 5.13. It includes all the...
I need this before the end of the day please :) In Java 10.13 Lab 10...
I need this before the end of the day please :) In Java 10.13 Lab 10 Lab 10 This program reads times of runners in a race from a file and puts them into an array. It then displays how many people ran the race, it lists all of the times, and if finds the average time and the fastest time. In BlueJ create a project called Lab10 Create a class called Main Delete what is in the class you...
Please answer in JAVA IDS 401 Assignment 4 Deadline In order to receive full credit, this...
Please answer in JAVA IDS 401 Assignment 4 Deadline In order to receive full credit, this assignment must be submitted by the deadline on Blackboard. Submitting your assignment early is recommended, in case problems arise with the submission process. Late submissions will be accepted (but penalized 10pts for each day late) up to one week after the submission deadline. After that, assignments will not be accepted. Assignment The object of this assignment is to construct a mini-banking system that helps...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT