Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam EX200 All Questions

View all questions & answers for the EX200 exam

Exam EX200 topic 1 question 83 discussion

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

SIMULATION -
According the following requirements to create user, user group and the group members:
- A group named admin.
- A user named mary, and belong to admin as the secondary group.
- A user named alice, and belong to admin as the secondary group.
- A user named bobby, bobby's login shell should be non-interactive. Bobby not belong to admin as the secondary group.
Mary, Alice, bobby users must be set "password" as the user's password.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
groupadd admin
useradd -G admin mary
useradd -G admin alice
useradd -s /sbin/nologin bobby
echo "password" | passwd --stdin mary
echo "password" | passwd --stdin alice
echo "password" | passwd --stdin bobby

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
gaven186
3 months, 2 weeks ago
'useradd' without option '-a' means the new assigned group is replacing the previous group assignment. '-a' means 'append' to enable a secondary group assignment. I think '-a' is necessary to fit the requirement. # groupadd admin # useradd -aG admin mary # useradd -aG admin alice # useradd -s /sbin/nologin bobby
upvoted 1 times
ly01
3 months ago
there is no -a switch in useradd... and you are creating the users from scratch... just make id "username" to check
upvoted 1 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 ...