exam questions

Exam EX200 All Questions

View all questions & answers for the EX200 exam

Exam EX200 topic 1 question 89 discussion

Actual exam question from RedHat's EX200
Question #: 89
Topic #: 1
[All EX200 Questions]

SIMULATION -
Copy /etc/fstab document to /var/TMP directory. According the following requirements to configure the permission of this document.
✑ The owner of this document must be root.
✑ This document belongs to root group.
✑ User mary have read and write permissions for this document.
✑ User alice have read and execute permissions for this document.
✑ Create user named bob, set uid is 1000. Bob have read and write permissions for this document.
✑ All users has read permission for this document in the system.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
cp /etc/fstab /var/tmp
chown root:root /var/tmp/fstab
chmod a-x /var/tmp/fstab
setfacl ג€"m u:mary:rw /var/tmp/fstab
setfacl ג€"m u:alice:rx /var/tmp/fstab
useradd ג€"u 1000 bob

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
STFN2019
Highly Voted 3 years, 2 months ago
Full solution: # cp /etc/fstab /var/tmp # chown root:root /var/tmp/fstab # useradd mary # useradd alice # useradd -u 1000 bob # setfacl -m u:mary:rw- /var/tmp/fstab # setfacl -m u:alice:r-x /var/tmp/fstab # setfacl -m u:bob:rw- /var/tmp/fstab # chmod o+r-- /var/tmp/fstab # getfact /var/tmp/fstab (to verify all permissions) # ls -ltr /var/tmp/fstab (to verify all permissions)
upvoted 10 times
gigimakis
1 year, 2 months ago
they dont ask to create mary and alice
upvoted 1 times
...
...
adolfoale
Highly Voted 3 years, 10 months ago
# mkdir /var/tmp # useradd -g 1000 bob # setfacl -m u:mary:rw /var/tmp/fstab # setfacl -m u:alice:rx /var/tmp/fstab # setfacl -m u:bob:rw /var/tmp/fstab # setfacl -m o::r /var/tmp/fstab
upvoted 8 times
FaridShakhh
3 years ago
Set UID #useradd -u 1000 bob
upvoted 6 times
...
...
wizojlo
Most Recent 9 months, 3 weeks ago
Since /var/tamp always exists anyway, no need to create it. #cp /etc/fstab /var/tmp #chown :root /var/tmp/fstab #useradd mary #useradd alice #useradd -u 1000 bob #setfacl -m u:mary:rw-,u:alice:r-x,u:bob:rw-,o::r /var/tmp/fstab
upvoted 1 times
...
mattd81
2 years, 7 months ago
Copy /etc/fstab document to /var/TMP directory. It says to copy to the /vat/TMP folder why are all the comments making changes to the /var/tmp/fstab directory?
upvoted 2 times
tester27
2 years, 6 months ago
fstab is not a directory, it is a file. so the file you'll modify and have now is the fstab under /var/tmp location
upvoted 1 times
...
...
frusty
2 years, 8 months ago
useradd -u 1000 --non-unique bob --in case the uid 1000 is already used
upvoted 1 times
...
jahute27
3 years, 7 months ago
the only thing i would change is: useradd -u 1000 bob
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...